cvs: pecl /smtp config.w32 smtp.c

From: Date: Fri, 05 Dec 2003 08:17:43 +0000
Subject: cvs: pecl /smtp config.w32 smtp.c
Groups: php.pecl.cvs 
Request: Send a blank email to pecl-cvs+get-558@lists.php.net to get a copy of this message
fmk Fri Dec 5 03:17:43 2003 EDT Added files: /pecl/smtp config.w32 Modified files: /pecl/smtp smtp.c Log: Include smtp in the new win32 build system, and make it compile under win32 Index: pecl/smtp/smtp.c diff -u pecl/smtp/smtp.c:1.3 pecl/smtp/smtp.c:1.4 --- pecl/smtp/smtp.c:1.3 Sat Mar 2 08:11:30 2002 +++ pecl/smtp/smtp.c Fri Dec 5 03:17:43 2003 @@ -27,12 +27,16 @@ #include "php_smtp.h" #include <sys/types.h> -#include <sys/socket.h> -#include <netinet/in.h> -#include <arpa/inet.h> -#include <unistd.h> +#ifdef PHP_WIN32 +#include <winsock2.h> +#else +# include <sys/socket.h> +# include <netinet/in.h> +# include <arpa/inet.h> +# include <unistd.h> +# include <netdb.h> +#endif #include <stdio.h> -#include <netdb.h> #include <string.h> #define TRUE 1 @@ -184,7 +188,7 @@ convert_to_string_ex(server_addr); server_port = SMTP_DEFAULT_PORT; if(gethostname(helo_host, 256) == -1) - goto ERROR; + goto HERROR; break; case 2: @@ -193,7 +197,7 @@ convert_to_long_ex(port); server_port = (unsigned short int)Z_LVAL_PP(port); if(gethostname(helo_host, 256) == -1) - goto ERROR; + goto HERROR; break; case 3: @@ -215,13 +219,13 @@ if(smtp == FALSE){ efree(smtp); - goto ERROR; + goto HERROR; } ZEND_REGISTER_RESOURCE(return_value, smtp, le_smtp); return; -ERROR: +HERROR: efree(helo_host); RETURN_FALSE; } Index: pecl/smtp/config.w32 +++ pecl/smtp/config.w32 // $Id: config.w32,v 1.1 2003/12/05 08:17:43 fmk Exp $ // vim:ft=javascript ARG_WITH("smtp", "SMTP Support", "no"); if (PHP_SMTP == "yes") { EXTENSION("smtp", "smtp.c"); AC_DEFINE('HAVE_SMTP', 1, 'Have SMTP support', false); }

« previous php.pecl.cvs (#558) next »