1#ifndef __DCL_PQ_TYPES_H__
2#define __DCL_PQ_TYPES_H__ 20260106
5 #define bswap_16(_x) _byteswap_ushort(_x)
6 #define bswap_32(_x) _byteswap_ulong(_x)
7 #define bswap_64(_x) _byteswap_uint64(_x)
8#elif defined(__APPLE__)
9 #define bswap_16(_x) OSSwapInt16(_x)
10 #define bswap_32(_x) OSSwapInt32(_x)
11 #define bswap_64(_x) OSSwapInt64(_x)
20#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
29#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
38#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
45#define __ntohs(_x) __htons(_x)
46#define __ntohl(_x) __htonl(_x)
47#define __ntohll(_x) __htonll(_x)
49inline void __copy__(
void* _dst,
const void* _src,
size_t _size)
51 unsigned char* dst = (
unsigned char*)_dst;
52 const unsigned char* src = (
unsigned char*)_src;
58inline void __rcopy__(
void* _dst,
const void* _src,
size_t _size)
60 unsigned char* dst = (
unsigned char*)_dst;
61 const unsigned char* src = (
unsigned char*)_src + _size;
70#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
81#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
92#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
103#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
113 return *_src++ ==
'\\' && (*_src ==
'x' || *_src ==
'X');
119 const char* _src,
const char*& _srcend,
120 char* _dst,
char*& _dstend
126 const char* _src,
const char*& _srcend,
127 char* _dst,
char*& _dstend
133 const char* _s,
const char** _endptr,
140 const char* _s,
const char** _endptr,
uint64_t __htond(double _x)
void __copy__(void *_dst, const void *_src, size_t _size)
bool __is_hex_escaped(const char *_src)
bool __unescape_hex(const char *_src, const char *&_srcend, char *_dst, char *&_dstend)
bool __unescape_oct(const char *_src, const char *&_srcend, char *_dst, char *&_dstend)
bool __decode_timestamp_iso(const char *_s, const char **_endptr, SQL::TimeStamp &_r)
uint32_t __htonf(float _x)
float __ntohf(uint32_t _x)
__DCL_BEGIN_NAMESPACE uint16_t __htons(uint16_t _x)
uint64_t __htonll(uint64_t _x)
void __rcopy__(void *_dst, const void *_src, size_t _size)
uint32_t __htonl(uint32_t _x)
bool __decode_interval_iso(const char *_s, const char **_endptr, SQL::Interval &_r)
const wchar_t * __dataTypeName(Oid _oid)
double __ntohd(uint64_t _x)