hyanantha Thu Oct 24 07:18:24 2002 EDT Modified files: (Branch: PHP_4_2_0) /php4/ext/standard mail.c Log: NetWare related changes/modifications. Index: php4/ext/standard/mail.c diff -u php4/ext/standard/mail.c:1.48.2.3 php4/ext/standard/mail.c:1.48.2.4 --- php4/ext/standard/mail.c:1.48.2.3 Sat Aug 24 07:38:13 2002 +++ php4/ext/standard/mail.c Thu Oct 24 07:18:24 2002 @@ -16,14 +16,14 @@ +----------------------------------------------------------------------+ */ -/* $Id: mail.c,v 1.48.2.3 2002/08/24 11:38:13 sesser Exp $ */ +/* $Id: mail.c,v 1.48.2.4 2002/10/24 11:18:24 hyanantha Exp $ */ #include <stdlib.h> #include <ctype.h> #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,12 @@ #include "win32/sendmail.h" #endif +/* Additional headers for NetWare */ +#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) @@ -128,7 +134,7 @@ */ PHPAPI int php_mail(char *to, char *subject, char *message, char *headers, char *extra_cmd) { -#ifdef PHP_WIN32 +#if (defined PHP_WIN32) || (defined NETWARE) int tsm_err; #endif FILE *sendmail; @@ -137,10 +143,10 @@ char *sendmail_cmd = NULL; if (!sendmail_path) { -#ifdef PHP_WIN32 +#if (defined PHP_WIN32) || (defined NETWARE) /* handle old style win smtp sending */ if (TSendMail(INI_STR("SMTP"), &tsm_err, headers, subject, to, message) != SUCCESS){ - php_error(E_WARNING, GetSMErrorText(tsm_err)); + php_error(E_WARNING, (const char *)GetSMErrorText(tsm_err)); + /* Type-casting done due to NetWare */ return 0; } return 1;
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php