1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
|
/*
* Various things to allow source files from postgresql code to be
* used in pgbouncer. pgbouncer's system.h needs to be included
* before this.
*/
/* from c.h */
#include <usual/base.h>
#include <usual/ctype.h>
#include <usual/endian.h>
#include <usual/string.h>
#ifdef CASSERT
#define USE_ASSERT_CHECKING
#endif
#define int8 int8_t
#define int16 int16_t
#define int32 int32_t
#define int64 int64_t
#define uint8 uint8_t
#define uint16 uint16_t
#define uint32 uint32_t
#define uint64 uint64_t
#define Size size_t
#define lengthof(array) (sizeof (array) / sizeof ((array)[0]))
#define pg_hton32(x) htobe32(x)
#define HIGHBIT (0x80)
#define IS_HIGHBIT_SET(ch) ((unsigned char)(ch) & HIGHBIT)
#define UINT64CONST(x) (x##ULL)
/* ignore gettext */
#define _(x) (x)
typedef unsigned int Oid;
#define MaxAllocSize ((Size) 0x3fffffff)
#define pg_nodiscard _MUSTCHECK
#define pg_noreturn _NORETURN
#define pg_restrict restrict
/* define this to use non-server code paths */
#define FRONTEND
|