cvs: php4 /ext/curl curl.c php_curl.h

From: Date: Thu, 17 May 2001 17:13:47 +0000
Subject: cvs: php4 /ext/curl curl.c php_curl.h
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-5805@lists.php.net to get a copy of this message
dbeu Thu May 17 10:13:47 2001 EDT Modified files: /php4/ext/curl curl.c php_curl.h Log: winsock is already initialized in an higher version by php Index: php4/ext/curl/curl.c diff -u php4/ext/curl/curl.c:1.53 php4/ext/curl/curl.c:1.54 --- php4/ext/curl/curl.c:1.53 Wed May 16 16:43:30 2001 +++ php4/ext/curl/curl.c Thu May 17 10:13:47 2001 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: curl.c,v 1.53 2001/05/16 23:43:30 sterling Exp $ */ +/* $Id: curl.c,v 1.54 2001/05/17 17:13:47 dbeu Exp $ */ #include "php.h" @@ -45,42 +45,6 @@ #define SAVE_CURL_ERROR(__handle, __err) (__handle)->err.no = (int) __err; -#ifdef PHP_WIN32 -/* {{{ win32_cleanup() - Clean-up allocated socket data on win32 systems */ -static void win32_cleanup() -{ - WSACleanup(); -} -/* }}} */ - -/* {{{ win32_init() - Initialize WSA stuff on Win32 systems */ -static CURLcode win32_init() -{ - WSADATA wsa_data; - WORD requested_version = MAKEWORD(1, 1); - int error; - - error = WSAStartup(requested_version, &wsa_data); - if (error != 0) { - return CURLE_FAILED_INIT; - } - - if (LOBYTE(wsa_data.wVersion) != 1 || HIBYTE(wsa_data.wVersion) != 1) { - WSACleanup(); - return CURLE_FAILED_INIT; - } - - return CURLE_OK; -} -/* }}} */ -#else -static CURLcode win32_init(void) { return CURLE_OK; } -#define win32_cleanup() -#endif - - function_entry curl_functions[] = { PHP_FE(curl_init, NULL) PHP_FE(curl_version, NULL) @@ -97,7 +61,7 @@ "curl", curl_functions, PHP_MINIT(curl), - PHP_MSHUTDOWN(curl), + NULL, NULL, NULL, PHP_MINFO(curl), @@ -261,16 +225,6 @@ REGISTER_CURL_CONSTANT("CURLE_TELNET_OPTION_SYNTAX", CURLE_TELNET_OPTION_SYNTAX); REGISTER_CURL_CONSTANT("CURLE_ALREADY_COMPLETE", CURLE_ALREADY_COMPLETE); - if (win32_init() != CURLE_OK) { - return FAILURE; - } - - return SUCCESS; -} - -PHP_MSHUTDOWN_FUNCTION(curl) -{ - win32_cleanup(); return SUCCESS; } Index: php4/ext/curl/php_curl.h diff -u php4/ext/curl/php_curl.h:1.23 php4/ext/curl/php_curl.h:1.24 --- php4/ext/curl/php_curl.h:1.23 Wed May 16 16:43:30 2001 +++ php4/ext/curl/php_curl.h Thu May 17 10:13:47 2001 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_curl.h,v 1.23 2001/05/16 23:43:30 sterling Exp $ */ +/* $Id: php_curl.h,v 1.24 2001/05/17 17:13:47 dbeu Exp $ */ #ifndef _PHP_CURL_H #define _PHP_CURL_H @@ -41,7 +41,6 @@ #define CURLOPT_BINARYTRANSFER 19914 PHP_MINIT_FUNCTION(curl); -PHP_MSHUTDOWN_FUNCTION(curl); PHP_MINFO_FUNCTION(curl); PHP_FUNCTION(curl_version); PHP_FUNCTION(curl_init);

« previous php.cvs (#5805) next »