Skip to content

[WIP] PHPC-749: Update win32 libbson and libmongoc config files #352

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 61 additions & 1 deletion win32/bson-config.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,19 @@


/*
* Define to 1 if we have access to GCC 64-bit atomic builtins.
* Define to 1 if we have access to GCC 32-bit atomic builtins.
* While this requires GCC 4.1+ in most cases, it is also architecture
* dependent. For example, some PPC or ARM systems may not have it even
* if it is a recent GCC version.
*/
#define BSON_HAVE_ATOMIC_32_ADD_AND_FETCH 0
#if BSON_HAVE_ATOMIC_32_ADD_AND_FETCH != 1
# undef BSON_HAVE_ATOMIC_32_ADD_AND_FETCH
#endif

/*
* Similarly, define to 1 if we have access to GCC 64-bit atomic builtins.
*/
#define BSON_HAVE_ATOMIC_64_ADD_AND_FETCH 0
#if BSON_HAVE_ATOMIC_64_ADD_AND_FETCH != 1
# undef BSON_HAVE_ATOMIC_64_ADD_AND_FETCH
Expand Down Expand Up @@ -71,4 +79,56 @@
#endif


/*
* Define to 1 if you have reallocf available on your platform.
*/
#define BSON_HAVE_REALLOCF 0
#if BSON_HAVE_REALLOCF != 1
# undef BSON_HAVE_REALLOCF
#endif


/*
* Define to 1 if you have _set_output_format (VS2013 and older).
*/
#define BSON_NEEDS_SET_OUTPUT_FORMAT 1
#if BSON_NEEDS_SET_OUTPUT_FORMAT != 1
# undef BSON_NEEDS_SET_OUTPUT_FORMAT
#endif

/*
* Define to 1 if you have struct timespec available on your platform.
*/
#define BSON_HAVE_TIMESPEC 0
#if BSON_HAVE_TIMESPEC != 1
# undef BSON_HAVE_TIMESPEC
#endif


/*
* Define to 1 if you want extra aligned types in libbson
*/
#define BSON_EXTRA_ALIGN 0
#if BSON_EXTRA_ALIGN != 1
# undef BSON_EXTRA_ALIGN
#endif


/*
* Define to 1 if you have SYS_gettid syscall
*/
#define BSON_HAVE_SYSCALL_TID 0
#if BSON_HAVE_SYSCALL_TID != 1
# undef BSON_HAVE_SYSCALL_TID
#endif


/*
* Define to 1 if _Decimal128 (BID format) is available on your platform.
*/
#define BSON_HAVE_DECIMAL128 0
#if BSON_HAVE_DECIMAL128 != 1
# undef BSON_HAVE_DECIMAL128
#endif

#endif /* BSON_CONFIG_H */
40 changes: 11 additions & 29 deletions win32/bson-version.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,23 +37,30 @@
*
* BSON minor version component (e.g. 2 if %BSON_VERSION is 1.2.3)
*/
#define BSON_MINOR_VERSION (1)
#define BSON_MINOR_VERSION (4)


/**
* BSON_MICRO_VERSION:
*
* BSON micro version component (e.g. 3 if %BSON_VERSION is 1.2.3)
*/
#define BSON_MICRO_VERSION (3)
#define BSON_MICRO_VERSION (0)


/**
* BSON_PRERELEASE_VERSION:
*
* BSON prerelease version component (e.g. rc0 if %BSON_VERSION is 1.2.3-rc0)
*/
#define BSON_PRERELEASE_VERSION (dev)

/**
* BSON_VERSION:
*
* BSON version.
*/
#define BSON_VERSION (1.1.3)
#define BSON_VERSION (1.4.0-dev)


/**
Expand All @@ -62,7 +69,7 @@
* BSON version, encoded as a string, useful for printing and
* concatenation.
*/
#define BSON_VERSION_S "1.1.3"
#define BSON_VERSION_S "1.4.0-dev"


/**
Expand Down Expand Up @@ -91,29 +98,4 @@
(BSON_MAJOR_VERSION == (major) && BSON_MINOR_VERSION == (minor) && \
BSON_MICRO_VERSION >= (micro)))


/**
* bson_get_major_version:
*
* Helper function to return the runtime major version of the library.
*/
int bson_get_major_version (void);


/**
* bson_get_minor_version:
*
* Helper function to return the runtime minor version of the library.
*/
int bson_get_minor_version (void);


/**
* bson_get_micro_version:
*
* Helper function to return the runtime micro version of the library.
*/
int bson_get_micro_version (void);


#endif /* BSON_VERSION_H */
124 changes: 123 additions & 1 deletion win32/mongoc-config.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,75 @@
#define MONGOC_CONFIG_H


/*
* MONGOC_ENABLE_SSL_SECURE_CHANNEL is set from configure to determine if we are
* compiled with Native SSL support on Windows
*/
#define MONGOC_ENABLE_SSL_SECURE_CHANNEL 1

#if MONGOC_ENABLE_SSL_SECURE_CHANNEL != 1
# undef MONGOC_ENABLE_SSL_SECURE_CHANNEL
#endif


/*
* MONGOC_ENABLE_CRYPTO_CNG is set from configure to determine if we are
* compiled with Native Crypto support on Windows
*/
#define MONGOC_ENABLE_CRYPTO_CNG 1

#if MONGOC_ENABLE_CRYPTO_CNG != 1
# undef MONGOC_ENABLE_CRYPTO_CNG
#endif


/*
* MONGOC_ENABLE_SSL_SECURE_TRANSPORT is set from configure to determine if we are
* compiled with Native SSL support on Darwin
*/
#define MONGOC_ENABLE_SSL_SECURE_TRANSPORT 0

#if MONGOC_ENABLE_SSL_SECURE_TRANSPORT != 1
# undef MONGOC_ENABLE_SSL_SECURE_TRANSPORT
#endif


/*
* MONGOC_ENABLE_CRYPTO_COMMON_CRYPTO is set from configure to determine if we are
* compiled with Native Crypto support on Darwin
*/
#define MONGOC_ENABLE_CRYPTO_COMMON_CRYPTO 0

#if MONGOC_ENABLE_CRYPTO_COMMON_CRYPTO != 1
# undef MONGOC_ENABLE_CRYPTO_COMMON_CRYPTO
#endif


/*
* MONGOC_ENABLE_SSL_OPENSSL is set from configure to determine if we are
* compiled with OpenSSL support.
*/
#define MONGOC_ENABLE_SSL_OPENSSL 0

#if MONGOC_ENABLE_SSL_OPENSSL != 1
# undef MONGOC_ENABLE_SSL_OPENSSL
#endif


/*
* MONGOC_ENABLE_CRYPTO_LIBCRYPTO is set from configure to determine if we are
* compiled with OpenSSL support.
*/
#define MONGOC_ENABLE_CRYPTO_LIBCRYPTO 0

#if MONGOC_ENABLE_CRYPTO_LIBCRYPTO != 1
# undef MONGOC_ENABLE_CRYPTO_LIBCRYPTO
#endif


/*
* MONGOC_ENABLE_SSL is set from configure to determine if we are
* compiled with SSL support.
* compiled with any SSL support.
*/
#define MONGOC_ENABLE_SSL 1

Expand All @@ -30,6 +96,27 @@
#endif


/*
* MONGOC_ENABLE_CRYPTO is set from configure to determine if we are
* compiled with any crypto support.
*/
#define MONGOC_ENABLE_CRYPTO 1

#if MONGOC_ENABLE_CRYPTO != 1
# undef MONGOC_ENABLE_CRYPTO
#endif


/*
* Use system crypto profile
*/
#define MONGOC_ENABLE_CRYPTO_SYSTEM_PROFILE 0

#if MONGOC_ENABLE_CRYPTO_SYSTEM_PROFILE != 1
# undef MONGOC_ENABLE_CRYPTO_SYSTEM_PROFILE
#endif


/*
* MONGOC_ENABLE_SASL is set from configure to determine if we are
* compiled with SASL support.
Expand All @@ -41,4 +128,39 @@
#endif


/*
* MONGOC_HAVE_SASL_CLIENT_DONE is set from configure to determine if we
* have SASL and its version is new enough to use sasl_client_done (),
* which supersedes sasl_done ().
*/
#define MONGOC_HAVE_SASL_CLIENT_DONE 1

#if MONGOC_HAVE_SASL_CLIENT_DONE != 1
# undef MONGOC_HAVE_SASL_CLIENT_DONE
#endif


/*
* MONGOC_HAVE_WEAK_SYMBOLS is set from configure to determine if the
* compiler supports the (weak) annotation. We use it to prevent
* Link-Time-Optimization (LTO) in our constant-time mongoc_memcmp()
* This is known to work with GNU GCC and Solaris Studio
*/
#define MONGOC_HAVE_WEAK_SYMBOLS 1

#if MONGOC_HAVE_WEAK_SYMBOLS != 1
# undef MONGOC_HAVE_WEAK_SYMBOLS
#endif


/*
* Disable automatic calls to mongoc_init() and mongoc_cleanup()
* before main() is called, and after exit() (respectively).
*/
#define MONGOC_NO_AUTOMATIC_GLOBALS 1

#if MONGOC_NO_AUTOMATIC_GLOBALS != 1
# undef MONGOC_NO_AUTOMATIC_GLOBALS
#endif

#endif /* MONGOC_CONFIG_H */
17 changes: 12 additions & 5 deletions win32/mongoc-version.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,23 +37,31 @@
*
* MONGOC minor version component (e.g. 2 if %MONGOC_VERSION is 1.2.3)
*/
#define MONGOC_MINOR_VERSION (1)
#define MONGOC_MINOR_VERSION (4)


/**
* MONGOC_MICRO_VERSION:
*
* MONGOC micro version component (e.g. 3 if %MONGOC_VERSION is 1.2.3)
*/
#define MONGOC_MICRO_VERSION (2)
#define MONGOC_MICRO_VERSION (0)


/**
* MONGOC_PRERELEASE_VERSION:
*
* MONGOC prerelease version component (e.g. rc0 if %MONGOC_VERSION is 1.2.3-rc0)
*/
#define MONGOC_PRERELEASE_VERSION (dev)


/**
* MONGOC_VERSION:
*
* MONGOC version.
*/
#define MONGOC_VERSION (1.1.2)
#define MONGOC_VERSION (1.4.0-dev)


/**
Expand All @@ -62,7 +70,7 @@
* MONGOC version, encoded as a string, useful for printing and
* concatenation.
*/
#define MONGOC_VERSION_S "1.1.2"
#define MONGOC_VERSION_S "1.4.0-dev"


/**
Expand Down Expand Up @@ -91,5 +99,4 @@
(MONGOC_MAJOR_VERSION == (major) && MONGOC_MINOR_VERSION == (minor) && \
MONGOC_MICRO_VERSION >= (micro)))


#endif /* MONGOC_VERSION_H */