@@ -133,11 +133,11 @@ typedef struct {
133
133
int lock_flag ; /* stores the lock state */
134
134
zend_string * temp_name ; /* if non-null, this is the path to a temporary file that
135
135
* is to be deleted when the stream is closed */
136
- #if HAVE_FLUSHIO
136
+ #ifdef HAVE_FLUSHIO
137
137
char last_op ;
138
138
#endif
139
139
140
- #if HAVE_MMAP
140
+ #ifdef HAVE_MMAP
141
141
char * last_mapped_addr ;
142
142
size_t last_mapped_len ;
143
143
#endif
@@ -358,7 +358,7 @@ static ssize_t php_stdiop_write(php_stream *stream, const char *buf, size_t coun
358
358
return bytes_written ;
359
359
} else {
360
360
361
- #if HAVE_FLUSHIO
361
+ #ifdef HAVE_FLUSHIO
362
362
if (data -> is_seekable && data -> last_op == 'r' ) {
363
363
zend_fseek (data -> file , 0 , SEEK_CUR );
364
364
}
@@ -433,7 +433,7 @@ static ssize_t php_stdiop_read(php_stream *stream, char *buf, size_t count)
433
433
}
434
434
435
435
} else {
436
- #if HAVE_FLUSHIO
436
+ #ifdef HAVE_FLUSHIO
437
437
if (data -> is_seekable && data -> last_op == 'w' )
438
438
zend_fseek (data -> file , 0 , SEEK_CUR );
439
439
data -> last_op = 'r' ;
@@ -453,7 +453,7 @@ static int php_stdiop_close(php_stream *stream, int close_handle)
453
453
454
454
assert (data != NULL );
455
455
456
- #if HAVE_MMAP
456
+ #ifdef HAVE_MMAP
457
457
if (data -> last_mapped_addr ) {
458
458
munmap (data -> last_mapped_addr , data -> last_mapped_len );
459
459
data -> last_mapped_addr = NULL ;
@@ -475,7 +475,7 @@ static int php_stdiop_close(php_stream *stream, int close_handle)
475
475
errno = 0 ;
476
476
ret = pclose (data -> file );
477
477
478
- #if HAVE_SYS_WAIT_H
478
+ #ifdef HAVE_SYS_WAIT_H
479
479
if (WIFEXITED (ret )) {
480
480
ret = WEXITSTATUS (ret );
481
481
}
@@ -704,7 +704,7 @@ static int php_stdiop_set_option(php_stream *stream, int option, int value, void
704
704
break ;
705
705
706
706
case PHP_STREAM_OPTION_MMAP_API :
707
- #if HAVE_MMAP
707
+ #ifdef HAVE_MMAP
708
708
{
709
709
php_stream_mmap_range * range = (php_stream_mmap_range * )ptrparam ;
710
710
int prot , flags ;
@@ -882,7 +882,7 @@ static int php_stdiop_set_option(php_stream *stream, int option, int value, void
882
882
return PHP_STREAM_OPTION_RETURN_ERR ;
883
883
}
884
884
885
- #if defined( _WIN64 )
885
+ #ifdef _WIN64
886
886
sz .QuadPart = new_size ;
887
887
#else
888
888
sz .HighPart = 0 ;
@@ -1226,7 +1226,7 @@ static int php_plain_files_rename(php_stream_wrapper *wrapper, const char *url_f
1226
1226
if (php_copy_file (url_from , url_to ) == SUCCESS ) {
1227
1227
if (VCWD_STAT (url_from , & sb ) == 0 ) {
1228
1228
success = 1 ;
1229
- # if !defined( TSRM_WIN32 )
1229
+ # ifndef TSRM_WIN32
1230
1230
/*
1231
1231
* Try to set user and permission info on the target.
1232
1232
* If we're not root, then some of these may fail.
0 commit comments