There are values known at compile time on Unix that are *not* known
at compile time on Win32. Rather than compile in something misleading
(and very likely wrong), better to *not* supply a value.
Index: ext/standard/info.c
===================================================================
RCS file: /repository/php4/ext/standard/info.c,v
retrieving revision 1.171
diff -u -b -r1.171 info.c
--- ext/standard/info.c 29 Mar 2002 10:19:23 -0000 1.171
+++ ext/standard/info.c 30 Apr 2002 14:51:54 -0000
@@ -250,7 +250,7 @@
php_info_print_table_row(2, "Virtual Directory Support", "disabled" );
#endif
- php_info_print_table_row(2, "Configuration File (php.ini) Path",
php_ini_opened_path?php_ini_opened_path:PHP_CONFIG_FILE_PATH);
+ php_info_print_table_row(2, "Configuration File (php.ini) Path",
+php_ini_opened_path?php_ini_opened_path:"(none)");
#if ZEND_DEBUG
php_info_print_table_row(2, "Debug Build", "yes" );
Index: main/config.w32.h
===================================================================
RCS file: /repository/php4/main/config.w32.h,v
retrieving revision 1.58
diff -u -b -r1.58 config.w32.h
--- main/config.w32.h 28 Apr 2002 17:50:09 -0000 1.58
+++ main/config.w32.h 30 Apr 2002 14:51:57 -0000
@@ -5,18 +5,6 @@
$Id: config.w32.h,v 1.58 2002/04/28 17:50:09 sebastian Exp $
*/
-/* Default PHP / PEAR directories */
-#define CONFIGURATION_FILE_PATH "php.ini"
-#define PHP_BINDIR "c:\\php4"
-#define PHP_CONFIG_FILE_PATH (getenv("SystemRoot"))?getenv("SystemRoot"):""
-#define PHP_DATADIR "c:\\php4"
-#define PHP_EXTENSION_DIR "c:\\php4"
-#define PHP_INCLUDE_PATH ".;c:\\php4\\pear"
-#define PHP_LIBDIR "c:\\php4"
-#define PHP_LOCALSTATEDIR "c:\\php4"
-#define PHP_SYSCONFDIR "c:\\php4"
-#define PEAR_INSTALLDIR "c:\\php4\\pear"
-
/* Enable / Disable BCMATH extension (default: enabled) */
#define WITH_BCMATH 1
@@ -156,3 +144,15 @@
#undef HAVE_RINT
#define HAVE_STRFTIME 1
#define SIZEOF_INT 4
+
+/* Values that cannot be known at compile time. */
+#define PEAR_INSTALLDIR ""
+#define PHP_BINDIR ""
+#define PHP_CONFIG_FILE_PATH ""
+#define PHP_DATADIR ""
+#define PHP_EXTENSION_DIR ""
+#define PHP_EXTENSION_DIR ""
+#define PHP_INCLUDE_PATH ""
+#define PHP_LIBDIR ""
+#define PHP_LOCALSTATEDIR ""
+#define PHP_SYSCONFDIR ""
Index: main/main.c
===================================================================
RCS file: /repository/php4/main/main.c,v
retrieving revision 1.446
diff -u -b -r1.446 main.c
--- main/main.c 30 Apr 2002 00:17:48 -0000 1.446
+++ main/main.c 30 Apr 2002 14:51:58 -0000
@@ -990,6 +990,11 @@
REGISTER_MAIN_STRINGL_CONSTANT("PHP_VERSION", PHP_VERSION,
sizeof(PHP_VERSION)-1, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_STRINGL_CONSTANT("PHP_OS", php_os, strlen(php_os),
CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_STRINGL_CONSTANT("PHP_SAPI", sapi_module.name,
strlen(sapi_module.name), CONST_PERSISTENT | CONST_CS);
+
+ /*
+ * The following directories are known at the time PHP
+ * is configured and built on Unix, but not on Win32.
+ */
REGISTER_MAIN_STRINGL_CONSTANT("DEFAULT_INCLUDE_PATH", PHP_INCLUDE_PATH,
sizeof(PHP_INCLUDE_PATH)-1, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_STRINGL_CONSTANT("PEAR_INSTALL_DIR", PEAR_INSTALLDIR,
sizeof(PEAR_INSTALLDIR)-1, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_STRINGL_CONSTANT("PEAR_EXTENSION_DIR", PHP_EXTENSION_DIR,
sizeof(PHP_EXTENSION_DIR)-1, CONST_PERSISTENT | CONST_CS);
Index: main/win95nt.h
===================================================================
RCS file: /repository/php4/main/win95nt.h,v
retrieving revision 1.13
diff -u -b -r1.13 win95nt.h
--- main/win95nt.h 25 Apr 2002 09:01:35 -0000 1.13
+++ main/win95nt.h 30 Apr 2002 14:51:59 -0000
@@ -55,7 +55,9 @@
#define NOOPENFILE
/* sendmail is built-in */
+/*
#ifdef PHP_PROG_SENDMAIL
#undef PHP_PROG_SENDMAIL
#define PHP_PROG_SENDMAIL "Built in mailer"
#endif
+*/
--
Preston L. Bannister
http://members.cox.net/preston.bannister/
pbannister on Yahoo Messenger
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php