blob: 0b1abb70235252d29d42f3d837714a002c199c06 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
|
// **********************************************************************
//
// Copyright (c) 2003-2010 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************
#ifndef ICE_PHP_CONFIG_H
#define ICE_PHP_CONFIG_H
//
// We need to define WIN32_LEAN_AND_MEAN to avoid redefinition errors in
// winsock2.h. However, we can't define the macro in the Makefile because
// a PHP header defines it without a surrounding #ifndef, so we have to
// undefine it before including the PHP header files.
//
#ifdef _WIN32
# define WIN32_LEAN_AND_MEAN
#endif
#include <Ice/Ice.h>
#ifdef _WIN32
# undef WIN32_LEAN_AND_MEAN
#endif
#ifdef _WIN32
#include <crtdbg.h>
#include <math.h>
#endif
#ifdef _WIN32
extern "C"
{
#endif
#ifdef _WIN32
# pragma warning( disable : 4018) // suppress signed/unsigned mismatch in zend_execute.h (PHP 5.3.x)
#endif
#include "php.h"
#ifdef _WIN32
# pragma warning( default : 4018)
#endif
#include "php_ini.h"
#include "ext/standard/info.h"
#include "zend_interfaces.h"
#include "zend_exceptions.h"
#ifdef _WIN32
}
#endif
extern zend_module_entry ice_module_entry;
#define phpext_ice_ptr &ice_module_entry
#ifdef PHP_WIN32
#define PHP_ICE_API __declspec(dllexport)
#else
#define PHP_ICE_API
#endif
#ifdef ZTS
#include "TSRM.h"
#endif
//
// The PHP header files define a macro named "inline".
//
#ifdef inline
# undef inline
#endif
ZEND_MINIT_FUNCTION(ice);
ZEND_MSHUTDOWN_FUNCTION(ice);
ZEND_RINIT_FUNCTION(ice);
ZEND_RSHUTDOWN_FUNCTION(ice);
ZEND_MINFO_FUNCTION(ice);
ZEND_BEGIN_MODULE_GLOBALS(ice)
void* communicatorMap;
void* idToClassInfoMap;
void* nameToClassInfoMap;
void* proxyInfoMap;
void* exceptionInfoMap;
ZEND_END_MODULE_GLOBALS(ice)
#ifdef ZTS
# define ICE_G(v) TSRMG(ice_globals_id, zend_ice_globals*, v)
#else
# define ICE_G(v) (ice_globals.v)
#endif
#ifndef Z_ADDREF_P
# ifndef ZVAL_ADDREF
# error "Unknown PHP version"
# endif
# define Z_ADDREF_P(zv) ZVAL_ADDREF(zv)
#endif
#ifndef ZEND_MN
# define ZEND_MN(name) ZEND_FN(name)
#endif
//
// Newer versions of PHP use const char* instead of char* in most APIs.
//
#ifdef STRCAST
# error "STRCAST already defined!"
#endif
#if PHP_MAJOR_VERSION > 5 || (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 3)
# define STRCAST(s) s
#else
# define STRCAST(s) const_cast<char*>(s)
#endif
#endif
|