com php-src: Re-fixed bug #60901 (Improve "tail" syntax for AIX installation): ext/oci8/config.m4 ext/oci8/package.xml ext/oci8/php_oci8.h
| From: | Christopher Jones | Date: | Mon, 22 Oct 2012 05:17:47 +0000 |
| Subject: | com php-src: Re-fixed bug #60901 (Improve "tail" syntax for AIX installation): ext/oci8/config.m4 ext/oci8/package.xml ext/oci8/php_oci8.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-70442@lists.php.net to get a copy of this message | ||
Commit: dbb72de6c75796803ed6ed103763a12eebc9e78e
Author: Christopher Jones <sixd@php.net> Sun, 21 Oct 2012 22:17:47 -0700
Parents: 7293cb72509350a4ede860c6383ebb2c11d93d39
Branches: PHP-5.3 PHP-5.4 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=dbb72de6c75796803ed6ed103763a12eebc9e78e
Log:
Re-fixed bug #60901 (Improve "tail" syntax for AIX installation)
The original fix broke Solaris installs of OCI8
Bugs:
https://bugs.php.net/60901
Changed paths:
M ext/oci8/config.m4
M ext/oci8/package.xml
M ext/oci8/php_oci8.h
Diff:
diff --git a/ext/oci8/config.m4 b/ext/oci8/config.m4
index 976eb9e..34ae76c 100644
--- a/ext/oci8/config.m4
+++ b/ext/oci8/config.m4
@@ -8,6 +8,13 @@ else
PHP_OCI8_SED="$SED";
fi
+PHP_OCI8_TAIL1=
echo a | tail -n1 2>/dev/null
+if test "$PHP_OCI8_TAIL1" = "a"; then
+ PHP_OCI8_TAIL1="tail -n1"
+else
+ PHP_OCI8_TAIL1="tail -1"
+fi
+
AC_DEFUN([PHP_OCI_IF_DEFINED],[
old_CPPFLAGS=$CPPFLAGS
CPPFLAGS=$3
@@ -49,8 +56,8 @@ AC_DEFUN([AC_OCI8_CHECK_LIB_DIR],[
AC_DEFUN([AC_OCI8IC_VERSION],[
AC_MSG_CHECKING([Oracle Instant Client library version compatibility])
OCI8_LCS_BASE=$PHP_OCI8_INSTANT_CLIENT/libclntsh.$SHLIB_SUFFIX_NAME
- OCI8_LCS=ls $OCI8_LCS_BASE.*.1 2> /dev/null | tail -n1 # Oracle 10g, 11g etc
- OCI8_NNZ=ls $PHP_OCI8_INSTANT_CLIENT/libnnz*.$SHLIB_SUFFIX_NAME 2> /dev/null | tail
-n1
+ OCI8_LCS=ls $OCI8_LCS_BASE.*.1 2> /dev/null | $PHP_OCI8_TAIL1 # Oracle 10g, 11g
etc
+ OCI8_NNZ=ls $PHP_OCI8_INSTANT_CLIENT/libnnz*.$SHLIB_SUFFIX_NAME 2> /dev/null |
$PHP_OCI8_TAIL1
if test -f "$OCI8_NNZ" && test -f "$OCI8_LCS"; then
if test ! -f "$OCI8_LCS_BASE"; then
AC_MSG_ERROR([Link from $OCI8_LCS_BASE to $OCI8_LCS_BASE.*.1 not found])
@@ -65,7 +72,7 @@ AC_DEFUN([AC_OCI8IC_VERSION],[
AC_DEFUN([AC_OCI8_ORACLE_VERSION],[
AC_MSG_CHECKING([Oracle library version compatibility])
OCI8_LCS_BASE=$OCI8_DIR/$OCI8_LIB_DIR/libclntsh.$SHLIB_SUFFIX_NAME
- OCI8_LCS=ls $OCI8_LCS_BASE.*.1 2> /dev/null | tail -n1 # Oracle 10g, 11g etc
+ OCI8_LCS=ls $OCI8_LCS_BASE.*.1 2> /dev/null | $PHP_OCI8_TAIL1 # Oracle 10g, 11g
etc
if test -s "$OCI8_DIR/orainst/unix.rgs"; then
OCI8_ORACLE_VERSION=grep '"ocommon"' $OCI8_DIR/orainst/unix.rgs |
$PHP_OCI8_SED 's/[ ][ ]*/:/g' | cut -d: -f 6 | cut -c 2-4
test -z "$OCI8_ORACLE_VERSION" && OCI8_ORACLE_VERSION=7.3
@@ -278,7 +285,7 @@ if test "$PHP_OCI8" != "no"; then
dnl user must pass in the library directory. But on Linux we default
dnl to the most recent version in /usr/lib which is where the Oracle
dnl Instant Client RPM gets installed.
- PHP_OCI8_INSTANT_CLIENT=ls -d
/usr/lib/oracle/*/client${PHP_OCI8_IC_LIBDIR_SUFFIX}/lib/libclntsh.* 2> /dev/null | tail -n1 |
$PHP_OCI8_SED -e 's#/libclntsh[^/]*##'
+ PHP_OCI8_INSTANT_CLIENT=ls -d
/usr/lib/oracle/*/client${PHP_OCI8_IC_LIBDIR_SUFFIX}/lib/libclntsh.* 2> /dev/null |
$PHP_OCI8_TAIL1 | $PHP_OCI8_SED -e 's#/libclntsh[^/]*##'
if test -z "$PHP_OCI8_INSTANT_CLIENT"; then
AC_MSG_ERROR([Oracle Instant Client directory
/usr/lib/oracle/.../client${PHP_OCI8_IC_LIBDIR_SUFFIX}/lib libraries not found. Try
--with-oci8=instantclient,DIR])
fi
diff --git a/ext/oci8/package.xml b/ext/oci8/package.xml
index 63ece6f..00566b1 100644
--- a/ext/oci8/package.xml
+++ b/ext/oci8/package.xml
@@ -37,8 +37,8 @@ http://pear.php.net/dtd/package-2.0.xsd">
<time>12:00:00</time>
<version>
- <release>1.4.8</release>
- <api>1.4.8</api>
+ <release>1.4.9</release>
+ <api>1.4.9</api>
</version>
<stability>
<release>stable</release>
@@ -46,9 +46,7 @@ http://pear.php.net/dtd/package-2.0.xsd">
</stability>
<license uri="http://www.php.net/license">PHP</license>
<notes>
- Fixed bug #63307 (Unused variable in oci8.c)
- Fixed bug #63265 (Add ORA-00028 to the PHP_OCI_HANDLE_ERROR macro)
- Fixed bug #60901 (Improve "tail" syntax for AIX installation)
+ Re-fixed bug #60901 (Improve "tail" syntax for AIX installation)
</notes>
<contents>
<dir name="/">
@@ -414,6 +412,23 @@ http://pear.php.net/dtd/package-2.0.xsd">
<release>
<version>
+ <release>1.4.8</release>
+ <api>1.4.8</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <license uri="http://www.php.net/license">PHP</license>
+ <notes>
+ Fixed bug #63307 (Unused variable in oci8.c)
+ Fixed bug #63265 (Add ORA-00028 to the PHP_OCI_HANDLE_ERROR macro)
+ Fixed bug #60901 (Improve "tail" syntax for AIX installation)
+ </notes>
+</release>
+
+<release>
+ <version>
<release>1.4.7</release>
<api>1.4.7</api>
</version>
diff --git a/ext/oci8/php_oci8.h b/ext/oci8/php_oci8.h
index efe8665..4ee8e8e 100644
--- a/ext/oci8/php_oci8.h
+++ b/ext/oci8/php_oci8.h
@@ -46,7 +46,7 @@
*/
#undef PHP_OCI8_VERSION
#endif
-#define PHP_OCI8_VERSION "1.4.8"
+#define PHP_OCI8_VERSION "1.4.9"
extern zend_module_entry oci8_module_entry;
#define phpext_oci8_ptr &oci8_module_entry