php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #31019 Logic error in ext/mssql/config.m4
Submitted: 2004-12-08 12:35 UTC Modified: 2004-12-08 20:04 UTC
From: adamg at pld-linux dot org Assigned: fmk
Status: Closed Package: Compile Failure
PHP Version: 4.3.10RC1 and 5CVS OS: Irrelevant
Private report: No CVE-ID:
 [2004-12-08 12:35 UTC] adamg at pld-linux dot org
Description:
------------
As of 4.3.10RC1 following line was introduced in ext/mssql/config.m4

if test ! -r "$FREETDS_INSTALLATION_DIR/lib/libtds.a" || test ! -r "$F        REETDS_INSTALLATION_DIR/lib/libtds.so"; then

Which, translated into human, means:
"IF either libtds.a OR libtds.so is not readable by, fail"

Which is a nonsense, since it requires presence of both of the files - otherwise configure script will refuse to compile. 

Obviously the || should be changed to &&.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-12-08 12:39 UTC] adamg at pld-linux dot org
As of 4.3.10RC1 following line was introduced in ext/mssql/config.m4

if test ! -r "$FREETDS_INSTALLATION_DIR/lib/libtds.a" || test ! -r "$F  
     REETDS_INSTALLATION_DIR/lib/libtds.so"; then

Which, translated into human, means:
"IF either libtds.a OR libtds.so is not readable by, fail"

Which is a nonsense, since it requires presence of both of the files -
otherwise configure script will refuse to compile. 

Obviously the || should be changed to &&.

Following trivial patchfixes that issue. 

--- php-4.3.10RC1/ext/mssql/config.m4~  2004-12-08 11:52:30.205750088 +0100
+++ php-4.3.10RC1/ext/mssql/config.m4   2004-12-08 11:52:51.807466128 +0100
@@ -32,7 +32,7 @@
     fi
   fi  
 
-  if test ! -r "$FREETDS_INSTALLATION_DIR/lib/libtds.a" || test ! -r "$FREETDS_INSTALLATION_DIR/lib/libtds.so"; then
+  if test ! -r "$FREETDS_INSTALLATION_DIR/lib/libtds.a" && test ! -r "$FREETDS_INSTALLATION_DIR/lib/libtds.so"; then
      AC_MSG_ERROR(Could not find $FREETDS_INSTALLATION_DIR/lib/libtds.[a|so])
   fi
 [2004-12-08 20:04 UTC] fmk@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Wed Apr 23 07:02:14 2014 UTC