hyanantha               Thu Oct 24 07:27:24 2002 EDT

  Modified files:              (Branch: PHP_4_2_0)
    /php4/main  php.h 
  Log:
  NetWare related changes/modifications.
  
  
Index: php4/main/php.h
diff -u php4/main/php.h:1.159 php4/main/php.h:1.159.2.1
--- php4/main/php.h:1.159       Thu Feb 28 19:16:58 2002
+++ php4/main/php.h     Thu Oct 24 07:27:23 2002
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: php.h,v 1.159 2002/03/01 00:16:58 shane Exp $ */
+/* $Id: php.h,v 1.159.2.1 2002/10/24 11:27:23 hyanantha Exp $ */
 
 #ifndef PHP_H
 #define PHP_H
@@ -61,6 +61,13 @@
 #define PHP_DIR_SEPARATOR '/'
 #endif
 
+#ifdef NETWARE
+/*#include <utsname.h>*/
+#define PHP_UNAME  "NetWare"    /* For php_get_uname() function */
+#define PHP_OS      PHP_UNAME  /* This is obtained using 'uname' on Unix and assigned 
+in the case of Windows.
+                                                                 For NetWare, we'll 
+do it this way atleast for now */
+#endif
+
 #include "php_regex.h"
 
 
@@ -171,6 +178,13 @@
 # ifdef PHP_WIN32
 #include "win32/pwd.h"
 #include "win32/param.h"
+#elif defined(NETWARE)
+#ifdef NEW_LIBC
+#include <sys/param.h>
+#else
+#include "NetWare/param.h"
+#endif
+#include "NetWare/pwd.h"
 # else
 #include <pwd.h>
 #include <sys/param.h>
@@ -212,7 +226,17 @@
 extern pval *data;
 #if !defined(PHP_WIN32)
 extern char **environ;
+#ifdef NETWARE
+#ifdef NEW_LIBC
+/*#undef environ*/  /* For now, so that our 'environ' implementation is used */
 #define php_sleep sleep
+#else
+#define php_sleep   delay   /* sleep() and usleep() are not available */
+#define usleep      delay
+#endif
+#else
+#define php_sleep sleep
+#endif
 #endif
 
 #ifdef PHP_PWRITE_64
@@ -291,7 +315,7 @@
 #include "main/php_output.h"
 #define PHPWRITE(str, str_len)         php_body_write((str), (str_len) TSRMLS_CC)
 #define PUTS(str)                                      php_body_write((str), 
strlen((str)) TSRMLS_CC)
-#define PUTC(c)                                                (php_body_write(&(c), 
1 TSRMLS_CC), (c))
+#define PUTC(c)                                                (php_body_write((const 
+char*)(&(c)), 1 TSRMLS_CC), (c)) /* Type-casting done due to NetWare */
 #define PHPWRITE_H(str, str_len)       php_header_write((str), (str_len) TSRMLS_CC)
 #define PUTS_H(str)                                    php_header_write((str), 
strlen((str)) TSRMLS_CC)
 #define PUTC_H(c)                                      (php_header_write(&(c), 1 
TSRMLS_CC), (c))



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to