From:             [EMAIL PROTECTED]
Operating system: AIX 4.3.3ML10
PHP version:      4CVS-2002-11-12
PHP Bug Type:     Compile Failure
Bug description:  A handful of #ifdef's to compile under AIX using xlC

Please consider the changes below to make the latest snapshot compile using
xlc invoked as cc_r:

root@limosa$ diff -c ext/mbstring/mbfilter.h* 
*** ext/mbstring/mbfilter.h     Tue Nov 12 17:15:20 2002
--- ext/mbstring/mbfilter.h~    Sun Nov 10 18:37:22 2002
***************
*** 464,473 ****
  const char *
  mbfl_identify_encoding_name(mbfl_string *string, enum mbfl_no_encoding
*elist, int eliztsz TSRMLS_DC);
  
! #ifndef _AIX
! const
! #endif
!  enum mbfl_no_encoding
  mbfl_identify_encoding_no(mbfl_string *string, enum mbfl_no_encoding
*elist, int eliztsz TSRMLS_DC);
  
  /*
--- 464,470 ----
  const char *
  mbfl_identify_encoding_name(mbfl_string *string, enum mbfl_no_encoding
*elist, int eliztsz TSRMLS_DC);
  
! const enum mbfl_no_encoding
  mbfl_identify_encoding_no(mbfl_string *string, enum mbfl_no_encoding
*elist, int eliztsz TSRMLS_DC);
  
  /*
root@limosa$ diff -c ext/mbstring/mbfilter.c*
*** ext/mbstring/mbfilter.c     Tue Nov 12 17:16:20 2002
--- ext/mbstring/mbfilter.c~    Sun Nov 10 18:37:22 2002
***************
*** 7557,7566 ****
        }
  }
  
! #ifndef _AIX
! const 
! #endif
! enum mbfl_no_encoding
  mbfl_identify_encoding_no(mbfl_string *string, enum mbfl_no_encoding
*elist, int eliztsz TSRMLS_DC)
  {
        const mbfl_encoding *encoding;
--- 7557,7563 ----
        }
  }
  
! const enum mbfl_no_encoding
  mbfl_identify_encoding_no(mbfl_string *string, enum mbfl_no_encoding
*elist, int eliztsz TSRMLS_DC)
  {
        const mbfl_encoding *encoding;
root@limosa$ diff -c ext/mysql/libmysql/my_tempnam.c*
*** ext/mysql/libmysql/my_tempnam.c     Tue Nov 12 17:19:22 2002
--- ext/mysql/libmysql/my_tempnam.c~    Fri Aug 23 17:56:34 2002
***************
*** 96,116 ****
    old_env=(char**)environ;
    if (dir)
    {                   /* Don't use TMPDIR if dir is given */
- #ifndef _AIX
      ((char **)environ)=(char**)temp_env;              /* May give
warning */
- #else
-     environ=(char**)temp_env;         /* May give warning */
- #endif
      temp_env[0]=0;
    }
  #endif
    res=tempnam((char*) dir,(my_string) pfx); /* Use stand. dir with
prefix */
  #ifndef OS2
- #ifndef _AIX
    ((char**)environ)=(char**)old_env;          /* May give warning */
- #else
-   environ=(char**)old_env;            /* May give warning */
- #endif
  #endif
    if (!res)
      DBUG_PRINT("error",("Got error: %d from tempnam",errno));
--- 96,108 ----
root@limosa$ diff -c ext/standard/file.c*
*** ext/standard/file.c Tue Nov 12 17:23:29 2002
--- ext/standard/file.c~        Sun Nov 10 18:37:36 2002
***************
*** 870,882 ****
  
        zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(options), &pos);
        while (SUCCESS ==
zend_hash_get_current_data_ex(Z_ARRVAL_P(options), (void**)&wval, &pos))
{
!               if (HASH_KEY_IS_STRING ==
zend_hash_get_current_key_ex(Z_ARRVAL_P(options), &wkey, &wkey_len,
(unsigned int *)NULL, 0, &pos)
                        && Z_TYPE_PP(wval) == IS_ARRAY) {
  
                     
zend_hash_internal_pointer_reset_ex(Z_ARRVAL_PP(wval), &opos);
                      while (SUCCESS ==
zend_hash_get_current_data_ex(Z_ARRVAL_PP(wval), (void**)&oval, &opos)) {
  
!                       if (HASH_KEY_IS_STRING ==
zend_hash_get_current_key_ex(Z_ARRVAL_PP(wval), &okey, &okey_len,
(unsigned int *)NULL, 0, &opos)) {
                                ZVAL_ADDREF(*oval);
                                php_stream_context_set_option(context,
wkey, okey, *oval);
                        }
--- 870,882 ----
  
        zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(options), &pos);
        while (SUCCESS ==
zend_hash_get_current_data_ex(Z_ARRVAL_P(options), (void**)&wval, &pos))
{
!               if (HASH_KEY_IS_STRING ==
zend_hash_get_current_key_ex(Z_ARRVAL_P(options), &wkey, &wkey_len, NULL,
0, &pos)
                        && Z_TYPE_PP(wval) == IS_ARRAY) {
  
                     
zend_hash_internal_pointer_reset_ex(Z_ARRVAL_PP(wval), &opos);
                      while (SUCCESS ==
zend_hash_get_current_data_ex(Z_ARRVAL_PP(wval), (void**)&oval, &opos)) {
  
!                       if (HASH_KEY_IS_STRING ==
zend_hash_get_current_key_ex(Z_ARRVAL_PP(wval), &okey, &okey_len, NULL, 0,
&opos)) {
                                ZVAL_ADDREF(*oval);
                                php_stream_context_set_option(context,
wkey, okey, *oval);
                        }
root@limosa$ diff -c ext/standard/php_image.h*
*** ext/standard/php_image.h    Tue Nov 12 17:26:44 2002
--- ext/standard/php_image.h~   Mon Jun 24 21:36:26 2002
***************
*** 54,63 ****
  
  PHPAPI int php_getimagetype(php_stream *stream, char *filetype
TSRMLS_DC);
  
! PHPAPI
! #ifndef _AIX
!  const
! #endif
!  char * php_image_type_to_mime_type(int image_type);
  
  #endif /* PHP_IMAGE_H */
--- 54,59 ----
  
  PHPAPI int php_getimagetype(php_stream *stream, char *filetype
TSRMLS_DC);
  
! PHPAPI const char * php_image_type_to_mime_type(int image_type);
  
  #endif /* PHP_IMAGE_H */
root@limosa$ diff -c main/SAPI.c*
*** main/SAPI.c Tue Nov 12 17:30:09 2002
--- main/SAPI.c~      Sun Nov 10 18:37:40 2002
***************
*** 355,361 ****
                efree(SG(request_info).post_data);
        }  else       if (SG(server_context)) {
                if(sapi_module.read_post) { 
!                     /* make sure we've consumed all request input data
*/
                      char dummy[SAPI_POST_BLOCK_SIZE];
                      while(sapi_module.read_post(dummy, sizeof(dummy)-1
TSRMLS_CC) > 0) {
                        /* empty loop body */
--- 355,361 ----
                efree(SG(request_info).post_data);
        }  else       if (SG(server_context)) {
                if(sapi_module.read_post) { 
!                     // make sure we've consumed all request input data
                      char dummy[SAPI_POST_BLOCK_SIZE];
                      while(sapi_module.read_post(dummy, sizeof(dummy)-1
TSRMLS_CC) > 0) {
                        /* empty loop body */
root@limosa$
-- 
Edit bug report at http://bugs.php.net/?id=20395&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=20395&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=20395&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=20395&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=20395&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=20395&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=20395&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=20395&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=20395&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=20395&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=20395&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=20395&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=20395&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=20395&r=isapi

Reply via email to