aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJan D2010-07-29 22:01:08 +0200
committerJan D2010-07-29 22:01:08 +0200
commit1c97e8579359838ceeb50694a635392e4abfdd91 (patch)
tree3e72825ef63f7f0e04a262050078da624034ef25 /src
parent1b231651ce7fd7c47a8ed3fbe8f2ca72f8339964 (diff)
downloademacs-1c97e8579359838ceeb50694a635392e4abfdd91.tar.gz
emacs-1c97e8579359838ceeb50694a635392e4abfdd91.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog8
-rw-r--r--src/config.in3
-rw-r--r--src/dired.c13
-rw-r--r--src/s/aix4-2.h5
-rw-r--r--src/s/bsd-common.h2
-rw-r--r--src/s/cygwin.h1
-rw-r--r--src/s/gnu-linux.h2
-rw-r--r--src/s/msdos.h2
-rw-r--r--src/s/usg5-4-common.h4
-rw-r--r--src/sysdep.c4
10 files changed, 16 insertions, 28 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index a3f0384194a..17a82aea13e 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,11 @@
12010-07-27 Chad Brown <yandros@mit.edu>
2
3 Replace tests for SYSV_SYSTEM_DIR with HAVE_DIRENT_H, set via autoconf
4 * dired.c, sysdep.c: test HAVE_DIRENT_H instead of SYSV_SYSTEM_DIR
5
6 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/gnu-linux.h,
7 s/msdos.h, s/usg5-4.h: don't define SYSV_SYSTEM_DIR
8
12010-07-29 Dan Nicolaescu <dann@ics.uci.edu> 92010-07-29 Dan Nicolaescu <dann@ics.uci.edu>
2 10
3 Rename s/usg5-4.h -> s/usg5-4-common.h. 11 Rename s/usg5-4.h -> s/usg5-4-common.h.
diff --git a/src/config.in b/src/config.in
index 647c8804dff..e6e67319bdd 100644
--- a/src/config.in
+++ b/src/config.in
@@ -150,6 +150,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
150/* Define to 1 if you have the `difftime' function. */ 150/* Define to 1 if you have the `difftime' function. */
151#undef HAVE_DIFFTIME 151#undef HAVE_DIFFTIME
152 152
153/* Define to 1 if you have the <dirent.h> header file. */
154#undef HAVE_DIRENT_H
155
153/* Define to 1 if you have the `dup2' function. */ 156/* Define to 1 if you have the `dup2' function. */
154#undef HAVE_DUP2 157#undef HAVE_DUP2
155 158
diff --git a/src/dired.c b/src/dired.c
index aec64f94379..fc033ac7e39 100644
--- a/src/dired.c
+++ b/src/dired.c
@@ -48,29 +48,22 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
48 Since applying strlen to the name always works, we'll just do that. */ 48 Since applying strlen to the name always works, we'll just do that. */
49#define NAMLEN(p) strlen (p->d_name) 49#define NAMLEN(p) strlen (p->d_name)
50 50
51#ifdef SYSV_SYSTEM_DIR 51#ifdef HAVE_DIRENT_H
52 52
53#include <dirent.h> 53#include <dirent.h>
54#define DIRENTRY struct dirent 54#define DIRENTRY struct dirent
55 55
56#else /* not SYSV_SYSTEM_DIR */ 56#else /* not HAVE_DIRENT_H */
57 57
58#ifdef MSDOS
59#include <dirent.h>
60#else
61#include <sys/dir.h> 58#include <sys/dir.h>
62#endif
63
64#include <sys/stat.h> 59#include <sys/stat.h>
65 60
66#ifndef MSDOS
67#define DIRENTRY struct direct 61#define DIRENTRY struct direct
68 62
69extern DIR *opendir (char *); 63extern DIR *opendir (char *);
70extern struct direct *readdir (DIR *); 64extern struct direct *readdir (DIR *);
71 65
72#endif /* not MSDOS */ 66#endif /* HAVE_DIRENT_H */
73#endif /* not SYSV_SYSTEM_DIR */
74 67
75/* Some versions of Cygwin don't have d_ino in `struct dirent'. */ 68/* Some versions of Cygwin don't have d_ino in `struct dirent'. */
76#if defined(MSDOS) || defined(__CYGWIN__) 69#if defined(MSDOS) || defined(__CYGWIN__)
diff --git a/src/s/aix4-2.h b/src/s/aix4-2.h
index cf06f9befe0..84920f888e1 100644
--- a/src/s/aix4-2.h
+++ b/src/s/aix4-2.h
@@ -47,11 +47,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
47/* Define HAVE_SOCKETS if system supports 4.2-compatible sockets. */ 47/* Define HAVE_SOCKETS if system supports 4.2-compatible sockets. */
48#define HAVE_SOCKETS 48#define HAVE_SOCKETS
49 49
50
51/* Define SYSV_SYSTEM_DIR to use the V.3 getdents/readir library
52 functions. Almost, but not quite the same as the 4.2 functions. */
53#define SYSV_SYSTEM_DIR
54
55/* The file containing the kernel's symbol table is called /unix. */ 50/* The file containing the kernel's symbol table is called /unix. */
56#define KERNEL_FILE "/unix" 51#define KERNEL_FILE "/unix"
57 52
diff --git a/src/s/bsd-common.h b/src/s/bsd-common.h
index ffb7a637488..bf78f4ec347 100644
--- a/src/s/bsd-common.h
+++ b/src/s/bsd-common.h
@@ -45,8 +45,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
45#define HAVE_TERMIOS 45#define HAVE_TERMIOS
46#define NO_TERMIO 46#define NO_TERMIO
47 47
48#define SYSV_SYSTEM_DIR
49
50/* If the system's imake configuration file defines `NeedWidePrototypes' 48/* If the system's imake configuration file defines `NeedWidePrototypes'
51 as `NO', we must define NARROWPROTO manually. Such a define is 49 as `NO', we must define NARROWPROTO manually. Such a define is
52 generated in the Makefile generated by `xmkmf'. If we don't 50 generated in the Makefile generated by `xmkmf'. If we don't
diff --git a/src/s/cygwin.h b/src/s/cygwin.h
index 93df925fcab..1b78ada53bd 100644
--- a/src/s/cygwin.h
+++ b/src/s/cygwin.h
@@ -89,7 +89,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
89#define CYGWIN 1 89#define CYGWIN 1
90 90
91#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base) 91#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base)
92#define SYSV_SYSTEM_DIR 1
93 92
94#define HAVE_SOCKETS 93#define HAVE_SOCKETS
95 94
diff --git a/src/s/gnu-linux.h b/src/s/gnu-linux.h
index 80092f725fc..cf3b3079726 100644
--- a/src/s/gnu-linux.h
+++ b/src/s/gnu-linux.h
@@ -124,8 +124,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
124#define INTERRUPT_INPUT 124#define INTERRUPT_INPUT
125#endif /* emacs */ 125#endif /* emacs */
126 126
127#define SYSV_SYSTEM_DIR /* use dirent.h */
128
129#define POSIX /* affects getpagesize.h and systty.h */ 127#define POSIX /* affects getpagesize.h and systty.h */
130 128
131/* This is to work around mysterious gcc failures in some system versions. 129/* This is to work around mysterious gcc failures in some system versions.
diff --git a/src/s/msdos.h b/src/s/msdos.h
index ffbae8777e2..8dd8e3cf490 100644
--- a/src/s/msdos.h
+++ b/src/s/msdos.h
@@ -38,8 +38,6 @@ You lose; /* Emacs for DOS must be compiled with DJGPP */
38 It sets the Lisp variable system-type. */ 38 It sets the Lisp variable system-type. */
39#define SYSTEM_TYPE "ms-dos" 39#define SYSTEM_TYPE "ms-dos"
40 40
41#define SYSV_SYSTEM_DIR
42
43/* subprocesses should be defined if you want to have code for 41/* subprocesses should be defined if you want to have code for
44 asynchronous subprocesses (as used in M-x compile and M-x shell). 42 asynchronous subprocesses (as used in M-x compile and M-x shell).
45 This is the only system that needs this. */ 43 This is the only system that needs this. */
diff --git a/src/s/usg5-4-common.h b/src/s/usg5-4-common.h
index 0fcc6623450..7ff5c6f7be3 100644
--- a/src/s/usg5-4-common.h
+++ b/src/s/usg5-4-common.h
@@ -35,10 +35,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
35 for terminal control. */ 35 for terminal control. */
36#define HAVE_TERMIO 36#define HAVE_TERMIO
37 37
38/* Define SYSV_SYSTEM_DIR to use the V.3 getdents/readir library
39 functions. Almost, but not quite the same as the 4.2 functions. */
40#define SYSV_SYSTEM_DIR
41
42/* The file containing the kernel's symbol table is called /unix. */ 38/* The file containing the kernel's symbol table is called /unix. */
43#define KERNEL_FILE "/unix" 39#define KERNEL_FILE "/unix"
44 40
diff --git a/src/sysdep.c b/src/sysdep.c
index d720c7c5811..c5b0cb361db 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -2447,7 +2447,7 @@ croak (char *badfunc)
2447 2447
2448/* Directory routines for systems that don't have them. */ 2448/* Directory routines for systems that don't have them. */
2449 2449
2450#ifdef SYSV_SYSTEM_DIR 2450#ifdef HAVE_DIRENT_H
2451 2451
2452#include <dirent.h> 2452#include <dirent.h>
2453 2453
@@ -2464,7 +2464,7 @@ closedir (DIR *dirp /* stream from opendir */)
2464 return rtnval; 2464 return rtnval;
2465} 2465}
2466#endif /* not HAVE_CLOSEDIR */ 2466#endif /* not HAVE_CLOSEDIR */
2467#endif /* SYSV_SYSTEM_DIR */ 2467#endif /* HAVE_DIRENT_H */
2468 2468
2469 2469
2470int 2470int