]> git.openstreetmap.org Git - nominatim.git/blob - nominatim/postgresql.h
Fix warnings:
[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 defined(HAVE_BYTESWAP_H)
11 #include <byteswap.h>
12 #elif defined(HAVE_SYS_ENDIAN_H)
13 #include <sys/endian.h>
14 #endif
15
16 #if __BYTE_ORDER == __BIG_ENDIAN
17 #define PGint16(x)      (x)
18 #define PGint32(x)      (x)
19 #define PGint64(x)      (x)
20 #else
21 #define PGint16(x)      __bswap_16 (x)
22 #define PGint32(x)      __bswap_32 (x)
23 #define PGint64(x)      __bswap_64 (x)
24 #endif
25
26 const char *build_conninfo(const char *db, const char *username, const char *password, const char *host, const char *port);
27
28 #endif