Commit 1c97e857 authored by Jan D's avatar Jan D
Browse files

Replace tests for SYSV_SYSTEM_DIR with HAVE_DIRENT_H, set via autoconf

* configure.in: Check for dirent.h

* dired.c, sysdep.c: test HAVE_DIRENT_H instead of SYSV_SYSTEM_DIR

* s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/gnu-linux.h,
  s/msdos.h, s/usg5-4.h: don't define SYSV_SYSTEM_DIR

* sed2v2.inp (HAVE_DIRENT_H): Edit to 1
parent 1b231651
2010-07-29 Chad Brown <yandros@mit.edu>
* configure.in: Check for dirent.h
2010-07-29 Dan Nicolaescu <dann@ics.uci.edu> 2010-07-29 Dan Nicolaescu <dann@ics.uci.edu>
* configure.in: Remove reference to usg5-4, unused. * configure.in: Remove reference to usg5-4, unused.
......
This diff is collapsed.
...@@ -1204,7 +1204,7 @@ AC_CHECK_HEADERS(sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \ ...@@ -1204,7 +1204,7 @@ AC_CHECK_HEADERS(sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \ linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \ stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \
sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \ sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \
sys/utsname.h pwd.h utmp.h) sys/utsname.h pwd.h utmp.h dirent.h)
AC_MSG_CHECKING(if personality LINUX32 can be set) AC_MSG_CHECKING(if personality LINUX32 can be set)
AC_TRY_COMPILE([#include <sys/personality.h>], [personality (PER_LINUX32)], AC_TRY_COMPILE([#include <sys/personality.h>], [personality (PER_LINUX32)],
......
2010-07-27 Chad Brown <yandros@mit.edu>
* sed2v2.inp (HAVE_DIRENT_H): Edit to 1
2010-07-12 Eli Zaretskii <eliz@gnu.org> 2010-07-12 Eli Zaretskii <eliz@gnu.org>
* sed1v2.inp (C_WARNINGS_SWITCH, PROFILING_CFLAGS, PROFILING_LDFLAGS): * sed1v2.inp (C_WARNINGS_SWITCH, PROFILING_CFLAGS, PROFILING_LDFLAGS):
......
...@@ -57,6 +57,7 @@ ...@@ -57,6 +57,7 @@
/^#undef PACKAGE_TARNAME/s/^.*$/#define PACKAGE_TARNAME ""/ /^#undef PACKAGE_TARNAME/s/^.*$/#define PACKAGE_TARNAME ""/
/^#undef PACKAGE_VERSION/s/^.*$/#define PACKAGE_VERSION ""/ /^#undef PACKAGE_VERSION/s/^.*$/#define PACKAGE_VERSION ""/
/^#undef SYS_SIGLIST_DECLARED/s/^.*$/#define SYS_SIGLIST_DECLARED 1/ /^#undef SYS_SIGLIST_DECLARED/s/^.*$/#define SYS_SIGLIST_DECLARED 1/
/^#undef HAVE_DIRENT_H/s/^.*$/#define HAVE_DIRENT_H 1/
/^#undef GNU_MALLOC *$/s/^.*$/#define GNU_MALLOC 1/ /^#undef GNU_MALLOC *$/s/^.*$/#define GNU_MALLOC 1/
/^#undef REL_ALLOC *$/s/^.*$/#define REL_ALLOC 1/ /^#undef REL_ALLOC *$/s/^.*$/#define REL_ALLOC 1/
......
2010-07-27 Chad Brown <yandros@mit.edu>
Replace tests for SYSV_SYSTEM_DIR with HAVE_DIRENT_H, set via autoconf
* dired.c, sysdep.c: test HAVE_DIRENT_H instead of SYSV_SYSTEM_DIR
* s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/gnu-linux.h,
s/msdos.h, s/usg5-4.h: don't define SYSV_SYSTEM_DIR
2010-07-29 Dan Nicolaescu <dann@ics.uci.edu> 2010-07-29 Dan Nicolaescu <dann@ics.uci.edu>
   
Rename s/usg5-4.h -> s/usg5-4-common.h. Rename s/usg5-4.h -> s/usg5-4-common.h.
......
...@@ -150,6 +150,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ ...@@ -150,6 +150,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define to 1 if you have the `difftime' function. */ /* Define to 1 if you have the `difftime' function. */
#undef HAVE_DIFFTIME #undef HAVE_DIFFTIME
/* Define to 1 if you have the <dirent.h> header file. */
#undef HAVE_DIRENT_H
/* Define to 1 if you have the `dup2' function. */ /* Define to 1 if you have the `dup2' function. */
#undef HAVE_DUP2 #undef HAVE_DUP2
......
...@@ -48,29 +48,22 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ ...@@ -48,29 +48,22 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
Since applying strlen to the name always works, we'll just do that. */ Since applying strlen to the name always works, we'll just do that. */
#define NAMLEN(p) strlen (p->d_name) #define NAMLEN(p) strlen (p->d_name)
#ifdef SYSV_SYSTEM_DIR #ifdef HAVE_DIRENT_H
#include <dirent.h> #include <dirent.h>
#define DIRENTRY struct dirent #define DIRENTRY struct dirent
#else /* not SYSV_SYSTEM_DIR */ #else /* not HAVE_DIRENT_H */
#ifdef MSDOS
#include <dirent.h>
#else
#include <sys/dir.h> #include <sys/dir.h>
#endif
#include <sys/stat.h> #include <sys/stat.h>
#ifndef MSDOS
#define DIRENTRY struct direct #define DIRENTRY struct direct
extern DIR *opendir (char *); extern DIR *opendir (char *);
extern struct direct *readdir (DIR *); extern struct direct *readdir (DIR *);
#endif /* not MSDOS */ #endif /* HAVE_DIRENT_H */
#endif /* not SYSV_SYSTEM_DIR */
/* Some versions of Cygwin don't have d_ino in `struct dirent'. */ /* Some versions of Cygwin don't have d_ino in `struct dirent'. */
#if defined(MSDOS) || defined(__CYGWIN__) #if defined(MSDOS) || defined(__CYGWIN__)
......
...@@ -47,11 +47,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ ...@@ -47,11 +47,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define HAVE_SOCKETS if system supports 4.2-compatible sockets. */ /* Define HAVE_SOCKETS if system supports 4.2-compatible sockets. */
#define HAVE_SOCKETS #define HAVE_SOCKETS
/* Define SYSV_SYSTEM_DIR to use the V.3 getdents/readir library
functions. Almost, but not quite the same as the 4.2 functions. */
#define SYSV_SYSTEM_DIR
/* The file containing the kernel's symbol table is called /unix. */ /* The file containing the kernel's symbol table is called /unix. */
#define KERNEL_FILE "/unix" #define KERNEL_FILE "/unix"
......
...@@ -45,8 +45,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ ...@@ -45,8 +45,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#define HAVE_TERMIOS #define HAVE_TERMIOS
#define NO_TERMIO #define NO_TERMIO
#define SYSV_SYSTEM_DIR
/* If the system's imake configuration file defines `NeedWidePrototypes' /* If the system's imake configuration file defines `NeedWidePrototypes'
as `NO', we must define NARROWPROTO manually. Such a define is as `NO', we must define NARROWPROTO manually. Such a define is
generated in the Makefile generated by `xmkmf'. If we don't generated in the Makefile generated by `xmkmf'. If we don't
......
...@@ -89,7 +89,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ ...@@ -89,7 +89,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#define CYGWIN 1 #define CYGWIN 1
#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base) #define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base)
#define SYSV_SYSTEM_DIR 1
#define HAVE_SOCKETS #define HAVE_SOCKETS
......
...@@ -124,8 +124,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ ...@@ -124,8 +124,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#define INTERRUPT_INPUT #define INTERRUPT_INPUT
#endif /* emacs */ #endif /* emacs */
#define SYSV_SYSTEM_DIR /* use dirent.h */
#define POSIX /* affects getpagesize.h and systty.h */ #define POSIX /* affects getpagesize.h and systty.h */
/* This is to work around mysterious gcc failures in some system versions. /* This is to work around mysterious gcc failures in some system versions.
......
...@@ -38,8 +38,6 @@ You lose; /* Emacs for DOS must be compiled with DJGPP */ ...@@ -38,8 +38,6 @@ You lose; /* Emacs for DOS must be compiled with DJGPP */
It sets the Lisp variable system-type. */ It sets the Lisp variable system-type. */
#define SYSTEM_TYPE "ms-dos" #define SYSTEM_TYPE "ms-dos"
#define SYSV_SYSTEM_DIR
/* subprocesses should be defined if you want to have code for /* subprocesses should be defined if you want to have code for
asynchronous subprocesses (as used in M-x compile and M-x shell). asynchronous subprocesses (as used in M-x compile and M-x shell).
This is the only system that needs this. */ This is the only system that needs this. */
......
...@@ -35,10 +35,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ ...@@ -35,10 +35,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
for terminal control. */ for terminal control. */
#define HAVE_TERMIO #define HAVE_TERMIO
/* Define SYSV_SYSTEM_DIR to use the V.3 getdents/readir library
functions. Almost, but not quite the same as the 4.2 functions. */
#define SYSV_SYSTEM_DIR
/* The file containing the kernel's symbol table is called /unix. */ /* The file containing the kernel's symbol table is called /unix. */
#define KERNEL_FILE "/unix" #define KERNEL_FILE "/unix"
......
...@@ -2447,7 +2447,7 @@ croak (char *badfunc) ...@@ -2447,7 +2447,7 @@ croak (char *badfunc)
/* Directory routines for systems that don't have them. */ /* Directory routines for systems that don't have them. */
#ifdef SYSV_SYSTEM_DIR #ifdef HAVE_DIRENT_H
#include <dirent.h> #include <dirent.h>
...@@ -2464,7 +2464,7 @@ closedir (DIR *dirp /* stream from opendir */) ...@@ -2464,7 +2464,7 @@ closedir (DIR *dirp /* stream from opendir */)
return rtnval; return rtnval;
} }
#endif /* not HAVE_CLOSEDIR */ #endif /* not HAVE_CLOSEDIR */
#endif /* SYSV_SYSTEM_DIR */ #endif /* HAVE_DIRENT_H */
int int
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment