summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/standard/info.c2
-rw-r--r--ext/standard/lcg.c6
-rw-r--r--ext/standard/link.c6
-rw-r--r--ext/standard/mail.c13
4 files changed, 23 insertions, 4 deletions
diff --git a/ext/standard/info.c b/ext/standard/info.c
index 766aa86d77..483ab2ff55 100644
--- a/ext/standard/info.c
+++ b/ext/standard/info.c
@@ -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 */
diff --git a/ext/standard/lcg.c b/ext/standard/lcg.c
index 2683c789ce..66a3254776 100644
--- a/ext/standard/lcg.c
+++ b/ext/standard/lcg.c
@@ -27,6 +27,12 @@
#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
diff --git a/ext/standard/link.c b/ext/standard/link.c
index 23036067e7..eec0cb144b 100644
--- a/ext/standard/link.c
+++ b/ext/standard/link.c
@@ -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) {
diff --git a/ext/standard/mail.c b/ext/standard/mail.c
index 995936768b..1bcb336c01 100644
--- a/ext/standard/mail.c
+++ b/ext/standard/mail.c
@@ -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>
@@ -42,6 +42,11 @@
#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) {