Skip to content

Commit 19a9d85

Browse files
authored
Rely on Autoconf's automatic removal of conftest* files (#14697)
When test programs are finished or when configure script is interrupted, Autoconf cleans up all conftest* files.
1 parent 2041c13 commit 19a9d85

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

build/php.m4

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1124,7 +1124,7 @@ AC_DEFUN([PHP_DOES_PWRITE_WORK],[
11241124
#include <stdlib.h>
11251125
$1
11261126
int main(void) {
1127-
int fd = open("conftest_in", O_WRONLY|O_CREAT, 0600);
1127+
int fd = open("conftest_pwrite", O_WRONLY|O_CREAT, 0600);
11281128
11291129
if (fd < 0) return 1;
11301130
if (pwrite(fd, "text", 4, 0) != 4) return 1;
@@ -1148,7 +1148,7 @@ dnl
11481148
dnl Internal.
11491149
dnl
11501150
AC_DEFUN([PHP_DOES_PREAD_WORK],[
1151-
echo test > conftest_in
1151+
echo test > conftest_pread
11521152
AC_RUN_IFELSE([AC_LANG_SOURCE([[
11531153
#include <sys/types.h>
11541154
#include <sys/stat.h>
@@ -1159,7 +1159,7 @@ AC_DEFUN([PHP_DOES_PREAD_WORK],[
11591159
$1
11601160
int main(void) {
11611161
char buf[3];
1162-
int fd = open("conftest_in", O_RDONLY);
1162+
int fd = open("conftest_pread", O_RDONLY);
11631163
if (fd < 0) return 1;
11641164
if (pread(fd, buf, 2, 0) != 2) return 1;
11651165
/* Linux glibc breakage until 2.2.5 */
@@ -1173,7 +1173,6 @@ $1
11731173
],[
11741174
ac_cv_pread=no
11751175
])
1176-
rm -f conftest_in
11771176
])
11781177

11791178
dnl

0 commit comments

Comments
 (0)