[PHP-DEV] PHP 4.0 Bug #4325: Compile fails at microtime.c:83 From: hongtao.zhu <email protected>
Date: 05/04/00

From: hongtao.zhu <email protected>
Operating system: dgux R4.20MU06
PHP version: 4.0 Latest CVS (04/05/2000)
PHP Bug Type: Compile Failure
Bug description: Compile fails at microtime.c:83

Make gave following error messages:

gcc -DHAVE_CONFIG_H -I. -I/workspace/is/apache_src/php4-200005040645/ext/standard/ -I/workspace/is/apache_src/php4-200005040645 -I/workspace/is/apache_src/php4-200005040645/Zend -I/workspace/is/apache_src/php4-200005040645 -I/usr/informix-dsa/incl/esql -DXML_BYTE_ORDER=21 -g -O2 -I/usr/informix-dsa/incl/esql -Wall -c microtime.c && touch microtime.lo
microtime.c: In function `php_if_gettimeofday':
microtime.c:83: structure has no member named `tz_minuteswest'
microtime.c:84: structure has no member named `tz_dsttime'
make[3]: *** [microtime.lo] Error 1
make[3]: Leaving directory `/workspace/is/apache_src/php4-200005040645/ext/standard'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/workspace/is/apache_src/php4-200005040645/ext/standard'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/workspace/is/apache_src/php4-200005040645/ext'
make: *** [all-recursive] Error 1

This is the code in microtime.c
------------------------
line 75: struct timezone tz;
line 83: add_assoc_long(return_value, "minuteswest", tz.tz_minuteswest);
line 84: add_assoc_long(return_value, "dsttime", tz.tz_dsttime);
------------------------
Timezone is defined in /usr/include/sys/time.h as
------------------------
struct timezone
        /*>--------*/
    {
#if __bsd_tod || defined(_KERNEL_SOURCE)
    int tz_minuteswest;
    int tz_dsttime;
#else
    int __hide__tz_minuteswest;
    int __hide__tz_dsttime;
#endif
    };

/*.Description[=--------------------------------------------------------
**
** %par()
** The timezone structure.
**
** %par()
** The members are hidden unless BSD-style time-of-day calls are
** desired. We recommend use of the facilities described in ctime(3C).
---------------------------

Any one knows how to fix it? Thanks.

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>