Nominatim/nominatim/postgresql.h

25 lines
474 B
C
Raw Normal View History

2010-10-24 03:12:37 +04:00
/*
*/
#ifndef POSTGRESQL_H
#define POSTGRESQL_H
#define PG_OID_INT8 20
#define PG_OID_INT4 23
2010-10-25 16:22:22 +04:00
#include <byteswap.h>
2010-10-24 03:12:37 +04:00
#if __BYTE_ORDER == __BIG_ENDIAN
#define PGint16(x) (x)
#define PGint32(x) (x)
#define PGint64(x) (x)
#else
#define PGint16(x) __bswap_16 (x)
#define PGint32(x) __bswap_32 (x)
#define PGint64(x) __bswap_64 (x)
#endif
const char *build_conninfo(const char *db, const char *username, const char *password, const char *host, const char *port);
#endif