Hi all,
I would like to submit a patch for PHP 4 as well as PHP 5. The patch
will update PHP's UODBC
module to work with more recent versions of Birdstep Technology's RDM Server
product. The files
affected are ext/odbc/config.m4 & ext/odbc/php_odbc.h. Below is the diff
output for the two files
based on the PHP 4 version, but the changes are the same for PHP 4 & PHP 5.
If you have any
suggestions or feedback I would love to hear them, as I am new to
automake/m4 etc... I would also
like to know what to expect from here... Will somebody take these changes
and commit them? Do I
need to do more before they'll be committed? If they are committed, when
will they find their way to
the public?
Thanks!
diff for config.m4
298c298,312
<
ac_birdstep_uname_s=
uname -s 2>/dev/null
ac_birdstep_uname_p=uname -p 2>/dev/null
case $ac_birdstep_uname_s in
AIX) AC_DEFINE(AIX,1,[ ]);;
HP-UX) AC_DEFINE(HPUX,1,[ ]);;
Linux) AC_DEFINE(LINUX,1,[ ]);;
QNX) AC_DEFINE(NEUTRINO,1,[ ]);;
SunOS)
if test "$ac_birdstep_uname_p" == "i386"; then
AC_DEFINE(ISOLARIS,1,[ ])
elif test "$ac_birdstep_uname_p" == "sparc"; then
AC_DEFINE(SOLARIS,1,[ ])
fi;;
UnixWare) AC_DEFINE(UNIXWARE,1,[ ]);;
esac
310c324,328
<
ODBC_LIBS="-lCadm -lCdict -lCenc -lCrdm -lCrpc -lCrdbc -lCrm -lCuapi -lutil"
if test -e "$ODBC_LIBDIR/libCrdbc32.so" -o -e
"$ODBC_LIBDIR/libCrdbc32.sl"; then
ODBC_LIBS="-lCrdbc32 -lCadm32 -lCncp32 -lCrdbc32 -lCrm32 -lCsql32 -lCdict32
-lCrdm32 -lCrpc32 -lutil"
elif test -e "$ODBC_LIBDIR/libCrdbc.so" -o -e
"$ODBC_LIBDIR/libCrdbc.sl"; then
ODBC_LIBS="-lCrdbc -lCadm -lCncp -lCrdbc -lCrm -lCsql -lCdict -lCrdm
-lCrpc -lutil"
fi
312d329
<
506,508c523,527
< ext_shared=$shared
< PHP_EVAL_LIBLINE([$ODBC_LFLAGS $ODBC_LIBS], ODBC_SHARED_LIBADD)
< AC_DEFINE(HAVE_SQLDATASOURCES,1,[ ])
ext_shared=$shared PHP_EVAL_LIBLINE([$ODBC_LFLAGS $ODBC_LIBS], ODBC_SHARED_LIBADD) if test "$ODBC_TYPE" != "birdstep"; then AC_DEFINE(HAVE_SQLDATASOURCES,1,[ ]) fi
diff for php_odbc.h
36c36
< #if defined(HAVE_DBMAKER) || defined(PHP_WIN32) || defined(HAVE_IBMDB2) ||
defined(HAVE_UNIXODBC)
#if defined(HAVE_DBMAKER) || defined(PHP_WIN32) || defined(HAVE_IBMDB2) ||
defined(HAVE_UNIXODBC) || defined(HAVE_BIRDSTEP)
Hi all,
I would like to submit a patch for PHP 4 as well as PHP 5. The patch
will update PHP's UODBC
module to work with more recent versions of Birdstep Technology's RDM Server
product. The files
affected are ext/odbc/config.m4 & ext/odbc/php_odbc.h. Below is the diff
output for the two files
based on the PHP 4 version, but the changes are the same for PHP 4 & PHP 5.
Please do "cvs diff" in the source of the tree, and put that file
online. Makes things much easier to read...
regards,
Derick
--
Derick Rethans
http://derickrethans.nl | http://ez.no | http://xdebug.org
Ok, done, is this better?
In config.m4 I am doing 2 things.
First, I am using "uname" to get the platform being compiled on, then using
this info to set the appropriate define needed by RDM Server, i.e. LINUX,
SOLARIS, etc.
Secondly, because RDM Server library names changed when 64-bit support was
added, I added a test to figure out which libraries to link to.
In php_odbc.h I simply added birdstep to the list of db's for which
PHP_ODBC_HAVE_FETCH_HASH needs to be define.....
cvs diff: Diffing ext/odbc
Index: ext/odbc/config.m4
RCS file: /repository/php-src/ext/odbc/config.m4,v
retrieving revision 1.55.2.10
diff -u -r1.55.2.10 config.m4
--- ext/odbc/config.m4 18 Jan 2005 21:21:16 -0000 1.55.2.10
+++ ext/odbc/config.m4 5 Apr 2005 22:25:01 -0000
@@ -1,11 +1,11 @@
dnl
-dnl $Id: config.m4,v 1.55.2.10 2005/01/18 21:21:16 tony2001 Exp $
+dnl $Id: config.m4,v 1.55.2.8 2003/11/25 08:08:30 sniper Exp $
dnl
dnl
dnl Figure out which library file to link with for the Solid support.
dnl
-AC_DEFUN([AC_FIND_SOLID_LIBS],[
+AC_DEFUN(AC_FIND_SOLID_LIBS,[
AC_MSG_CHECKING([Solid library file])
ac_solid_uname_r=uname -r 2>/dev/null
ac_solid_uname_s=uname -s 2>/dev/null
@@ -71,7 +71,7 @@
dnl
dnl Figure out which library file to link with for the Empress support.
dnl
-AC_DEFUN([AC_FIND_EMPRESS_LIBS],[
+AC_DEFUN(AC_FIND_EMPRESS_LIBS,[
AC_MSG_CHECKING([Empress library file])
ODBC_LIBS=echo $1/libempodbccl.so | cut -d' ' -f1
if test ! -f $ODBC_LIBS; then
@@ -80,7 +80,7 @@
AC_MSG_RESULT(echo $ODBC_LIBS | sed -e 's!.*/!!'
)
])
-AC_DEFUN([AC_FIND_EMPRESS_BCS_LIBS],[
+AC_DEFUN(AC_FIND_EMPRESS_BCS_LIBS,[
AC_MSG_CHECKING([Empress local access library file])
ODBCBCS_LIBS=echo $1/libempodbcbcs.a | cut -d' ' -f1
if test ! -f $ODBCBCS_LIBS; then
@@ -194,15 +194,6 @@
ODBC_INCDIR=$withval/include
ODBC_LIBDIR=$withval/lib
fi
- if ! test -f "$ODBC_INCDIR/sqlcli1.h"; then
-
AC_MSG_ERROR([IBM DB2 header files not found])
- fi
- if ! test -f "$ODBC_LIBDIR/libdb2.so"; then
-
AC_MSG_ERROR([IBM DB2 required libraries not found])
- fi
- ODBC_INCLUDE=-I$ODBC_INCDIR
ODBC_LFLAGS=-L$ODBC_LIBDIR
ODBC_TYPE=db2
@@ -304,7 +295,21 @@
install directory, defaults to
/usr/local/birdstep.],
[
PHP_WITH_SHARED
- ac_birdstep_uname_s=
uname -s 2>/dev/null
- ac_birdstep_uname_p=
uname -p 2>/dev/null
- case $ac_birdstep_uname_s in
- AIX) AC_DEFINE(AIX,1,[ ]);;
- HP-UX) AC_DEFINE(HPUX,1,[ ]);;
- Linux) AC_DEFINE(LINUX,1,[ ]);;
- QNX) AC_DEFINE(NEUTRINO,1,[ ]);;
- SunOS)
-
if test "$ac_birdstep_uname_p" == "i386"; then
-
AC_DEFINE(ISOLARIS,1,[ ])
-
elif test "$ac_birdstep_uname_p" == "sparc"; then
-
AC_DEFINE(SOLARIS,1,[ ])
-
fi;;
- UnixWare) AC_DEFINE(UNIXWARE,1,[ ]);;
- esac
if test "$withval" != "no"; then
if test "$withval" = "yes"; then
ODBC_INCDIR=/usr/local/birdstep/include
@@ -316,9 +321,12 @@
ODBC_INCLUDE=-I$ODBC_INCDIR
ODBC_TYPE=birdstep
ODBC_LFLAGS=-L$ODBC_LIBDIR
- ODBC_LIBS="-lCadm -lCdict -lCenc -lCrdm -lCrpc -lCrdbc -lCrm -lCuapi -lutil"
- if test -e "$ODBC_LIBDIR/libCrdbc32.so" -o -e
"$ODBC_LIBDIR/libCrdbc32.sl"; then - ODBC_LIBS="-lCrdbc32 -lCadm32 -lCncp32 -lCrm32 -lCsql32 -lCdict32 -lCrdm32
-lCrpc32 -lutil" - elif test -e "$ODBC_LIBDIR/libCrdbc.so" -o -e
"$ODBC_LIBDIR/libCrdbc.sl"; then - ODBC_LIBS="-lCrdbc -lCadm -lCncp -lCrm -lCsql -lCdict -lCrdm -lCrpc -lutil"
- fi
AC_DEFINE(HAVE_BIRDSTEP,1,[ ])
- AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
@@ -512,9 +520,11 @@
if test -n "$ODBC_TYPE"; then
if test "$ODBC_TYPE" != "dbmaker"; then
- ext_shared=$shared
- PHP_EVAL_LIBLINE([$ODBC_LFLAGS $ODBC_LIBS], ODBC_SHARED_LIBADD)
- AC_DEFINE(HAVE_SQLDATASOURCES,1,[ ])
-
ext_shared=$shared
-
PHP_EVAL_LIBLINE([$ODBC_LFLAGS $ODBC_LIBS], ODBC_SHARED_LIBADD)
- if test "$ODBC_TYPE" != "birdstep"; then
-
AC_DEFINE(HAVE_SQLDATASOURCES,1,[ ])
- fi
fi
AC_DEFINE(HAVE_UODBC,1,[ ])
Index: ext/odbc/php_odbc.h
RCS file: /repository/php-src/ext/odbc/php_odbc.h,v
retrieving revision 1.48.4.5
diff -u -r1.48.4.5 php_odbc.h
--- ext/odbc/php_odbc.h 14 Jul 2003 16:13:30 -0000 1.48.4.5
+++ ext/odbc/php_odbc.h 5 Apr 2005 22:25:01 -0000
@@ -33,7 +33,7 @@
extern zend_module_entry odbc_module_entry;
#define odbc_module_ptr &odbc_module_entry
-#if defined(HAVE_DBMAKER) || defined(PHP_WIN32) || defined(HAVE_IBMDB2) ||
defined(HAVE_UNIXODBC)
+#if defined(HAVE_DBMAKER) || defined(PHP_WIN32) || defined(HAVE_IBMDB2) ||
defined(HAVE_UNIXODBC) || defined(HAVE_BIRDSTEP)
define PHP_ODBC_HAVE_FETCH_HASH 1
#endif
"Derick Rethans" derick@php.net wrote in message
news:Pine.LNX.4.62.0504052355120.4513@localhost...
Hi all,
I would like to submit a patch for PHP 4 as well as PHP 5. The patch
will update PHP's UODBC
module to work with more recent versions of Birdstep Technology's RDM
Server
product. The files
affected are ext/odbc/config.m4 & ext/odbc/php_odbc.h. Below is the diff
output for the two files
based on the PHP 4 version, but the changes are the same for PHP 4 & PHP
Please do "cvs diff" in the source of the tree, and put that file
online. Makes things much easier to read...regards,
Derick--
Derick Rethans
http://derickrethans.nl | http://ez.no | http://xdebug.org
Shoot, I copied the wrong diff file, here is the correct diff, please ignore
the previous posting.
cvs diff: Diffing ext/odbc
Index: ext/odbc/config.m4
RCS file: /repository/php-src/ext/odbc/config.m4,v
retrieving revision 1.55.2.10
diff -u -r1.55.2.10 config.m4
--- ext/odbc/config.m4 18 Jan 2005 21:21:16 -0000 1.55.2.10
+++ ext/odbc/config.m4 5 Apr 2005 22:51:23 -0000
@@ -304,7 +304,21 @@
install directory, defaults to
/usr/local/birdstep.],
[
PHP_WITH_SHARED
- ac_birdstep_uname_s=
uname -s 2>/dev/null
- ac_birdstep_uname_p=
uname -p 2>/dev/null
- case $ac_birdstep_uname_s in
- AIX) AC_DEFINE(AIX,1,[ ]);;
- HP-UX) AC_DEFINE(HPUX,1,[ ]);;
- Linux) AC_DEFINE(LINUX,1,[ ]);;
- QNX) AC_DEFINE(NEUTRINO,1,[ ]);;
- SunOS)
-
if test "$ac_birdstep_uname_p" == "i386"; then
-
AC_DEFINE(ISOLARIS,1,[ ])
-
elif test "$ac_birdstep_uname_p" == "sparc"; then
-
AC_DEFINE(SOLARIS,1,[ ])
-
fi;;
- UnixWare) AC_DEFINE(UNIXWARE,1,[ ]);;
- esac
if test "$withval" != "no"; then
if test "$withval" = "yes"; then
ODBC_INCDIR=/usr/local/birdstep/include
@@ -316,7 +330,11 @@
ODBC_INCLUDE=-I$ODBC_INCDIR
ODBC_TYPE=birdstep
ODBC_LFLAGS=-L$ODBC_LIBDIR
- ODBC_LIBS="-lCadm -lCdict -lCenc -lCrdm -lCrpc -lCrdbc -lCrm -lCuapi -lutil"
-
if test -e "$ODBC_LIBDIR/libCrdbc32.so" -o -e
"$ODBC_LIBDIR/libCrdbc32.sl"; then -
ODBC_LIBS="-lCrdbc32 -lCadm32 -lCncp32 -lCrm32 -lCsql32 -lCdict32 -lCrdm32
-lCrpc32 -lutil" -
elif test -e "$ODBC_LIBDIR/libCrdbc.so" -o -e
"$ODBC_LIBDIR/libCrdbc.sl"; then -
ODBC_LIBS="-lCrdbc -lCadm -lCncp -lCrm -lCsql -lCdict -lCrdm -lCrpc -lutil"
-
fi
AC_DEFINE(HAVE_BIRDSTEP,1,[ ])AC_MSG_RESULT(yes)
Index: ext/odbc/php_odbc.h
===================================================================
RCS file: /repository/php-src/ext/odbc/php_odbc.h,v
retrieving revision 1.48.4.5
diff -u -r1.48.4.5 php_odbc.h
--- ext/odbc/php_odbc.h 14 Jul 2003 16:13:30 -0000 1.48.4.5
+++ ext/odbc/php_odbc.h 5 Apr 2005 22:51:23 -0000
@@ -33,7 +33,7 @@
extern zend_module_entry odbc_module_entry;
#define odbc_module_ptr &odbc_module_entry
-#if defined(HAVE_DBMAKER) || defined(PHP_WIN32) || defined(HAVE_IBMDB2) ||
defined(HAVE_UNIXODBC)
+#if defined(HAVE_DBMAKER) || defined(PHP_WIN32) || defined(HAVE_IBMDB2) ||
defined(HAVE_UNIXODBC) || defined(HAVE_BIRDSTEP)
define PHP_ODBC_HAVE_FETCH_HASH 1
#endif
"John Higgins" jhiggins@birdstep.com wrote in message
news:20050405223443.37890.qmail@lists.php.net...
Ok, done, is this better?
In config.m4 I am doing 2 things.
First, I am using "uname" to get the platform being compiled on, then
using this info to set the appropriate define needed by RDM Server, i.e.
LINUX, SOLARIS, etc.Secondly, because RDM Server library names changed when 64-bit support was
added, I added a test to figure out which libraries to link to.In php_odbc.h I simply added birdstep to the list of db's for which
PHP_ODBC_HAVE_FETCH_HASH needs to be define.....cvs diff: Diffing ext/odbc
Index: ext/odbc/config.m4RCS file: /repository/php-src/ext/odbc/config.m4,v
retrieving revision 1.55.2.10
diff -u -r1.55.2.10 config.m4
--- ext/odbc/config.m4 18 Jan 2005 21:21:16 -0000 1.55.2.10
+++ ext/odbc/config.m4 5 Apr 2005 22:25:01 -0000
@@ -1,11 +1,11 @@
dnl
-dnl $Id: config.m4,v 1.55.2.10 2005/01/18 21:21:16 tony2001 Exp $
+dnl $Id: config.m4,v 1.55.2.8 2003/11/25 08:08:30 sniper Exp $
dnldnl
dnl Figure out which library file to link with for the Solid support.
dnl
-AC_DEFUN([AC_FIND_SOLID_LIBS],[
+AC_DEFUN(AC_FIND_SOLID_LIBS,[
AC_MSG_CHECKING([Solid library file])
ac_solid_uname_r=uname -r 2>/dev/null
ac_solid_uname_s=uname -s 2>/dev/null
@@ -71,7 +71,7 @@
dnl
dnl Figure out which library file to link with for the Empress support.
dnl
-AC_DEFUN([AC_FIND_EMPRESS_LIBS],[
+AC_DEFUN(AC_FIND_EMPRESS_LIBS,[
AC_MSG_CHECKING([Empress library file])
ODBC_LIBS=echo $1/libempodbccl.so | cut -d' ' -f1
if test ! -f $ODBC_LIBS; then
@@ -80,7 +80,7 @@
AC_MSG_RESULT(echo $ODBC_LIBS | sed -e 's!.*/!!'
)
])-AC_DEFUN([AC_FIND_EMPRESS_BCS_LIBS],[
+AC_DEFUN(AC_FIND_EMPRESS_BCS_LIBS,[
AC_MSG_CHECKING([Empress local access library file])
ODBCBCS_LIBS=echo $1/libempodbcbcs.a | cut -d' ' -f1
if test ! -f $ODBCBCS_LIBS; then
@@ -194,15 +194,6 @@
ODBC_INCDIR=$withval/include
ODBC_LIBDIR=$withval/lib
fi
- if ! test -f "$ODBC_INCDIR/sqlcli1.h"; then
AC_MSG_ERROR([IBM DB2 header files not found])
- fi
- if ! test -f "$ODBC_LIBDIR/libdb2.so"; then
AC_MSG_ERROR([IBM DB2 required libraries not found])
- fi
- ODBC_INCLUDE=-I$ODBC_INCDIR
ODBC_LFLAGS=-L$ODBC_LIBDIR
ODBC_TYPE=db2
@@ -304,7 +295,21 @@
install directory, defaults to
/usr/local/birdstep.],
[
PHP_WITH_SHARED
- ac_birdstep_uname_s=
uname -s 2>/dev/null
- ac_birdstep_uname_p=
uname -p 2>/dev/null
- case $ac_birdstep_uname_s in
- AIX) AC_DEFINE(AIX,1,[ ]);;
- HP-UX) AC_DEFINE(HPUX,1,[ ]);;
- Linux) AC_DEFINE(LINUX,1,[ ]);;
- QNX) AC_DEFINE(NEUTRINO,1,[ ]);;
- SunOS)
if test "$ac_birdstep_uname_p" == "i386"; then
AC_DEFINE(ISOLARIS,1,[ ])
elif test "$ac_birdstep_uname_p" == "sparc"; then
AC_DEFINE(SOLARIS,1,[ ])
fi;;
- UnixWare) AC_DEFINE(UNIXWARE,1,[ ]);;
- esac
if test "$withval" != "no"; then
if test "$withval" = "yes"; then
ODBC_INCDIR=/usr/local/birdstep/include
@@ -316,9 +321,12 @@
ODBC_INCLUDE=-I$ODBC_INCDIR
ODBC_TYPE=birdstep
ODBC_LFLAGS=-L$ODBC_LIBDIR
ODBC_LIBS="-lCadm -lCdict -lCenc -lCrdm -lCrpc -lCrdbc -lCrm -lCuapi -lutil"
- if test -e "$ODBC_LIBDIR/libCrdbc32.so" -o -e
"$ODBC_LIBDIR/libCrdbc32.sl"; thenODBC_LIBS="-lCrdbc32 -lCadm32 -lCncp32 -lCrm32 -lCsql32 -lCdict32 -lCrdm32
-lCrpc32 -lutil"
- elif test -e "$ODBC_LIBDIR/libCrdbc.so" -o -e
"$ODBC_LIBDIR/libCrdbc.sl"; thenODBC_LIBS="-lCrdbc -lCadm -lCncp -lCrm -lCsql -lCdict -lCrdm -lCrpc -lutil"
- fi
AC_DEFINE(HAVE_BIRDSTEP,1,[ ])
- AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
@@ -512,9 +520,11 @@if test -n "$ODBC_TYPE"; then
if test "$ODBC_TYPE" != "dbmaker"; then
- ext_shared=$shared
- PHP_EVAL_LIBLINE([$ODBC_LFLAGS $ODBC_LIBS], ODBC_SHARED_LIBADD)
- AC_DEFINE(HAVE_SQLDATASOURCES,1,[ ])
ext_shared=$shared
PHP_EVAL_LIBLINE([$ODBC_LFLAGS $ODBC_LIBS], ODBC_SHARED_LIBADD)
- if test "$ODBC_TYPE" != "birdstep"; then
AC_DEFINE(HAVE_SQLDATASOURCES,1,[ ])
- fi
fiAC_DEFINE(HAVE_UODBC,1,[ ])
Index: ext/odbc/php_odbc.hRCS file: /repository/php-src/ext/odbc/php_odbc.h,v
retrieving revision 1.48.4.5
diff -u -r1.48.4.5 php_odbc.h
--- ext/odbc/php_odbc.h 14 Jul 2003 16:13:30 -0000 1.48.4.5
+++ ext/odbc/php_odbc.h 5 Apr 2005 22:25:01 -0000
@@ -33,7 +33,7 @@
extern zend_module_entry odbc_module_entry;
#define odbc_module_ptr &odbc_module_entry-#if defined(HAVE_DBMAKER) || defined(PHP_WIN32) || defined(HAVE_IBMDB2)
|| defined(HAVE_UNIXODBC)
+#if defined(HAVE_DBMAKER) || defined(PHP_WIN32) || defined(HAVE_IBMDB2)
|| defined(HAVE_UNIXODBC) || defined(HAVE_BIRDSTEP)define PHP_ODBC_HAVE_FETCH_HASH 1
#endif
"Derick Rethans" derick@php.net wrote in message
news:Pine.LNX.4.62.0504052355120.4513@localhost...Hi all,
I would like to submit a patch for PHP 4 as well as PHP 5. The
patch
will update PHP's UODBC
module to work with more recent versions of Birdstep Technology's RDM
Server
product. The files
affected are ext/odbc/config.m4 & ext/odbc/php_odbc.h. Below is the
diff
output for the two files
based on the PHP 4 version, but the changes are the same for PHP 4 & PHP
Please do "cvs diff" in the source of the tree, and put that file
online. Makes things much easier to read...regards,
Derick--
Derick Rethans
http://derickrethans.nl | http://ez.no | http://xdebug.org