mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
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.
This commit is contained in:
parent
2041c133ac
commit
19a9d85d6b
1 changed files with 3 additions and 4 deletions
|
@ -1124,7 +1124,7 @@ AC_DEFUN([PHP_DOES_PWRITE_WORK],[
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
$1
|
$1
|
||||||
int main(void) {
|
int main(void) {
|
||||||
int fd = open("conftest_in", O_WRONLY|O_CREAT, 0600);
|
int fd = open("conftest_pwrite", O_WRONLY|O_CREAT, 0600);
|
||||||
|
|
||||||
if (fd < 0) return 1;
|
if (fd < 0) return 1;
|
||||||
if (pwrite(fd, "text", 4, 0) != 4) return 1;
|
if (pwrite(fd, "text", 4, 0) != 4) return 1;
|
||||||
|
@ -1148,7 +1148,7 @@ dnl
|
||||||
dnl Internal.
|
dnl Internal.
|
||||||
dnl
|
dnl
|
||||||
AC_DEFUN([PHP_DOES_PREAD_WORK],[
|
AC_DEFUN([PHP_DOES_PREAD_WORK],[
|
||||||
echo test > conftest_in
|
echo test > conftest_pread
|
||||||
AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
@ -1159,7 +1159,7 @@ AC_DEFUN([PHP_DOES_PREAD_WORK],[
|
||||||
$1
|
$1
|
||||||
int main(void) {
|
int main(void) {
|
||||||
char buf[3];
|
char buf[3];
|
||||||
int fd = open("conftest_in", O_RDONLY);
|
int fd = open("conftest_pread", O_RDONLY);
|
||||||
if (fd < 0) return 1;
|
if (fd < 0) return 1;
|
||||||
if (pread(fd, buf, 2, 0) != 2) return 1;
|
if (pread(fd, buf, 2, 0) != 2) return 1;
|
||||||
/* Linux glibc breakage until 2.2.5 */
|
/* Linux glibc breakage until 2.2.5 */
|
||||||
|
@ -1173,7 +1173,6 @@ $1
|
||||||
],[
|
],[
|
||||||
ac_cv_pread=no
|
ac_cv_pread=no
|
||||||
])
|
])
|
||||||
rm -f conftest_in
|
|
||||||
])
|
])
|
||||||
|
|
||||||
dnl
|
dnl
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue