mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
Remove some unnecessary HAVE_EXTNAME guards
A recurring pattern in old extension: Putting the whole source code behind HAVE_EXTNAME. This is pointless, as the code is only compiled if the extension is enabled. This removes a couple of them, but not all.
This commit is contained in:
parent
8e05c44496
commit
d1ac7e3ab1
@ -23,7 +23,6 @@
|
||||
#include "Zend/zend_interfaces.h"
|
||||
#include "php_curl.h"
|
||||
#include "curl_file_arginfo.h"
|
||||
#ifdef HAVE_CURL
|
||||
|
||||
PHP_CURL_API zend_class_entry *curl_CURLFile_class;
|
||||
|
||||
@ -132,5 +131,3 @@ void curlfile_register_class(void)
|
||||
zend_declare_property_string(curl_CURLFile_class, "mime", sizeof("mime")-1, "", ZEND_ACC_PUBLIC);
|
||||
zend_declare_property_string(curl_CURLFile_class, "postname", sizeof("postname")-1, "", ZEND_ACC_PUBLIC);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -24,8 +24,6 @@
|
||||
#include "Zend/zend_interfaces.h"
|
||||
#include "Zend/zend_exceptions.h"
|
||||
|
||||
#ifdef HAVE_CURL
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
@ -3537,5 +3535,3 @@ PHP_FUNCTION(curl_pause)
|
||||
RETURN_LONG(curl_easy_pause(ch->cp, bitmask));
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
#endif /* HAVE_CURL */
|
||||
|
@ -23,8 +23,6 @@
|
||||
#include "php.h"
|
||||
#include "Zend/zend_interfaces.h"
|
||||
|
||||
#ifdef HAVE_CURL
|
||||
|
||||
#include "php_curl.h"
|
||||
|
||||
#include <curl/curl.h>
|
||||
@ -599,5 +597,3 @@ void curl_multi_register_class(const zend_function_entry *method_entries) {
|
||||
curl_multi_handlers.clone_obj = NULL;
|
||||
curl_multi_handlers.cast_object = curl_cast_object;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -21,13 +21,6 @@
|
||||
#include "php.h"
|
||||
#include "zend_smart_str.h"
|
||||
|
||||
#ifdef COMPILE_DL_CURL
|
||||
#undef HAVE_CURL
|
||||
#define HAVE_CURL 1
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CURL
|
||||
|
||||
#define PHP_CURL_DEBUG 0
|
||||
|
||||
#ifdef PHP_WIN32
|
||||
@ -45,7 +38,7 @@
|
||||
#include <curl/multi.h>
|
||||
|
||||
extern zend_module_entry curl_module_entry;
|
||||
#define curl_module_ptr &curl_module_entry
|
||||
#define phpext_curl_ptr &curl_module_entry
|
||||
|
||||
#define CURLOPT_RETURNTRANSFER 19913
|
||||
#define CURLOPT_BINARYTRANSFER 19914 /* For Backward compatibility */
|
||||
@ -180,8 +173,4 @@ int curl_cast_object(zend_object *obj, zval *result, int type);
|
||||
|
||||
PHP_CURL_API extern zend_class_entry *curl_CURLFile_class;
|
||||
|
||||
#else
|
||||
#define curl_module_ptr NULL
|
||||
#endif /* HAVE_CURL */
|
||||
#define phpext_curl_ptr curl_module_ptr
|
||||
#endif /* _PHP_CURL_H */
|
||||
|
@ -23,8 +23,6 @@
|
||||
#include "php.h"
|
||||
#include "Zend/zend_interfaces.h"
|
||||
|
||||
#ifdef HAVE_CURL
|
||||
|
||||
#include "php_curl.h"
|
||||
|
||||
#include <curl/curl.h>
|
||||
@ -179,5 +177,3 @@ void curl_share_register_class(const zend_function_entry *method_entries) {
|
||||
curl_share_handlers.get_constructor = curl_share_get_constructor;
|
||||
curl_share_handlers.clone_obj = NULL;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -22,8 +22,6 @@
|
||||
#include "php.h"
|
||||
#include "ext/standard/file.h"
|
||||
|
||||
#ifdef HAVE_EXIF
|
||||
|
||||
/* When EXIF_DEBUG is defined the module generates a lot of debug messages
|
||||
* that help understanding what is going on. This can and should be used
|
||||
* while extending the module as it shows if you are at the right position.
|
||||
@ -4791,5 +4789,3 @@ PHP_FUNCTION(exif_imagetype)
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
#endif
|
||||
|
@ -15,12 +15,8 @@
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
#ifdef HAVE_EXIF
|
||||
|
||||
#include "php_version.h"
|
||||
#define PHP_EXIF_VERSION PHP_VERSION
|
||||
|
||||
extern zend_module_entry exif_module_entry;
|
||||
#define phpext_exif_ptr &exif_module_entry
|
||||
|
||||
#endif
|
||||
|
@ -21,8 +21,6 @@
|
||||
|
||||
#include "php.h"
|
||||
|
||||
#ifdef HAVE_FTP
|
||||
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#include <stdlib.h>
|
||||
@ -2266,5 +2264,3 @@ bail:
|
||||
return PHP_FTP_FAILED;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
#endif /* HAVE_FTP */
|
||||
|
@ -18,10 +18,8 @@
|
||||
#ifndef _INCLUDED_FTP_H
|
||||
#define _INCLUDED_FTP_H
|
||||
|
||||
#ifdef HAVE_FTP
|
||||
|
||||
extern zend_module_entry php_ftp_module_entry;
|
||||
#define php_ftp_module_ptr &php_ftp_module_entry
|
||||
#define phpext_ftp_ptr &php_ftp_module_entry
|
||||
|
||||
#include "php_version.h"
|
||||
#define PHP_FTP_VERSION PHP_VERSION
|
||||
@ -34,10 +32,4 @@ extern zend_module_entry php_ftp_module_entry;
|
||||
PHP_MINIT_FUNCTION(ftp);
|
||||
PHP_MINFO_FUNCTION(ftp);
|
||||
|
||||
#define phpext_ftp_ptr php_ftp_module_ptr
|
||||
|
||||
#else
|
||||
#define php_ftp_module_ptr NULL
|
||||
#endif /* HAVE_FTP */
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user