hyanantha               Fri Jul 15 08:35:13 2005 EDT

  Modified files:              
    /php-src/ext/standard       file.h syslog.c string.c 
  Log:
  ext/standard/file.h NetWare LibC has fnmatch and realpath implemented.
  ext/standard/syslog.c Except LOG_SYSLOG other syslog macros are supported by 
NetWare LibC.
  ext/standard/string.c NetWare fix for dirname
  -- Kamesh
  
  
  
http://cvs.php.net/diff.php/php-src/ext/standard/file.h?r1=1.92&r2=1.93&ty=u
Index: php-src/ext/standard/file.h
diff -u php-src/ext/standard/file.h:1.92 php-src/ext/standard/file.h:1.93
--- php-src/ext/standard/file.h:1.92    Sun Sep 26 17:55:22 2004
+++ php-src/ext/standard/file.h Fri Jul 15 08:35:12 2005
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: file.h,v 1.92 2004/09/26 21:55:22 helly Exp $ */
+/* $Id: file.h,v 1.93 2005/07/15 12:35:12 hyanantha Exp $ */
 
 /* Synced with php 3.0 revision 1.30 1999-06-16 [ssb] */
 
@@ -60,7 +60,7 @@
 PHP_FUNCTION(flock);
 PHP_FUNCTION(fd_set);
 PHP_FUNCTION(fd_isset);
-#if (!defined(__BEOS__) && !defined(NETWARE) && HAVE_REALPATH) || defined(ZTS)
+#if (!defined(__BEOS__) && HAVE_REALPATH) || defined(ZTS)
 PHP_FUNCTION(realpath);
 PHP_FUNCTION(fnmatch);
 #endif
http://cvs.php.net/diff.php/php-src/ext/standard/syslog.c?r1=1.47&r2=1.48&ty=u
Index: php-src/ext/standard/syslog.c
diff -u php-src/ext/standard/syslog.c:1.47 php-src/ext/standard/syslog.c:1.48
--- php-src/ext/standard/syslog.c:1.47  Wed Jul 28 22:59:43 2004
+++ php-src/ext/standard/syslog.c       Fri Jul 15 08:35:12 2005
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: syslog.c,v 1.47 2004/07/29 02:59:43 wez Exp $ */
+/* $Id: syslog.c,v 1.48 2005/07/15 12:35:12 hyanantha Exp $ */
 
 #include "php.h"
 
@@ -75,7 +75,7 @@
        /* AIX doesn't have LOG_AUTHPRIV */
        REGISTER_LONG_CONSTANT("LOG_AUTHPRIV", LOG_AUTHPRIV, CONST_CS | 
CONST_PERSISTENT);
 #endif
-#if !defined(PHP_WIN32) && !defined(NETWARE)
+#ifndef PHP_WIN32
        REGISTER_LONG_CONSTANT("LOG_LOCAL0", LOG_LOCAL0, CONST_CS | 
CONST_PERSISTENT);
        REGISTER_LONG_CONSTANT("LOG_LOCAL1", LOG_LOCAL1, CONST_CS | 
CONST_PERSISTENT);
        REGISTER_LONG_CONSTANT("LOG_LOCAL2", LOG_LOCAL2, CONST_CS | 
CONST_PERSISTENT);
@@ -144,7 +144,9 @@
        SET_VAR_LONG("LOG_MAIL", LOG_MAIL); /* log to email */
        SET_VAR_LONG("LOG_DAEMON", LOG_DAEMON); /* other system daemons */
        SET_VAR_LONG("LOG_AUTH", LOG_AUTH);
+#ifndef NETWARE
        SET_VAR_LONG("LOG_SYSLOG", LOG_SYSLOG);
+#endif
        SET_VAR_LONG("LOG_LPR", LOG_LPR);
 #ifdef LOG_NEWS
        /* No LOG_NEWS on HP-UX */
http://cvs.php.net/diff.php/php-src/ext/standard/string.c?r1=1.442&r2=1.443&ty=u
Index: php-src/ext/standard/string.c
diff -u php-src/ext/standard/string.c:1.442 php-src/ext/standard/string.c:1.443
--- php-src/ext/standard/string.c:1.442 Thu Jul  7 11:19:40 2005
+++ php-src/ext/standard/string.c       Fri Jul 15 08:35:12 2005
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: string.c,v 1.442 2005/07/07 15:19:40 tony2001 Exp $ */
+/* $Id: string.c,v 1.443 2005/07/15 12:35:12 hyanantha Exp $ */
 
 /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
 
@@ -1225,6 +1225,22 @@
                        return len;
                }
        }
+#elif defined(NETWARE)
+       /*
+        * Find the first occurence of : from the left 
+        * move the path pointer to the position just after :
+        * increment the len_adjust to the length of path till colon 
character(inclusive)
+        * If there is no character beyond : simple return len
+        */
+       char *colonpos = NULL;
+       colonpos = strchr(path, ':');
+       if(colonpos != NULL) {
+               len_adjust = ((colonpos - path) + 1);
+               path += len_adjust;
+               if(len_adjust == len) {
+               return len;
+               }
+       }
 #endif
 
        if (len == 0) {
@@ -1249,9 +1265,21 @@
        }
        if (end < path) {
                /* No slash found, therefore return '.' */
+#ifdef NETWARE
+               if(len_adjust == 0) {
+                       path[0] = '.';
+                       path[1] = '\0';
+                       return 1; //only one character
+               } 
+               else {
+                       path[0] = '\0';
+                       return len_adjust;
+               }
+#else
                path[0] = '.';
                path[1] = '\0';
                return 1 + len_adjust;
+#endif
        }
 
        /* Strip slashes which came before the file name */

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

Reply via email to