wez Mon Aug 18 19:19:27 2003 EDT
Modified files:
/ZendEngine2 zend_ini.h
/php-src/main SAPI.h php.h php_ini.h php_main.h php_variables.h
Log:
linkage for C++
Index: ZendEngine2/zend_ini.h
diff -u ZendEngine2/zend_ini.h:1.28 ZendEngine2/zend_ini.h:1.29
--- ZendEngine2/zend_ini.h:1.28 Tue Jun 10 16:03:25 2003
+++ ZendEngine2/zend_ini.h Mon Aug 18 19:19:27 2003
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_ini.h,v 1.28 2003/06/10 20:03:25 imajes Exp $ */
+/* $Id: zend_ini.h,v 1.29 2003/08/18 23:19:27 wez Exp $ */
#ifndef ZEND_INI_H
#define ZEND_INI_H
@@ -82,7 +82,7 @@
void (*displayer)(zend_ini_entry *ini_entry, int type);
};
-
+BEGIN_EXTERN_C();
ZEND_API int zend_ini_startup(TSRMLS_D);
ZEND_API int zend_ini_shutdown(TSRMLS_D);
ZEND_API int zend_ini_global_shutdown(TSRMLS_D);
@@ -108,6 +108,7 @@
ZEND_API ZEND_INI_DISP(zend_ini_boolean_displayer_cb);
ZEND_API ZEND_INI_DISP(zend_ini_color_displayer_cb);
ZEND_API ZEND_INI_DISP(display_link_numbers);
+END_EXTERN_C();
#define ZEND_INI_BEGIN() static zend_ini_entry ini_entries[] = {
#define ZEND_INI_END() { 0, 0, NULL, 0, NULL, NULL, NULL, NULL, NULL, 0,
NULL, 0, 0, NULL } };
@@ -171,12 +172,13 @@
#define REGISTER_INI_BOOLEAN(name) REGISTER_INI_DISPLAYER(name,
zend_ini_boolean_displayer_cb)
/* Standard message handlers */
+BEGIN_EXTERN_C();
ZEND_API ZEND_INI_MH(OnUpdateBool);
ZEND_API ZEND_INI_MH(OnUpdateLong);
ZEND_API ZEND_INI_MH(OnUpdateReal);
ZEND_API ZEND_INI_MH(OnUpdateString);
ZEND_API ZEND_INI_MH(OnUpdateStringUnempty);
-
+END_EXTERN_C();
#define ZEND_INI_DISPLAY_ORIG 1
#define ZEND_INI_DISPLAY_ACTIVE 2
@@ -189,7 +191,10 @@
/* INI parsing engine */
typedef void (*zend_ini_parser_cb_t)(zval *arg1, zval *arg2, int callback_type, void
*arg);
+BEGIN_EXTERN_C();
int zend_parse_ini_file(zend_file_handle *fh, zend_bool unbuffered_errors,
zend_ini_parser_cb_t ini_parser_cb, void *arg);
+END_EXTERN_C();
+
#define ZEND_INI_PARSER_ENTRY 1
#define ZEND_INI_PARSER_SECTION 2
#define ZEND_INI_PARSER_POP_ENTRY 3
Index: php-src/main/SAPI.h
diff -u php-src/main/SAPI.h:1.103 php-src/main/SAPI.h:1.104
--- php-src/main/SAPI.h:1.103 Tue Jun 10 16:03:41 2003
+++ php-src/main/SAPI.h Mon Aug 18 19:19:27 2003
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: SAPI.h,v 1.103 2003/06/10 20:03:41 imajes Exp $ */
+/* $Id: SAPI.h,v 1.104 2003/08/18 23:19:27 wez Exp $ */
#ifndef SAPI_H
#define SAPI_H
@@ -61,8 +61,9 @@
typedef struct _sapi_post_entry sapi_post_entry;
typedef struct _sapi_module_struct sapi_module_struct;
-
+BEGIN_EXTERN_C();
extern SAPI_API sapi_module_struct sapi_module; /* true global */
+END_EXTERN_C();
/* Some values in this structure needs to be filled in before
* calling sapi_activate(). We WILL change the `char *' entries,
@@ -124,6 +125,7 @@
} sapi_globals_struct;
+BEGIN_EXTERN_C();
#ifdef ZTS
# define SG(v) TSRMG(sapi_globals_id, sapi_globals_struct *, v)
SAPI_API extern int sapi_globals_id;
@@ -137,6 +139,7 @@
SAPI_API void sapi_activate(TSRMLS_D);
SAPI_API void sapi_deactivate(TSRMLS_D);
SAPI_API void sapi_initialize_empty_request(TSRMLS_D);
+END_EXTERN_C();
/*
* This is the preferred and maintained API for
@@ -161,9 +164,9 @@
SAPI_HEADER_SET_STATUS /* int */
} sapi_header_op_enum;
+BEGIN_EXTERN_C();
SAPI_API int sapi_header_op(sapi_header_op_enum op, void *arg TSRMLS_DC);
-
/* Deprecated functions. Use sapi_header_op instead. */
SAPI_API int sapi_add_header_ex(char *header_line, uint header_line_len, zend_bool
duplicate, zend_bool replace TSRMLS_DC);
#define sapi_add_header(a, b, c) sapi_add_header_ex((a),(b),(c),1 TSRMLS_CC)
@@ -194,6 +197,7 @@
SAPI_API int sapi_get_target_uid(uid_t * TSRMLS_DC);
SAPI_API int sapi_get_target_gid(gid_t * TSRMLS_DC);
+END_EXTERN_C();
struct _sapi_module_struct {
char *name;
@@ -274,10 +278,12 @@
#define SAPI_TREAT_DATA_FUNC(treat_data) void treat_data(int arg, char *str, zval*
destArray TSRMLS_DC)
#define SAPI_INPUT_FILTER_FUNC(input_filter) unsigned int input_filter(int arg, char
*var, char **val, unsigned int val_len TSRMLS_DC)
+BEGIN_EXTERN_C();
SAPI_API SAPI_POST_READER_FUNC(sapi_read_standard_form_data);
SAPI_API SAPI_POST_READER_FUNC(php_default_post_reader);
SAPI_API SAPI_TREAT_DATA_FUNC(php_default_treat_data);
SAPI_API SAPI_INPUT_FILTER_FUNC(php_default_input_filter);
+END_EXTERN_C();
#define STANDARD_SAPI_MODULE_PROPERTIES
Index: php-src/main/php.h
diff -u php-src/main/php.h:1.191 php-src/main/php.h:1.192
--- php-src/main/php.h:1.191 Sun Aug 3 13:42:01 2003
+++ php-src/main/php.h Mon Aug 18 19:19:27 2003
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php.h,v 1.191 2003/08/03 17:42:01 zeev Exp $ */
+/* $Id: php.h,v 1.192 2003/08/18 23:19:27 wez Exp $ */
#ifndef PHP_H
#define PHP_H
@@ -122,19 +122,25 @@
}
#ifndef HAVE_STRLCPY
+BEGIN_EXTERN_C();
PHPAPI size_t php_strlcpy(char *dst, const char *src, size_t siz);
+END_EXTERN_C();
#undef strlcpy
#define strlcpy php_strlcpy
#endif
#ifndef HAVE_STRLCAT
+BEGIN_EXTERN_C();
PHPAPI size_t php_strlcat(char *dst, const char *src, size_t siz);
+END_EXTERN_C();
#undef strlcat
#define strlcat php_strlcat
#endif
#ifndef HAVE_STRTOK_R
+BEGIN_EXTERN_C();
char *strtok_r(char *s, const char *delim, char **last);
+END_EXTERN_C();
#endif
#ifndef HAVE_SOCKLEN_T
@@ -266,12 +272,14 @@
ssize_t pread(int, void *, size_t, off64_t);
#endif
+BEGIN_EXTERN_C();
void phperror(char *error);
PHPAPI int php_write(void *buf, uint size TSRMLS_DC);
PHPAPI int php_printf(const char *format, ...);
PHPAPI void php_log_err(char *log_message TSRMLS_DC);
int Debug(char *format, ...);
int cfgparse(void);
+END_EXTERN_C();
#define php_error zend_error
@@ -281,6 +289,7 @@
EH_THROW
} error_handling_t;
+BEGIN_EXTERN_C();
PHPAPI void php_set_error_handling(error_handling_t error_handling, zend_class_entry
*exception_class TSRMLS_DC);
PHPAPI void php_verror(const char *docref, const char *params, int type, const char
*format, va_list args TSRMLS_DC) ;
@@ -289,6 +298,7 @@
PHPAPI void php_error_docref0(const char *docref TSRMLS_DC, int type, const char
*format, ...);
PHPAPI void php_error_docref1(const char *docref TSRMLS_DC, const char *param1, int
type, const char *format, ...);
PHPAPI void php_error_docref2(const char *docref TSRMLS_DC, const char *param1, const
char *param2, int type, const char *format, ...);
+END_EXTERN_C();
#define php_error_docref php_error_docref0
@@ -302,6 +312,7 @@
#define php_memnstr zend_memnstr
/* functions */
+BEGIN_EXTERN_C();
int php_startup_internal_extensions(void);
int php_mergesort(void *base, size_t nmemb, register size_t size, int (*cmp)(const
void *, const void * TSRMLS_DC) TSRMLS_DC);
@@ -311,7 +322,7 @@
PHPAPI int cfg_get_long(char *varname, long *result);
PHPAPI int cfg_get_double(char *varname, double *result);
PHPAPI int cfg_get_string(char *varname, char **result);
-
+END_EXTERN_C();
/* PHP-named Zend macro wrappers */
#define PHP_FN ZEND_FN
Index: php-src/main/php_ini.h
diff -u php-src/main/php_ini.h:1.40 php-src/main/php_ini.h:1.41
--- php-src/main/php_ini.h:1.40 Tue Jun 10 16:03:42 2003
+++ php-src/main/php_ini.h Mon Aug 18 19:19:27 2003
@@ -16,17 +16,19 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_ini.h,v 1.40 2003/06/10 20:03:42 imajes Exp $ */
+/* $Id: php_ini.h,v 1.41 2003/08/18 23:19:27 wez Exp $ */
#ifndef PHP_INI_H
#define PHP_INI_H
#include "zend_ini.h"
+BEGIN_EXTERN_C();
int php_init_config();
int php_shutdown_config(void);
void php_ini_delayed_modules_startup(TSRMLS_D);
zval *cfg_get_entry(char *name, uint name_length);
+END_EXTERN_C();
#define PHP_INI_USER ZEND_INI_USER
#define PHP_INI_PERDIR ZEND_INI_PERDIR
Index: php-src/main/php_main.h
diff -u php-src/main/php_main.h:1.28 php-src/main/php_main.h:1.29
--- php-src/main/php_main.h:1.28 Tue Jun 10 16:03:42 2003
+++ php-src/main/php_main.h Mon Aug 18 19:19:27 2003
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_main.h,v 1.28 2003/06/10 20:03:42 imajes Exp $ */
+/* $Id: php_main.h,v 1.29 2003/08/18 23:19:27 wez Exp $ */
#ifndef PHP_MAIN_H
#define PHP_MAIN_H
@@ -26,6 +26,7 @@
#include "php_globals.h"
#include "SAPI.h"
+BEGIN_EXTERN_C();
PHPAPI int php_request_startup(TSRMLS_D);
PHPAPI void php_request_shutdown(void *dummy);
PHPAPI void php_request_shutdown_for_exec(void *dummy);
@@ -52,5 +53,6 @@
/* environment module */
extern int php_init_environ(void);
extern int php_shutdown_environ(void);
+END_EXTERN_C();
#endif
Index: php-src/main/php_variables.h
diff -u php-src/main/php_variables.h:1.18 php-src/main/php_variables.h:1.19
--- php-src/main/php_variables.h:1.18 Tue Jun 10 16:03:42 2003
+++ php-src/main/php_variables.h Mon Aug 18 19:19:27 2003
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_variables.h,v 1.18 2003/06/10 20:03:42 imajes Exp $ */
+/* $Id: php_variables.h,v 1.19 2003/08/18 23:19:27 wez Exp $ */
#ifndef PHP_VARIABLES_H
#define PHP_VARIABLES_H
@@ -30,6 +30,7 @@
#define PARSE_COOKIE 2
#define PARSE_STRING 3
+BEGIN_EXTERN_C();
void php_treat_data(int arg, char *str, zval* destArray TSRMLS_DC);
void php_startup_auto_globals(TSRMLS_D);
extern PHPAPI void (*php_import_environment_variables)(zval *array_ptr TSRMLS_DC);
@@ -39,7 +40,7 @@
PHPAPI void php_register_variable_ex(char *var, zval *val, pval *track_vars_array
TSRMLS_DC);
int php_hash_environment(TSRMLS_D);
-
+END_EXTERN_C();
#define NUM_TRACK_VARS 6
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php