]> granicus.if.org Git - php/commitdiff
ext/standard/datetime.c
authorAnantha Kesari H Y <hyanantha@php.net>
Wed, 27 Jul 2005 11:22:36 +0000 (11:22 +0000)
committerAnantha Kesari H Y <hyanantha@php.net>
Wed, 27 Jul 2005 11:22:36 +0000 (11:22 +0000)
Removed redundant NEW_LIBC checks

ext/standard/head.c
Removed redundant inclusion of headers

ext/standard/image.c
Removed redundant inclusion of headers

ext/standard/pageinfo.c
Removed redundant CLIB_STAT_CHECK.  BG(page_mtime) was giving nano seconds portion out of timespec corrected to seconds.

ext/standard/math.c
Not to hardcode inability as much as possible, in future NetWare LibC SDK might have asinh that time autoconf can make this function available.

ext/standard/filestat.c
Fixed the typo of accessing the nano seconds from a timer_spec to seconds.

--Kamesh

ext/standard/datetime.c
ext/standard/filestat.c
ext/standard/head.c
ext/standard/image.c
ext/standard/math.c
ext/standard/pageinfo.c

index f5736ca55620370506d41bec7cbdb1974acce5fa..a8359024f46e482e7be2d33388f90e6cf7d5c86f 100644 (file)
@@ -52,7 +52,7 @@ char *day_short_names[] = {
 };
 
 #if !defined(HAVE_TM_ZONE) && !defined(_TIMEZONE) && !defined(HAVE_DECLARED_TIMEZONE)
-#if defined(NETWARE) && defined(NEW_LIBC)
+#ifdef NETWARE
 #define timezone    _timezone   /* timezone is called '_timezone' in new version of LibC */
 #endif
 extern time_t timezone;
index 6a11053de7dc819b2ab4a5bf8f0834f82e4521db..e5e4b696c68870d7f9735861deb96628acb89a34 100644 (file)
@@ -678,19 +678,19 @@ static void php_stat(const char *filename, php_stat_len filename_length, int typ
                RETURN_LONG((long)BG(sb).st_gid);
        case FS_ATIME:
 #ifdef NETWARE
-               RETURN_LONG((long)(BG(sb).st_atime).tv_nsec);
+               RETURN_LONG((long)(BG(sb).st_atime).tv_sec);
 #else
                RETURN_LONG((long)BG(sb).st_atime);
 #endif
        case FS_MTIME:
 #ifdef NETWARE
-               RETURN_LONG((long)(BG(sb).st_mtime).tv_nsec);
+               RETURN_LONG((long)(BG(sb).st_mtime).tv_sec);
 #else
        RETURN_LONG((long)BG(sb).st_mtime);
 #endif
        case FS_CTIME:
 #ifdef NETWARE
-               RETURN_LONG((long)(BG(sb).st_ctime).tv_nsec);
+               RETURN_LONG((long)(BG(sb).st_ctime).tv_sec);
 #else
                RETURN_LONG((long)BG(sb).st_ctime);
 #endif
@@ -769,9 +769,9 @@ static void php_stat(const char *filename, php_stat_len filename_length, int typ
 #endif
                MAKE_LONG_ZVAL_INCREF(stat_size, stat_sb->st_size);
 #ifdef NETWARE
-               MAKE_LONG_ZVAL_INCREF(stat_atime, (stat_sb->st_atime).tv_nsec);
-               MAKE_LONG_ZVAL_INCREF(stat_mtime, (stat_sb->st_mtime).tv_nsec);
-               MAKE_LONG_ZVAL_INCREF(stat_ctime, (stat_sb->st_ctime).tv_nsec);
+               MAKE_LONG_ZVAL_INCREF(stat_atime, (stat_sb->st_atime).tv_sec);
+               MAKE_LONG_ZVAL_INCREF(stat_mtime, (stat_sb->st_mtime).tv_sec);
+               MAKE_LONG_ZVAL_INCREF(stat_ctime, (stat_sb->st_ctime).tv_sec);
 #else
                MAKE_LONG_ZVAL_INCREF(stat_atime, stat_sb->st_atime);
                MAKE_LONG_ZVAL_INCREF(stat_mtime, stat_sb->st_mtime);
index 3abf3f440562f9597367d4779ce2c21181318990..0a45191496bb60624f31a12b89ef5c463bba13be 100644 (file)
 /* $Id$ */
 
 #include <stdio.h>
-
-#if defined(NETWARE) && !defined(NEW_LIBC)
-#include <sys/socket.h>
-#endif
-
 #include "php.h"
 #include "ext/standard/php_standard.h"
 #include "SAPI.h"
index 4849fff715367b85e14fdcc9852765cba0d8d969..fbfe5ab5bf8cd15ab139db70ff47e9a525aee25f 100644 (file)
@@ -21,9 +21,6 @@
 
 #include "php.h"
 #include <stdio.h>
-#if defined(NETWARE) && !defined(NEW_LIBC)
-#include <sys/socket.h>
-#endif
 #if HAVE_FCNTL_H
 #include <fcntl.h>
 #endif
index 320518ad3734e33e7999aa3f20485d92664e249c..e29b5f48fc143470c09fd6c81506856809c3aaf6 100644 (file)
@@ -329,7 +329,7 @@ PHP_FUNCTION(tanh)
 
 /* }}} */
 
-#if !defined(PHP_WIN32) && !defined(NETWARE)
+#ifndef PHP_WIN32
 #ifdef HAVE_ASINH
 /* {{{ proto float asinh(float number)
    Returns the inverse hyperbolic sine of the number, i.e. the value whose hyperbolic sine is number */
@@ -380,7 +380,7 @@ PHP_FUNCTION(atanh)
 }
 /* }}} */
 #endif /* HAVE_ATANH */
-#endif /* !defined(PHP_WIN32) && !defined(NETWARE) */
+#endif /* ifndf PHP_WIN32 */
 
 
 /* {{{ proto float pi(void)
index 7c83323741b4239e8fec0650f7bb5f5b720c72d5..3c91a14c77f6490dc6064948bfbae2cca049559c 100644 (file)
  */
 PHPAPI void php_statpage(TSRMLS_D)
 {
-#if defined(NETWARE) && defined(CLIB_STAT_PATCH)
-       struct stat_libc *pstat;
-#else
        struct stat *pstat;
-#endif
 
        pstat = sapi_get_stat(TSRMLS_C);
 
@@ -73,7 +69,7 @@ PHPAPI void php_statpage(TSRMLS_D)
                        BG(page_gid)   = pstat->st_gid;
                        BG(page_inode) = pstat->st_ino;
 #ifdef NETWARE
-                       BG(page_mtime) = (pstat->st_mtime).tv_nsec;
+                       BG(page_mtime) = (pstat->st_mtime).tv_sec;
 #else
                        BG(page_mtime) = pstat->st_mtime;
 #endif