all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Chad Brown <yandros@MIT.EDU>
To: Emacs development discussions <emacs-devel@gnu.org>
Subject: Re: recent commit broke src/dired.c on OSX
Date: Tue, 27 Jul 2010 14:40:26 -0700	[thread overview]
Message-ID: <4449EC4A-94C7-4C9E-A156-1EC94EE64707@mit.edu> (raw)
In-Reply-To: <83d3uab2np.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 85 bytes --]

Second try at the patch, with ChangeLogs and msdos build system changes included.


[-- Attachment #2: dirent.patch --]
[-- Type: application/octet-stream, Size: 6660 bytes --]

=== modified file 'ChangeLog'
--- ChangeLog	2010-07-25 19:09:54 +0000
+++ ChangeLog	2010-07-27 01:56:57 +0000
@@ -1,3 +1,7 @@
+2010-07-27  Chad Brown <yandros@mit.edu>
+
+	* configure.in: Check for dirent.h
+
 2010-07-25  Andreas Schwab  <schwab@linux-m68k.org>
 
 	* configure.in: Check for __executable_start.

=== modified file 'configure.in'
--- configure.in	2010-07-25 19:09:54 +0000
+++ configure.in	2010-07-26 02:36:43 +0000
@@ -1204,7 +1204,7 @@
   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 \
   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_TRY_COMPILE([#include <sys/personality.h>], [personality (PER_LINUX32)],

=== modified file 'msdos/ChangeLog'
--- msdos/ChangeLog	2010-07-24 11:53:19 +0000
+++ msdos/ChangeLog	2010-07-27 02:22:21 +0000
@@ -1,3 +1,7 @@
+2010-07-27  Chad Brown  <yandros@mit.edu>
+
+	* sed2v2.inp (HAVE_DIRENT_H): Edit to 1
+
 2010-07-12  Eli Zaretskii  <eliz@gnu.org>
 
 	* sed1v2.inp (C_WARNINGS_SWITCH, PROFILING_CFLAGS, PROFILING_LDFLAGS):

=== modified file 'msdos/sed2v2.inp'
--- msdos/sed2v2.inp	2010-07-11 13:43:10 +0000
+++ msdos/sed2v2.inp	2010-07-27 01:05:52 +0000
@@ -57,6 +57,7 @@
 /^#undef PACKAGE_TARNAME/s/^.*$/#define PACKAGE_TARNAME ""/
 /^#undef PACKAGE_VERSION/s/^.*$/#define PACKAGE_VERSION ""/
 /^#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 REL_ALLOC *$/s/^.*$/#define REL_ALLOC 1/

=== modified file 'src/ChangeLog'
--- src/ChangeLog	2010-07-26 00:43:58 +0000
+++ src/ChangeLog	2010-07-27 02:19:03 +0000
@@ -1,3 +1,11 @@
+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-26  Juanma Barranquero  <lekktu@gmail.com>
 
 	* lread.c (unreadpure, mapatoms_1): Make static.

=== modified file 'src/config.in'
--- src/config.in	2010-07-25 19:09:54 +0000
+++ src/config.in	2010-07-26 02:43:53 +0000
@@ -737,6 +737,9 @@
 /* Define to 1 if you have the <utmp.h> header file. */
 #undef HAVE_UTMP_H
 
+/* Define to 1 if you have the <dirent.h> header file. */
+#undef HAVE_DIRENT_H
+
 /* Define to 1 if you have the `vfork' function. */
 #undef HAVE_VFORK
 

=== modified file 'src/dired.c'
--- src/dired.c	2010-07-25 00:20:51 +0000
+++ src/dired.c	2010-07-27 00:55:10 +0000
@@ -48,29 +48,22 @@
    Since applying strlen to the name always works, we'll just do that.  */
 #define NAMLEN(p) strlen (p->d_name)
 
-#ifdef SYSV_SYSTEM_DIR
+#ifdef HAVE_DIRENT_H
 
 #include <dirent.h>
 #define DIRENTRY struct dirent
 
-#else /* not SYSV_SYSTEM_DIR */
+#else /* not HAVE_DIRENT_H */
 
-#ifdef MSDOS
-#include <dirent.h>
-#else
 #include <sys/dir.h>
-#endif
-
 #include <sys/stat.h>
 
-#ifndef MSDOS
 #define DIRENTRY struct direct
 
 extern DIR *opendir (char *);
 extern struct direct *readdir (DIR *);
 
-#endif /* not MSDOS */
-#endif /* not SYSV_SYSTEM_DIR */
+#endif /* HAVE_DIRENT_H */
 
 /* Some versions of Cygwin don't have d_ino in `struct dirent'.  */
 #if defined(MSDOS) || defined(__CYGWIN__)

=== modified file 'src/s/aix4-2.h'
--- src/s/aix4-2.h	2010-06-30 02:48:54 +0000
+++ src/s/aix4-2.h	2010-07-26 08:23:46 +0000
@@ -47,11 +47,6 @@
 /* Define HAVE_SOCKETS if system supports 4.2-compatible 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.  */
 #define KERNEL_FILE "/unix"
 

=== modified file 'src/s/bsd-common.h'
--- src/s/bsd-common.h	2010-06-06 08:57:39 +0000
+++ src/s/bsd-common.h	2010-07-26 08:23:45 +0000
@@ -45,8 +45,6 @@
 #define HAVE_TERMIOS
 #define NO_TERMIO
 
-#define SYSV_SYSTEM_DIR
-
 /* If the system's imake configuration file defines `NeedWidePrototypes'
    as `NO', we must define NARROWPROTO manually.  Such a define is
    generated in the Makefile generated by `xmkmf'.  If we don't

=== modified file 'src/s/cygwin.h'
--- src/s/cygwin.h	2010-06-06 08:57:39 +0000
+++ src/s/cygwin.h	2010-07-26 08:23:44 +0000
@@ -89,7 +89,6 @@
 #define CYGWIN 1
 
 #define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base)
-#define SYSV_SYSTEM_DIR 1
 
 #define HAVE_SOCKETS
 

=== modified file 'src/s/gnu-linux.h'
--- src/s/gnu-linux.h	2010-06-06 08:57:39 +0000
+++ src/s/gnu-linux.h	2010-07-26 08:23:43 +0000
@@ -124,8 +124,6 @@
 #define INTERRUPT_INPUT
 #endif /* emacs */
 
-#define SYSV_SYSTEM_DIR       /* use dirent.h */
-
 #define POSIX                 /* affects getpagesize.h and systty.h */
 
 /* This is to work around mysterious gcc failures in some system versions.

=== modified file 'src/s/msdos.h'
--- src/s/msdos.h	2010-07-12 16:56:59 +0000
+++ src/s/msdos.h	2010-07-26 08:23:42 +0000
@@ -38,8 +38,6 @@
    It sets the Lisp variable system-type.  */
 #define SYSTEM_TYPE "ms-dos"
 
-#define SYSV_SYSTEM_DIR
-
 /* subprocesses should be defined if you want to have code for
    asynchronous subprocesses (as used in M-x compile and M-x shell).
    This is the only system that needs this.  */

=== modified file 'src/s/usg5-4.h'
--- src/s/usg5-4.h	2010-07-11 10:31:10 +0000
+++ src/s/usg5-4.h	2010-07-26 08:23:40 +0000
@@ -35,10 +35,6 @@
    for terminal control.  */
 #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.  */
 #define KERNEL_FILE "/unix"
 

=== modified file 'src/sysdep.c'
--- src/sysdep.c	2010-07-13 10:57:00 +0000
+++ src/sysdep.c	2010-07-26 09:01:39 +0000
@@ -2447,7 +2447,7 @@
 \f
 /* Directory routines for systems that don't have them. */
 
-#ifdef SYSV_SYSTEM_DIR
+#ifdef HAVE_DIRENT_H
 
 #include <dirent.h>
 
@@ -2464,7 +2464,7 @@
   return rtnval;
 }
 #endif /* not HAVE_CLOSEDIR */
-#endif /* SYSV_SYSTEM_DIR */
+#endif /* HAVE_DIRENT_H */
 
 \f
 int


  reply	other threads:[~2010-07-27 21:40 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-25 17:23 recent commit broke src/dired.c on OSX Randal L. Schwartz
2010-07-25 17:30 ` Juanma Barranquero
2010-07-25 17:40   ` Randal L. Schwartz
2010-07-25 17:51     ` Juanma Barranquero
2010-07-25 17:58       ` Randal L. Schwartz
2010-07-25 18:04         ` Juanma Barranquero
2010-07-25 20:12           ` Chad Brown
2010-07-25 20:39             ` Juanma Barranquero
2010-07-26  2:46               ` Chad Brown
2010-07-26  3:12                 ` Chad Brown
2010-07-26  3:43                   ` Juanma Barranquero
2010-07-26  8:44                     ` David Kastrup
2010-07-26  9:58                       ` Juanma Barranquero
2010-07-26  6:02                   ` Jan Djärv
2010-07-26  6:33                   ` Jan Djärv
2010-07-26 16:58                   ` Eli Zaretskii
2010-07-27 21:40                     ` Chad Brown [this message]
2010-07-27 23:18                       ` Juanma Barranquero
2010-07-27 23:28                         ` Óscar Fuentes
2010-07-28  0:16                           ` Juanma Barranquero
2010-07-28  0:33                             ` Óscar Fuentes
2010-07-28  0:45                               ` Juanma Barranquero
2010-07-28  0:54                                 ` Óscar Fuentes
2010-07-28  0:58                                   ` Juanma Barranquero
2010-07-28  6:32                       ` Jan Djärv
2010-07-25 20:44             ` Eli Zaretskii
2010-07-29 18:21         ` Randal L. Schwartz
2010-07-29 19:11           ` Jan Djärv
2010-07-29 19:19             ` Randal L. Schwartz
2010-07-29 19:29             ` Chad Brown
2010-07-29 20:09               ` Jan Djärv
2010-07-29 20:37                 ` Óscar Fuentes
2010-07-29 21:07                   ` Jan Djärv
2010-07-29 21:17                     ` Óscar Fuentes
2010-07-29 23:19                     ` Chad Brown
2010-07-25 20:50       ` Dan Nicolaescu
2010-07-25 20:54         ` Juanma Barranquero
2010-07-25 20:59         ` Eli Zaretskii
2010-07-25 21:26   ` Jan Djärv
2010-07-25 21:32     ` Jan Djärv
2010-07-25 17:38 ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4449EC4A-94C7-4C9E-A156-1EC94EE64707@mit.edu \
    --to=yandros@mit.edu \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.