diff options
| author | Kai Blaschke <kai.blaschke@kb-dev.net> | 2019-09-11 03:24:45 +0200 |
|---|---|---|
| committer | Victor Romero <romerosanchezv@gmail.com> | 2019-09-10 18:24:45 -0700 |
| commit | 3ef6dd915e8a74baec88fd9de492f3749cf47bf8 (patch) | |
| tree | d11c36eb6903ebe29d137c9d2c4cf6097cfbdff7 | |
| parent | 95a336e0495d31bbe899b3178822df9cacf94b97 (diff) | |
| download | vcpkg-3ef6dd915e8a74baec88fd9de492f3749cf47bf8.tar.gz vcpkg-3ef6dd915e8a74baec88fd9de492f3749cf47bf8.zip | |
[libpq] #undef int128 type if compiling for 32 bit architecture (#8080)
* [libpq] #undef int128 type if compiling for 32 bit architecture
* [libpq] Don't define int128 for 32-bit architectures
| -rw-r--r-- | ports/libpq/CMakeLists.txt | 7 | ||||
| -rw-r--r-- | ports/libpq/CONTROL | 2 | ||||
| -rw-r--r-- | ports/libpq/pg_config.linux.h | 2 |
3 files changed, 8 insertions, 3 deletions
diff --git a/ports/libpq/CMakeLists.txt b/ports/libpq/CMakeLists.txt index d25a314c4..6a03da19f 100644 --- a/ports/libpq/CMakeLists.txt +++ b/ports/libpq/CMakeLists.txt @@ -28,9 +28,14 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND CMAKE_SYSTEM_PROCESSOR STREQUAL " configure_file(src/include/port/darwin.h include/pg_config_os.h COPYONLY) configure_file(src/backend/port/dynloader/darwin.h include/dynloader.h COPYONLY) elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64") + if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8") + set(DEFINE_PG_INT128_TYPE "#define PG_INT128_TYPE __int128") + else() + set(DEFINE_PG_INT128_TYPE "#undef PG_INT128_TYPE") + endif() file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/include/pg_config_ext.h" "#include <stdint.h>\n#define PG_INT64_TYPE int64_t") configure_file(src/include/port/linux.h include/pg_config_os.h COPYONLY) - configure_file("${PORT_DIR}/pg_config.linux.h" include/pg_config.h COPYONLY) + configure_file("${PORT_DIR}/pg_config.linux.h" include/pg_config.h) configure_file(src/backend/port/dynloader/linux.h include/dynloader.h COPYONLY) else() message(FATAL_ERROR "Unknown system: ${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}") diff --git a/ports/libpq/CONTROL b/ports/libpq/CONTROL index f6c0ce34e..d8bafa772 100644 --- a/ports/libpq/CONTROL +++ b/ports/libpq/CONTROL @@ -1,5 +1,5 @@ Source: libpq -Version: 9.6.1-7 +Version: 9.6.1-8 Homepage: https://www.postgresql.org/ Description: The official database access API of postgresql Build-Depends: openssl, zlib (linux) diff --git a/ports/libpq/pg_config.linux.h b/ports/libpq/pg_config.linux.h index d3758bb95..99ebaa716 100644 --- a/ports/libpq/pg_config.linux.h +++ b/ports/libpq/pg_config.linux.h @@ -144,7 +144,7 @@ #define PACKAGE_TARNAME "postgresql" #define PACKAGE_URL "" #define PACKAGE_VERSION "9.6.3" -#define PG_INT128_TYPE __int128 +${DEFINE_PG_INT128_TYPE} #define PG_INT64_TYPE long int #define PG_KRB_SRVNAM "postgres" #define PG_MAJORVERSION "9.6" |
