]> git.openstreetmap.org Git - nominatim.git/blob - nominatim/postgresql.h
ebece6106c065ef391284a96604cd2ed739bcdd6
[nominatim.git] / nominatim / postgresql.h
1 /*
2 */
3
4 #ifndef POSTGRESQL_H
5 #define POSTGRESQL_H
6
7 #define PG_OID_INT8                     20
8 #define PG_OID_INT4                     23
9
10 #if __BYTE_ORDER == __BIG_ENDIAN
11 #define PGint16(x)      (x)
12 #define PGint32(x)      (x)
13 #define PGint64(x)      (x)
14 #else
15 #define PGint16(x)      __bswap_16 (x)
16 #define PGint32(x)      __bswap_32 (x)
17 #define PGint64(x)      __bswap_64 (x)
18 #endif
19
20 const char *build_conninfo(const char *db, const char *username, const char *password, const char *host, const char *port);
21
22 #endif