Skip to content

Drop legacy fallback for isc_get_client_version() #16343

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
Oct 19, 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
24 changes: 3 additions & 21 deletions ext/pdo_firebird/firebird_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -1219,27 +1219,9 @@ static int pdo_firebird_get_attribute(pdo_dbh_t *dbh, zend_long attr, zval *val)
ZVAL_BOOL(val, !isc_version(&H->db, php_firebird_info_cb, NULL));
return 1;

case PDO_ATTR_CLIENT_VERSION: {
#if defined(__GNUC__) || defined(PHP_WIN32)
info_func_t info_func = NULL;
#ifdef __GNUC__
info_func = (info_func_t)dlsym(RTLD_DEFAULT, "isc_get_client_version");
#else
HMODULE l = GetModuleHandle("fbclient");

if (!l) {
break;
}
info_func = (info_func_t)GetProcAddress(l, "isc_get_client_version");
#endif
if (info_func) {
info_func(tmp);
ZVAL_STRING(val, tmp);
}
#else
ZVAL_NULL(val);
#endif
}
case PDO_ATTR_CLIENT_VERSION:
isc_get_client_version(tmp);
ZVAL_STRING(val, tmp);
return 1;

case PDO_ATTR_SERVER_VERSION:
Expand Down
6 changes: 0 additions & 6 deletions ext/pdo_firebird/php_pdo_firebird_int.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,6 @@
/* Firebird API has a couple of missing const decls in its API */
#define const_cast(s) ((char*)(s))

#ifdef PHP_WIN32
typedef void (__stdcall *info_func_t)(char*);
#else
typedef void (*info_func_t)(char*);
#endif

#ifndef min
#define min(a,b) ((a)<(b)?(a):(b))
#endif
Expand Down