Skip to content

Commit 73c0490

Browse files
committed
Merge branch 'v1.16'
Bumps the libmongoc submodule to mongodb/mongo-c-driver@d933a8c, which is the 1.25-dev commit for the corresponding patch in the 1.24.3 release for PHPC's 1.16 branch.
2 parents 7e2adf0 + cd1f3ee commit 73c0490

File tree

7 files changed

+32
-35
lines changed

7 files changed

+32
-35
lines changed

config.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,7 @@ if test "$PHP_MONGODB" != "no"; then
348348

349349
_include([scripts/autotools/CheckCompiler.m4])
350350
_include([scripts/autotools/CheckHost.m4])
351+
_include([scripts/autotools/PlatformFlags.m4])
351352

352353
_include([scripts/autotools/libbson/CheckAtomics.m4])
353354
_include([scripts/autotools/libbson/CheckHeaders.m4])
@@ -361,7 +362,6 @@ if test "$PHP_MONGODB" != "no"; then
361362
_include([scripts/autotools/libmongoc/CheckSSL.m4])
362363
_include([scripts/autotools/libmongoc/CheckUtf8Proc.m4])
363364
_include([scripts/autotools/libmongoc/FindDependencies.m4])
364-
_include([scripts/autotools/libmongoc/PlatformFlags.m4])
365365
_include([scripts/autotools/libmongoc/Versions.m4])
366366
_include([scripts/autotools/libmongoc/WeakSymbols.m4])
367367

scripts/autotools/CheckCompiler.m4

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -86,18 +86,6 @@ if test "$c_compiler" = "unknown"; then
8686
AC_MSG_ERROR([Compiler GCC >= 4.1 or Clang >= 3.3 is required for C compilation])
8787
fi
8888

89-
# GLibc 2.19 complains about both _BSD_SOURCE and _GNU_SOURCE. The _GNU_SOURCE
90-
# contains everything anyway. So just use that.
91-
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
92-
#include <features.h>
93-
#ifndef __GLIBC__
94-
#error not glibc
95-
#endif
96-
]], [])],
97-
LIBC_FEATURES="-D_GNU_SOURCE",
98-
LIBC_FEATURES="-D_BSD_SOURCE")
99-
AC_SUBST(LIBC_FEATURES)
100-
10189
AC_C_CONST
10290
AC_C_INLINE
10391
AC_C_TYPEOF

scripts/autotools/PlatformFlags.m4

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
dnl Enable POSIX features up to POSIX.1-2008 plus the XSI extension and BSD-derived definitions.
2+
dnl Both _BSD_SOURCE and _DEFAULT_SOURCE are defined for backwards-compatibility with glibc 2.19 and earlier.
3+
dnl _BSD_SOURCE and _DEFAULT_SOURCE are required by `getpagesize`, `h_errno`, etc.
4+
dnl _XOPEN_SOURCE=700 is required by `strnlen`, `strerror_l`, etc.
5+
dnl https://man7.org/linux/man-pages/man7/feature_test_macros.7.html
6+
dnl https://pubs.opengroup.org/onlinepubs/7908799/xsh/compilation.html
7+
CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=700 -D_BSD_SOURCE -D_DEFAULT_SOURCE"
8+
PHP_MONGODB_BUNDLED_CFLAGS="$PHP_MONGODB_BUNDLED_CFLAGS -D_XOPEN_SOURCE=700 -D_BSD_SOURCE -D_DEFAULT_SOURCE"
9+
10+
dnl Enable non-standard features on FreeBSD with __BSD_VISIBLE=1
11+
if test "$os_freebsd" = "yes"; then
12+
CPPFLAGS="$CPPFLAGS -D__BSD_VISIBLE=1"
13+
PHP_MONGODB_BUNDLED_CFLAGS="$PHP_MONGODB_BUNDLED_CFLAGS -D__BSD_VISIBLE=1"
14+
fi
15+
16+
AS_IF([test "$os_darwin" = "yes"],[
17+
dnl Non-POSIX extensions are required by `_SC_NPROCESSORS_ONLN`.
18+
dnl https://opensource.apple.com/source/Libc/Libc-1439.40.11/gen/compat.5.auto.html
19+
CPPFLAGS="$CPPFLAGS -D_DARWIN_C_SOURCE"
20+
PHP_MONGODB_BUNDLED_CFLAGS="$PHP_MONGODB_BUNDLED_CFLAGS -D_DARWIN_C_SOURCE"
21+
22+
dnl Ignore OpenSSL deprecation warnings on OSX
23+
AX_CHECK_COMPILE_FLAG([-Wno-deprecated-declarations], [STD_CFLAGS="$STD_CFLAGS -Wno-deprecated-declarations"])
24+
25+
dnl We know there are some cast-align issues on OSX
26+
AX_CHECK_COMPILE_FLAG([-Wno-cast-align], [STD_CFLAGS="$STD_CFLAGS -Wno-cast-align"])
27+
AX_CHECK_COMPILE_FLAG([-Wno-unneeded-internal-declaration], [STD_CFLAGS="$STD_CFLAGS -Wno-unneeded-internal-declaration"])
28+
AX_CHECK_COMPILE_FLAG([-Wno-error=unused-command-line-argument], [STD_CFLAGS="$STD_CFLAGS -Wno-error=unused-command-line-argument"])
29+
])

scripts/autotools/libbson/FindDependencies.m4

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
if test "$os_win32" != "yes"; then
2-
PHP_MONGODB_BUNDLED_CFLAGS="$PHP_MONGODB_BUNDLED_CFLAGS -D_DEFAULT_SOURCE"
3-
fi
4-
51
# Check for strnlen()
62
dnl AC_CHECK_FUNC isn't properly respecting _XOPEN_SOURCE for strnlen for unknown reason
73
AC_SUBST(BSON_HAVE_STRNLEN, 0)

scripts/autotools/libmongoc/PlatformFlags.m4

Lines changed: 0 additions & 16 deletions
This file was deleted.

src/LIBMONGOC_VERSION_CURRENT

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.25.0-20230718+git75db6e1af6
1+
1.25.0-20230815+gitd933a8c996

src/libmongoc

Submodule libmongoc updated 129 files

0 commit comments

Comments
 (0)