]> granicus.if.org Git - php/commitdiff
NetWare related additions/modifications
authorAnantha Kesari H Y <hyanantha@php.net>
Fri, 6 Sep 2002 07:27:27 +0000 (07:27 +0000)
committerAnantha Kesari H Y <hyanantha@php.net>
Fri, 6 Sep 2002 07:27:27 +0000 (07:27 +0000)
ext/standard/info.c
ext/standard/lcg.c
ext/standard/link.c
ext/standard/mail.c

index 766aa86d77b85cf8fbf060f499fe4ceecb9d4d5f..483ab2ff554933b06e17042c3d30507ba3aea4df 100644 (file)
@@ -28,7 +28,7 @@
 #include "SAPI.h"
 #include <time.h>
 #include "php_main.h"
-#if !defined(PHP_WIN32)
+#if !defined(PHP_WIN32) && !defined(NETWARE)
 #include "build-defs.h"
 #endif
 #include "zend_globals.h"              /* needs ELS */
index 2683c789ce64e261217be5bb4f97f565e42fb823..66a3254776bf8be8531159e0c0a4cf0264eacd9c 100644 (file)
 
 #ifdef PHP_WIN32
 #include "win32/time.h"
+#elif defined(NETWARE)
+#ifdef NEW_LIBC
+#include <sys/timeval.h>
+#else
+#include "netware/time_nw.h"
+#endif
 #else
 #include <sys/time.h>
 #endif
index 23036067e70046fed81320e71b2f2dc46cb4c798..eec0cb144b4cbd92d54f497bd19c0cb8c4d3b589 100644 (file)
@@ -33,6 +33,8 @@
 #if HAVE_PWD_H
 #ifdef PHP_WIN32
 #include "win32/pwd.h"
+#elif defined(NETWARE)
+#include "netware/pwd.h"
 #else
 #include <pwd.h>
 #endif
@@ -79,7 +81,11 @@ PHP_FUNCTION(readlink)
 PHP_FUNCTION(linkinfo)
 {
        zval **filename;
+#if defined(NETWARE) && defined(CLIB_STAT_PATCH)
+    struct stat_libc sb;
+#else
        struct stat sb;
+#endif
        int ret;
 
        if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &filename) == FAILURE) {
index 995936768b46766d4e928c9e0549954162c5a697..1bcb336c0124d99c05b9ce28a6b2262ed4a7bc1d 100644 (file)
@@ -23,7 +23,7 @@
 #include <stdio.h>
 #include "php.h"
 #include "ext/standard/info.h"
-#if !defined(PHP_WIN32)
+#if !defined(PHP_WIN32) && !defined(NETWARE)
 #include "build-defs.h"
 #if HAVE_SYSEXITS_H
 #include <sysexits.h>
 #include "win32/sendmail.h"
 #endif
 
+#ifdef NETWARE
+#include "netware/pipe.h"    /* For popen(), pclose() */
+#include "netware/sysexits.h"   /* For exit status codes like EX_OK */
+#endif
+
 /* {{{ proto int ezmlm_hash(string addr)
    Calculate EZMLM list hash value. */
 PHP_FUNCTION(ezmlm_hash)
@@ -137,7 +142,8 @@ PHP_FUNCTION(mail)
  */
 PHPAPI int php_mail(char *to, char *subject, char *message, char *headers, char *extra_cmd TSRMLS_DC)
 {
-#ifdef PHP_WIN32
+/*#ifdef PHP_WIN32*/
+#if (defined PHP_WIN32 || defined NETWARE)
        int tsm_err;
        char *tsm_errmsg = NULL;
 #endif
@@ -147,7 +153,8 @@ PHPAPI int php_mail(char *to, char *subject, char *message, char *headers, char
        char *sendmail_cmd = NULL;
 
        if (!sendmail_path) {
-#ifdef PHP_WIN32
+/*#ifdef PHP_WIN32*/
+#if (defined PHP_WIN32 || defined NETWARE)
                /* handle old style win smtp sending */
                if (TSendMail(INI_STR("SMTP"), &tsm_err, &tsm_errmsg, headers, subject, to, message, NULL, NULL, NULL) == FAILURE) {
                        if (tsm_errmsg) {