]> git.openstreetmap.org Git - nominatim.git/blob - nominatim/postgresql.h
Merge branch 'patch-1' of https://github.com/Firefishy/Nominatim
[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 #include <byteswap.h>
11
12 #if __BYTE_ORDER == __BIG_ENDIAN
13 #define PGint16(x)      (x)
14 #define PGint32(x)      (x)
15 #define PGint64(x)      (x)
16 #else
17 #define PGint16(x)      __bswap_16 (x)
18 #define PGint32(x)      __bswap_32 (x)
19 #define PGint64(x)      __bswap_64 (x)
20 #endif
21
22 const char *build_conninfo(const char *db, const char *username, const char *password, const char *host, const char *port);
23
24 #endif