com php-src: Remove AC_HEADER_DIRENT: configure.ac ext/opcache/shared_alloc_shm.c ext/opcache/zend_share d_alloc.c ext/standard/dir.c
main/php_scandir.h

From: Date: Tue, 04 Sep 2018 10:01:24 +0000
Subject: com php-src: Remove AC_HEADER_DIRENT: configure.ac ext/opcache/shared_alloc_shm.c ext/opcache/zend_share d_alloc.c ext/standard/dir.c
main/php_scandir.h
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-102998@lists.php.net to get a copy of this message
Commit: eff22dc511d677d12097018da630971d730b70f9 Author: Peter Kokot <peterkokot@gmail.com> Tue, 4 Sep 2018 00:17:21 +0200 Committer: Joe Watkins <krakjoe@php.net> Tue, 4 Sep 2018 12:01:24 +0200 Parents: efbc05a5a8b5ae66bc059d57c375c524e4208d19 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=eff22dc511d677d12097018da630971d730b70f9 Log: Remove AC_HEADER_DIRENT Autoconf 2.59d (released in 2006) [1] started promoting several macros as not relevant for newer systems anymore, including the AC_HEADER_DIRENT. This macro checks which header defines the DIR type. If <dirent.h> is available it defines the HAVE_DIRENT_H symbol. Since the <dirent.h> header is already checked in the configure.ac, this check is not needed anymore. This macro also additionally checks for SCO Xenix (discontinued, latest release 1989) dir and x libraries. [2] Commit 6ed790685f9ddae11834f36b0ba4fea58afc805a introduced also <sys/dir.h>. This header exists from times of UNIX System V and provided definition of DIR type on these systems such as 4.3BSD. Today <sys/dir.h> is kept for backwards compatibility and includes the <dirent.h> on current systems. With dirent.h> present this include is no longer required. Refs: [1] http://git.savannah.gnu.org/cgit/autoconf.git/tree/NEWS [2] https://www.gnu.org/software/autoconf/manual/autoconf-2.69/autoconf.html Remove unused dirent.h includes Changed paths: M configure.ac M ext/opcache/shared_alloc_shm.c M ext/opcache/zend_shared_alloc.c M ext/standard/dir.c M main/php_scandir.h Diff: diff --git a/configure.ac b/configure.ac index 4758c92..06ae3f4 100644 --- a/configure.ac +++ b/configure.ac @@ -420,7 +420,6 @@ dnl ------------------------------------------------------------------------- dnl Checks for header files. AC_HEADER_STDC -AC_HEADER_DIRENT dnl QNX requires unix.h to allow functions in libunix to work properly AC_CHECK_HEADERS([ \ diff --git a/ext/opcache/shared_alloc_shm.c b/ext/opcache/shared_alloc_shm.c index 71d07e2..c310290 100644 --- a/ext/opcache/shared_alloc_shm.c +++ b/ext/opcache/shared_alloc_shm.c @@ -29,7 +29,6 @@ #include <sys/types.h> #include <sys/shm.h> #include <sys/ipc.h> -#include <dirent.h> #include <signal.h> #include <stdio.h> #include <stdlib.h> diff --git a/ext/opcache/zend_shared_alloc.c b/ext/opcache/zend_shared_alloc.c index a40eac3..a758214 100644 --- a/ext/opcache/zend_shared_alloc.c +++ b/ext/opcache/zend_shared_alloc.c @@ -28,7 +28,6 @@ #include <fcntl.h> #ifndef ZEND_WIN32 # include <sys/types.h> -# include <dirent.h> # include <signal.h> # include <sys/stat.h> # include <stdio..h> diff --git a/ext/standard/dir.c b/ext/standard/dir.c index 82c329c...0e20db3 100644 --- a/ext/standard/dir.c +++ b/ext/standard/dir.c @@ -26,10 +26,6 @@ #include "php_scandir.h" #include "basic_functions.h" -#ifdef HAVE_DIRENT_H -#include <dirent.h> -#endif - #if HAVE_UNISTD_H #include <unistd.h> #endif diff --git a/main/php_scandir.h b/main/php_scandir.h index ce31bc2..17d5e9e 100644 --- a/main/php_scandir.h +++ b/main/php_scandir.h @@ -22,10 +22,6 @@ #include <sys/types.h> -#ifdef HAVE_SYS_DIR_H -#include <sys/dir.h> -#endif - #ifdef PHP_WIN32 #include "config.w32.h" #include "win32/readdir.h"

« previous php.cvs (#102998) next »