Skip to content

Refactor HAVE_SQLDATASOURCES check #15222

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

Merged
merged 1 commit into from
Aug 4, 2024
Merged
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
13 changes: 7 additions & 6 deletions ext/odbc/config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -440,12 +440,13 @@ fi

dnl Extension setup
if test -n "$ODBC_TYPE"; then
if test "$ODBC_TYPE" != "dbmaker"; then
PHP_EVAL_LIBLINE([$ODBC_LFLAGS $ODBC_LIBS], ODBC_SHARED_LIBADD)
if test "$ODBC_TYPE" != "solid"; then
AC_DEFINE(HAVE_SQLDATASOURCES,1,[ ])
fi
fi
AS_VAR_IF([ODBC_TYPE], [dbmaker],, [
PHP_EVAL_LIBLINE([$ODBC_LFLAGS $ODBC_LIBS], [ODBC_SHARED_LIBADD])
AS_VAR_IF([ODBC_TYPE], [solid],,
[AC_DEFINE([HAVE_SQLDATASOURCES], [1],
[Define to 1 if ODBC library has 'SQLDataSources', as a function or
macro.])])
])

AC_DEFINE([HAVE_UODBC], [1],
[Define to 1 if the PHP extension 'odbc' is available.])
Expand Down
1 change: 1 addition & 0 deletions ext/odbc/config.w32
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ if (PHP_ODBC == "yes") {
&& CHECK_HEADER_ADD_INCLUDE("sqlext.h", "CFLAGS_ODBC")) {
EXTENSION("odbc", "php_odbc.c odbc_utils.c", PHP_ODBC_SHARED, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
AC_DEFINE("HAVE_UODBC", 1, "Define to 1 if the PHP extension 'odbc' is available.");
AC_DEFINE("HAVE_SQLDATASOURCES", 1, "Define to 1 if ODBC library has 'SQLDataSources', as a function or macro.");
if ("no" == PHP_ODBCVER) {
AC_DEFINE("ODBCVER", "0x0350", "The highest supported ODBC version", false);
} else if ("0" != PHP_ODBCVER) {
Expand Down
1 change: 0 additions & 1 deletion win32/build/config.w32.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@
#define HAVE_GLOB
#define PHP_SHLIB_SUFFIX "dll"
#define PHP_SHLIB_EXT_PREFIX "php_"
#define HAVE_SQLDATASOURCES

/* Win32 supports socketpair by the emulation in win32/sockets.c */
#define HAVE_SOCKETPAIR 1
Expand Down
Loading