File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -831,7 +831,13 @@ int main(int argc, char **argv) /* {{{ */
831
831
zend_bool remote = 0 ;
832
832
int run = 0 ;
833
833
int step = 0 ;
834
+
835
+ #ifdef _WIN32
834
836
char * bp_tmp_file ;
837
+ #else
838
+ char bp_tmp_file [] = "/tmp/phpdbg.XXXXXX" ;
839
+ #endif
840
+
835
841
#ifndef _WIN32
836
842
char * address ;
837
843
int listen [2 ];
@@ -871,8 +877,12 @@ int main(int argc, char **argv) /* {{{ */
871
877
872
878
phpdbg_main :
873
879
if (!cleaning ) {
880
+ #ifdef _WIN32
874
881
bp_tmp_file = malloc (L_tmpnam );
875
882
tmpnam (bp_tmp_file );
883
+ #else
884
+ mkstemp (bp_tmp_file );
885
+ #endif
876
886
if (bp_tmp_file == NULL ) {
877
887
phpdbg_error ("Unable to create temporary file" );
878
888
}
@@ -1342,7 +1352,11 @@ int main(int argc, char **argv) /* {{{ */
1342
1352
free (sapi_name );
1343
1353
}
1344
1354
1355
+ #ifdef _WIN32
1345
1356
free (bp_tmp_file );
1357
+ #else
1358
+ unlink (bp_tmp_file );
1359
+ #endif
1346
1360
1347
1361
return 0 ;
1348
1362
} /* }}} */
You can’t perform that action at this time.
0 commit comments