]> granicus.if.org Git - php/commitdiff
Fixes for building with vs.net 2005.
authorWez Furlong <wez@php.net>
Wed, 14 Dec 2005 02:01:13 +0000 (02:01 +0000)
committerWez Furlong <wez@php.net>
Wed, 14 Dec 2005 02:01:13 +0000 (02:01 +0000)
main/win95nt.h
win32/build/config.w32
win32/build/config.w32.h.in

index ff24f8e5f06ab7347ed7de068b4c973b13a834ed..d481edd3959960cdff50e8893048eaea13205983 100644 (file)
@@ -46,7 +46,9 @@ typedef char * caddr_t;
 #define rmdir(a)       _rmdir(a)
 #define getpid         _getpid
 #define php_sleep(t)   Sleep(t*1000)
-#define getcwd(a, b)           _getcwd(a, b)
+#ifndef getcwd
+# define getcwd(a, b)          _getcwd(a, b)
+#endif
 #define off_t          _off_t
 typedef unsigned int uint;
 typedef unsigned long ulong;
index 7cdb79ad9f6ff5fc1a20e1498fb6ae028c00dd8e..031f1e2abecdd5f3af123d4f41cf24bc0352761c 100644 (file)
@@ -97,8 +97,9 @@ if (VCVERS < 14) {
 
 if (VCVERS >= 14) {
        // fun stuff: MS deprecated ANSI stdio and similar functions
-       // disable annoying warnings
-       ADD_FLAG('CFLAGS', ' /wd4996 ');
+       // disable annoying warnings.  In addition, time_t defaults
+       // to 64-bit.  Ask for 32-bit.
+       ADD_FLAG('CFLAGS', ' /wd4996 /D_USE_32BIT_TIME_T=1 ');
 
        if (PHP_DEBUG == "yes") {
                // Set some debug/release specific options
index b6994c6113c74551d1cd13b360c541d1b7067042..efcc1ba40abcb63da4951ee247648c02ac7ab40f 100644 (file)
 #undef HAVE_ATOF_ACCEPTS_NAN
 #undef HAVE_ATOF_ACCEPTS_INF
 #define HAVE_HUGE_VAL_NAN 1
+
+/* vs.net 2005 has a 64-bit time_t.  This will likely break
+ * 3rdParty libs that were built with older compilers; switch
+ * back to 32-bit */
+#define _USE_32BIT_TIME_T 1
+#define HAVE_STDLIB_H 1
+