Skip to content

Commit

Permalink
Merge pull request #64 from mlazdans/master
Browse files Browse the repository at this point in the history
Handle Firebird 4/5 types
  • Loading branch information
MartinKoeditz authored Mar 4, 2025
2 parents 025f24d + c185385 commit 8ce7268
Show file tree
Hide file tree
Showing 19 changed files with 486 additions and 134 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ yaml.loT
.FBCIndex
.FBCLockFolder
core
*.dep

# Test specific Ignores
tests/*.diff
Expand Down
18 changes: 17 additions & 1 deletion config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,22 @@ if test "$PHP_INTERBASE" != "no"; then
fi

AC_DEFINE(HAVE_IBASE,1,[ ])
PHP_NEW_EXTENSION(interbase, interbase.c ibase_query.c ibase_service.c ibase_events.c ibase_blobs.c, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
PHP_NEW_EXTENSION(interbase, interbase.c ibase_query.c ibase_service.c ibase_events.c ibase_blobs.c, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1,[cxx])
PHP_SUBST(INTERBASE_SHARED_LIBADD)

PHP_REQUIRE_CXX()
PHP_CXX_COMPILE_STDCXX([11], [mandatory], [PHP_INTERBASE_STDCXX])

PHP_INTERBASE_CXX_SOURCES="pdo_firebird_utils.cpp"

AS_VAR_IF([ext_shared], [no],
[PHP_ADD_SOURCES([$ext_dir],
[$PHP_INTERBASE_CXX_SOURCES],
[$PHP_INTERBASE_STDCXX])],
[PHP_ADD_SOURCES_X([$ext_dir],
[$PHP_INTERBASE_CXX_SOURCES],
[$PHP_INTERBASE_STDCXX],
[shared_objects_interbase],
[yes])])

fi
14 changes: 7 additions & 7 deletions config.w32
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
ARG_WITH("interbase", "InterBase support", "no");

if (PHP_INTERBASE != "no") {

if (CHECK_HEADER_ADD_INCLUDE("ibase.h", "CFLAGS_INTERBASE",
PHP_PHP_BUILD + "\\include\\interbase;" + PHP_PHP_BUILD + "\\interbase\\include;" + PHP_INTERBASE) &&
(CHECK_LIB("fbclient_ms.lib", "interbase", PHP_PHP_BUILD + "\\interbase\\lib_ms;" + PHP_INTERBASE) ||
CHECK_LIB("gds32_ms.lib", "interbase", PHP_PHP_BUILD + "\\interbase\\lib_ms;" + PHP_INTERBASE))) {

EXTENSION("interbase", "interbase.c ibase_query.c ibase_service.c ibase_events.c ibase_blobs.c", PHP_INTERBASE_SHARED, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
if (
CHECK_HEADER_ADD_INCLUDE("ibase.h", "CFLAGS_INTERBASE", PHP_INTERBASE + "\\include") && (
CHECK_LIB("fbclient_ms.lib", "interbase", PHP_INTERBASE + "\\lib") ||
CHECK_LIB("gds32_ms.lib", "interbase", PHP_INTERBASE + "\\lib")
)
) {
EXTENSION("interbase", "interbase.c ibase_query.c ibase_service.c ibase_events.c ibase_blobs.c pdo_firebird_utils.cpp", PHP_INTERBASE_SHARED, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
AC_DEFINE('HAVE_IBASE', 1, 'Have interbase library');
} else {
WARNING("interbase not enabled; libraries and headers not found");
Expand Down
Loading

0 comments on commit 8ce7268

Please sign in to comment.