[go: up one dir, main page]

File: soci-types.h

package info (click to toggle)
soci 4.1.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 17,944 kB
  • sloc: ansic: 169,887; cpp: 54,198; javascript: 12,258; ada: 1,973; sh: 36; makefile: 12; xml: 2
file content (31 lines) | stat: -rw-r--r-- 1,045 bytes parent folder | download
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
#ifndef SOCI_TYPES_H_INCLUDED
#define SOCI_TYPES_H_INCLUDED

#include "soci/soci-platform.h"

// This should normally be defined in soci-config.h included from
// soci-platform.h, but provide defaults for legacy non-CMake builds.
#ifndef SOCI_SIZEOF_LONG
    #if defined(_WIN32) || defined(_WIN64)
        // Under Windows long is always 32 bits, even for 64-bit builds.
        #define SOCI_SIZEOF_LONG 4
    #elif defined(__LP64__)
        // Note that currently we assume that all non-macOS Unix systems with
        // 64-bit long int64_t define it as long, which seems to be true for
        // all supported platforms.
        #ifndef __APPLE__
            #define SOCI_INT64_T_IS_LONG
        #endif
        #define SOCI_SIZEOF_LONG 8
    #else
        // Also note that on 32-bit platforms long is never the same thing as
        // int32_t, as the latter is defined as int instead.
        #define SOCI_SIZEOF_LONG 4
    #endif
#endif

#if SOCI_SIZEOF_LONG == 8
    #define SOCI_LONG_IS_64_BIT 1
#endif

#endif // SOCI_TYPES_H_INCLUDED