Permalink
Browse files

C++ compile fixes

  • Loading branch information...
1 parent b5bef8f commit cb71ac03cbe80a4f356d8e015c827c73ddcbd76d Hartmut Holzgraefe committed May 20, 2003
Showing with 6 additions and 2 deletions.
  1. +3 −1 Zend/zend_API.h
  2. +2 −0 Zend/zend_constants.h
  3. +1 −1 Zend/zend_operators.h
View
@@ -58,7 +58,9 @@ BEGIN_EXTERN_C()
#define ZEND_MODULE_INFO_D(module) void ZEND_MODULE_INFO_N(module)(ZEND_MODULE_INFO_FUNC_ARGS)
#define ZEND_GET_MODULE(name) \
- ZEND_DLEXPORT zend_module_entry *get_module(void) { return &name##_module_entry; }
+ BEGIN_EXTERN_C()\
+ ZEND_DLEXPORT zend_module_entry *get_module(void) { return &name##_module_entry; }\
+ END_EXTERN_C()
#define ZEND_BEGIN_MODULE_GLOBALS(module_name) \
typedef struct _zend_##module_name##_globals {
@@ -45,6 +45,7 @@ typedef struct _zend_constant {
#define REGISTER_MAIN_STRING_CONSTANT(name, str, flags) zend_register_string_constant((name), sizeof(name), (str), (flags), 0 TSRMLS_CC)
#define REGISTER_MAIN_STRINGL_CONSTANT(name, str, len, flags) zend_register_stringl_constant((name), sizeof(name), (str), (len), (flags), 0 TSRMLS_CC)
+BEGIN_EXTERN_C()
void clean_module_constants(int module_number TSRMLS_DC);
void free_zend_constant(zend_constant *c);
int zend_startup_constants(TSRMLS_D);
@@ -59,6 +60,7 @@ ZEND_API void zend_register_stringl_constant(char *name, uint name_len, char *st
ZEND_API int zend_register_constant(zend_constant *c TSRMLS_DC);
void zend_copy_constants(HashTable *target, HashTable *sourc);
void copy_zend_constant(zend_constant *c);
+END_EXTERN_C();
#define ZEND_CONSTANT_DTOR (void (*)(void *)) free_zend_constant
@@ -152,7 +152,7 @@ zend_memnstr(char *haystack, char *needle, int needle_len, char *end)
end -= needle_len;
while (p <= end) {
- if ((p = memchr(p, *needle, (end-p+1))) && ne == p[needle_len-1]) {
+ if ((p = (char *)memchr(p, *needle, (end-p+1))) && ne == p[needle_len-1]) {
if (!memcmp(needle, p, needle_len-1)) {
return p;
}

0 comments on commit cb71ac0

Please sign in to comment.