@@ -67,22 +67,22 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE;
67
67
#include "win32/inet.h"
68
68
#endif
69
69
70
- #if HAVE_ARPA_INET_H
70
+ #ifdef HAVE_ARPA_INET_H
71
71
# include <arpa/inet.h>
72
72
#endif
73
73
74
- #if HAVE_UNISTD_H
74
+ #ifdef HAVE_UNISTD_H
75
75
# include <unistd.h>
76
76
#endif
77
77
78
78
#include <string.h>
79
79
#include <locale.h>
80
80
81
- #if HAVE_SYS_MMAN_H
81
+ #ifdef HAVE_SYS_MMAN_H
82
82
# include <sys/mman.h>
83
83
#endif
84
84
85
- #if HAVE_SYS_LOADAVG_H
85
+ #ifdef HAVE_SYS_LOADAVG_H
86
86
# include <sys/loadavg.h>
87
87
#endif
88
88
@@ -91,7 +91,7 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE;
91
91
#endif
92
92
93
93
#ifndef INADDR_NONE
94
- #define INADDR_NONE ((zend_ulong) -1)
94
+ # define INADDR_NONE ((zend_ulong) -1)
95
95
#endif
96
96
97
97
#include "zend_globals.h"
@@ -141,25 +141,25 @@ zend_module_entry basic_functions_module = { /* {{{ */
141
141
};
142
142
/* }}} */
143
143
144
- #if defined( HAVE_PUTENV )
144
+ #ifdef HAVE_PUTENV
145
145
static void php_putenv_destructor (zval * zv ) /* {{{ */
146
146
{
147
147
putenv_entry * pe = Z_PTR_P (zv );
148
148
149
149
if (pe -> previous_value ) {
150
- # if defined( PHP_WIN32 )
150
+ # ifdef PHP_WIN32
151
151
/* MSVCRT has a bug in putenv() when setting a variable that
152
152
* is already set; if the SetEnvironmentVariable() API call
153
153
* fails, the Crt will double free() a string.
154
154
* We try to avoid this by setting our own value first */
155
155
SetEnvironmentVariable (pe -> key , "bugbug" );
156
156
# endif
157
157
putenv (pe -> previous_value );
158
- # if defined( PHP_WIN32 )
158
+ # ifdef PHP_WIN32
159
159
efree (pe -> previous_value );
160
160
# endif
161
161
} else {
162
- # if HAVE_UNSETENV
162
+ # ifdef HAVE_UNSETENV
163
163
unsetenv (pe -> key );
164
164
# elif defined(PHP_WIN32 )
165
165
SetEnvironmentVariable (pe -> key , NULL );
@@ -273,14 +273,14 @@ PHP_MINIT_FUNCTION(basic) /* {{{ */
273
273
{
274
274
#ifdef ZTS
275
275
ts_allocate_id (& basic_globals_id , sizeof (php_basic_globals ), (ts_allocate_ctor ) basic_globals_ctor , (ts_allocate_dtor ) basic_globals_dtor );
276
- #ifdef PHP_WIN32
276
+ # ifdef PHP_WIN32
277
277
ts_allocate_id (& php_win32_core_globals_id , sizeof (php_win32_core_globals ), (ts_allocate_ctor )php_win32_core_globals_ctor , (ts_allocate_dtor )php_win32_core_globals_dtor );
278
- #endif
278
+ # endif
279
279
#else
280
280
basic_globals_ctor (& basic_globals );
281
- #ifdef PHP_WIN32
281
+ # ifdef PHP_WIN32
282
282
php_win32_core_globals_ctor (& the_php_win32_core_globals );
283
- #endif
283
+ # endif
284
284
#endif
285
285
286
286
php_register_incomplete_class ();
@@ -335,7 +335,7 @@ PHP_MINIT_FUNCTION(basic) /* {{{ */
335
335
REGISTER_LONG_CONSTANT ("PHP_ROUND_HALF_EVEN" , PHP_ROUND_HALF_EVEN , CONST_CS | CONST_PERSISTENT );
336
336
REGISTER_LONG_CONSTANT ("PHP_ROUND_HALF_ODD" , PHP_ROUND_HALF_ODD , CONST_CS | CONST_PERSISTENT );
337
337
338
- #if ENABLE_TEST_CLASS
338
+ #ifdef ENABLE_TEST_CLASS
339
339
test_class_startup ();
340
340
#endif
341
341
@@ -352,23 +352,23 @@ PHP_MINIT_FUNCTION(basic) /* {{{ */
352
352
BASIC_MINIT_SUBMODULE (password )
353
353
BASIC_MINIT_SUBMODULE (mt_rand )
354
354
355
- #if defined( ZTS )
355
+ #ifdef ZTS
356
356
BASIC_MINIT_SUBMODULE (localeconv )
357
357
#endif
358
358
359
- #if defined( HAVE_NL_LANGINFO )
359
+ #ifdef HAVE_NL_LANGINFO
360
360
BASIC_MINIT_SUBMODULE (nl_langinfo )
361
361
#endif
362
362
363
- #if ZEND_INTRIN_SSE4_2_FUNC_PTR
363
+ #ifdef ZEND_INTRIN_SSE4_2_FUNC_PTR
364
364
BASIC_MINIT_SUBMODULE (string_intrin )
365
365
#endif
366
366
367
- #if ZEND_INTRIN_SSE4_2_PCLMUL_FUNC_PTR
367
+ #ifdef ZEND_INTRIN_SSE4_2_PCLMUL_FUNC_PTR
368
368
BASIC_MINIT_SUBMODULE (crc32_x86_intrin )
369
369
#endif
370
370
371
- #if ZEND_INTRIN_AVX2_FUNC_PTR || ZEND_INTRIN_SSSE3_FUNC_PTR
371
+ #if defined( ZEND_INTRIN_AVX2_FUNC_PTR ) || defined( ZEND_INTRIN_SSSE3_FUNC_PTR )
372
372
BASIC_MINIT_SUBMODULE (base64_intrin )
373
373
#endif
374
374
@@ -399,8 +399,8 @@ PHP_MINIT_FUNCTION(basic) /* {{{ */
399
399
php_register_url_stream_wrapper ("http ", & php_stream_http_wrapper );
400
400
php_register_url_stream_wrapper ("ftp ", & php_stream_ftp_wrapper );
401
401
402
- #if defined(PHP_WIN32 ) || HAVE_DNS_SEARCH_FUNC
403
- # if defined(PHP_WIN32 ) || HAVE_FULL_DNS_FUNCS
402
+ #if defined(PHP_WIN32 ) || defined( HAVE_DNS_SEARCH_FUNC )
403
+ # if defined(PHP_WIN32 ) || defined( HAVE_FULL_DNS_FUNCS )
404
404
BASIC_MINIT_SUBMODULE (dns )
405
405
# endif
406
406
#endif
@@ -440,7 +440,7 @@ PHP_MSHUTDOWN_FUNCTION(basic) /* {{{ */
440
440
BASIC_MSHUTDOWN_SUBMODULE (url_scanner_ex )
441
441
BASIC_MSHUTDOWN_SUBMODULE (file )
442
442
BASIC_MSHUTDOWN_SUBMODULE (standard_filters )
443
- #if defined( ZTS )
443
+ #ifdef ZTS
444
444
BASIC_MSHUTDOWN_SUBMODULE (localeconv )
445
445
#endif
446
446
BASIC_MSHUTDOWN_SUBMODULE (crypt )
@@ -876,7 +876,7 @@ PHP_FUNCTION(putenv)
876
876
pe .previous_value = NULL ;
877
877
for (env = environ ; env != NULL && * env != NULL ; env ++ ) {
878
878
if (!strncmp (* env , pe .key , pe .key_len ) && (* env )[pe .key_len ] == '=' ) { /* found it */
879
- #if defined( PHP_WIN32 )
879
+ #ifdef PHP_WIN32
880
880
/* must copy previous value because MSVCRT's putenv can free the string without notice */
881
881
pe .previous_value = estrdup (* env );
882
882
#else
@@ -886,7 +886,7 @@ PHP_FUNCTION(putenv)
886
886
}
887
887
}
888
888
889
- #if HAVE_UNSETENV
889
+ #ifdef HAVE_UNSETENV
890
890
if (!p ) { /* no '=' means we want to unset it */
891
891
unsetenv (pe .putenv_string );
892
892
}
@@ -932,15 +932,15 @@ PHP_FUNCTION(putenv)
932
932
}
933
933
#endif
934
934
tsrm_env_unlock ();
935
- #if defined( PHP_WIN32 )
935
+ #ifdef PHP_WIN32
936
936
free (keyw );
937
937
free (valw );
938
938
#endif
939
939
RETURN_TRUE ;
940
940
} else {
941
941
efree (pe .putenv_string );
942
942
efree (pe .key );
943
- #if defined( PHP_WIN32 )
943
+ #ifdef PHP_WIN32
944
944
free (keyw );
945
945
free (valw );
946
946
#endif
@@ -1245,13 +1245,13 @@ PHP_FUNCTION(usleep)
1245
1245
RETURN_THROWS ();
1246
1246
}
1247
1247
1248
- #if HAVE_USLEEP
1248
+ #ifdef HAVE_USLEEP
1249
1249
usleep ((unsigned int )num );
1250
1250
#endif
1251
1251
}
1252
1252
/* }}} */
1253
1253
1254
- #if HAVE_NANOSLEEP
1254
+ #ifdef HAVE_NANOSLEEP
1255
1255
/* {{{ Delay for a number of seconds and nano seconds */
1256
1256
PHP_FUNCTION (time_nanosleep )
1257
1257
{
@@ -2289,7 +2289,7 @@ PHP_FUNCTION(ignore_user_abort)
2289
2289
}
2290
2290
/* }}} */
2291
2291
2292
- #if HAVE_GETSERVBYNAME
2292
+ #ifdef HAVE_GETSERVBYNAME
2293
2293
/* {{{ Returns port associated with service. Protocol must be "tcp" or "udp" */
2294
2294
PHP_FUNCTION (getservbyname )
2295
2295
{
@@ -2313,7 +2313,7 @@ PHP_FUNCTION(getservbyname)
2313
2313
2314
2314
serv = getservbyname (name , proto );
2315
2315
2316
- #if defined( _AIX )
2316
+ #ifdef _AIX
2317
2317
/*
2318
2318
On AIX, imap is only known as imap2 in /etc/services, while on Linux imap is an alias for imap2.
2319
2319
If a request for imap gives no result, we try again with imap2.
@@ -2331,7 +2331,7 @@ PHP_FUNCTION(getservbyname)
2331
2331
/* }}} */
2332
2332
#endif
2333
2333
2334
- #if HAVE_GETSERVBYPORT
2334
+ #ifdef HAVE_GETSERVBYPORT
2335
2335
/* {{{ Returns service name associated with port. Protocol must be "tcp" or "udp" */
2336
2336
PHP_FUNCTION (getservbyport )
2337
2337
{
@@ -2356,7 +2356,7 @@ PHP_FUNCTION(getservbyport)
2356
2356
/* }}} */
2357
2357
#endif
2358
2358
2359
- #if HAVE_GETPROTOBYNAME
2359
+ #ifdef HAVE_GETPROTOBYNAME
2360
2360
/* {{{ Returns protocol number associated with name as per /etc/protocols */
2361
2361
PHP_FUNCTION (getprotobyname )
2362
2362
{
@@ -2379,7 +2379,7 @@ PHP_FUNCTION(getprotobyname)
2379
2379
/* }}} */
2380
2380
#endif
2381
2381
2382
- #if HAVE_GETPROTOBYNUMBER
2382
+ #ifdef HAVE_GETPROTOBYNUMBER
2383
2383
/* {{{ Returns protocol name associated with protocol number proto */
2384
2384
PHP_FUNCTION (getprotobynumber )
2385
2385
{
0 commit comments