Edit report at http://bugs.php.net/bug.php?id=53107&edit=1

 ID:                 53107
 Comment by:         mamfelt at gmail dot com
 Reported by:        mamfelt at gmail dot com
 Summary:            undeclared identifer: strcasecmp not always in
                     string.h
 Status:             Open
 Type:               Bug
 Package:            Compile Failure
 Operating System:   AIX 4.3.3
 PHP Version:        5.2.14
 Block user comment: N

 New Comment:

Sorry, dont know how to make a patch - keeps saying it is text/lisp or
v.v.



My suggestion:

in file add ext/zip/lib/zip_name_locate.c near line 34



^L



#include <string.h>

#ifdef AIX433

#include <strings.h>

#endif



and add -DAIX433 to CFLAGS before starting ./configure (if it is not
done automaically already)


Previous Comments:
------------------------------------------------------------------------
[2010-10-19 22:50:09] mamfelt at gmail dot com

Description:
------------
# ./configure ... --enable-zip ...



# make



/data/prj/php-5.2.14/ext/zip/lib/zip_name_locate.c: In function
`_zip_name_locate':

/data/prj/php-5.2.14/ext/zip/lib/zip_name_locate.c:67: error:
`strcasecmp' undeclared (first use in this function)

/data/prj/php-5.2.14/ext/zip/lib/zip_name_locate.c:67: error: (Each
undeclared identifier is reported only once

/data/prj/php-5.2.14/ext/zip/lib/zip_name_locate.c:67: error: for each
function it appears in.)

make: *** [ext/zip/lib/zip_name_locate.lo] Error 1

Test script:
---------------
PATCH? or TEST?

This is only with AIX433. AIX 5.1 and beyond has strcasecmp defined in
<string.h>. I do not know if ./configure would add an AIX433 somewhere
to make it automatic to add strings.h.



I am able to fix it with:

File: ext/zip/lib/zip_name_locate.c

   +34  ^L

   +35

   +36  #include <string.h>

   +37  #ifdef _AIX

   +38  /* for AIX433 actually! */

   +39  #include <strings.h>

   +40  #endif

   +41 

   +42  #include "zipint.h"

   +43 

   +44  ^L

Expected result:
----------------
successful build.

Actual result:
--------------
/data/prj/php-5.2.14/ext/zip/lib/zip_name_locate.c: In function
`_zip_name_locate':

/data/prj/php-5.2.14/ext/zip/lib/zip_name_locate.c:67: error:
`strcasecmp' undeclared (first use in this function)

/data/prj/php-5.2.14/ext/zip/lib/zip_name_locate.c:67: error: (Each
undeclared identifier is reported only once

/data/prj/php-5.2.14/ext/zip/lib/zip_name_locate.c:67: error: for each
function it appears in.)

make: *** [ext/zip/lib/zip_name_locate.lo] Error 1


------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=53107&edit=1

Reply via email to