From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chad Brown Newsgroups: gmane.emacs.devel Subject: Re: recent commit broke src/dired.c on OSX Date: Sun, 25 Jul 2010 20:12:01 -0700 Message-ID: References: <86iq4379w0.fsf@red.stonehenge.com> <86eier7942.fsf@red.stonehenge.com> <86aapf78af.fsf@red.stonehenge.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1081) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1280114230 22554 80.91.229.12 (26 Jul 2010 03:17:10 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 26 Jul 2010 03:17:10 +0000 (UTC) To: Emacs development discussions Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 26 05:17:08 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OdE74-0003ix-4T for ged-emacs-devel@m.gmane.org; Mon, 26 Jul 2010 05:17:05 +0200 Original-Received: from localhost ([127.0.0.1]:55870 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OdE6v-0000b3-66 for ged-emacs-devel@m.gmane.org; Sun, 25 Jul 2010 23:12:13 -0400 Original-Received: from [140.186.70.92] (port=41409 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OdE6q-0000ai-5s for emacs-devel@gnu.org; Sun, 25 Jul 2010 23:12:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OdE6o-0001f9-5Q for emacs-devel@gnu.org; Sun, 25 Jul 2010 23:12:07 -0400 Original-Received: from dmz-mailsec-scanner-5.mit.edu ([18.7.68.34]:43933) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OdE6o-0001f4-2X for emacs-devel@gnu.org; Sun, 25 Jul 2010 23:12:06 -0400 X-AuditID: 12074422-b7bb6ae0000009fa-31-4c4cfd07d1fc Original-Received: from mailhub-auth-1.mit.edu (MAILHUB-AUTH-1.MIT.EDU [18.9.21.35]) by dmz-mailsec-scanner-5.mit.edu (Symantec Brightmail Gateway) with SMTP id 93.24.02554.70DFC4C4; Sun, 25 Jul 2010 23:12:07 -0400 (EDT) Original-Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by mailhub-auth-1.mit.edu (8.13.8/8.9.2) with ESMTP id o6Q3C56f030293 for ; Sun, 25 Jul 2010 23:12:05 -0400 Original-Received: from [10.0.0.41] ([64.241.37.140]) (authenticated bits=0) (User authenticated as yandros@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id o6Q3C2Rv015746 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT) for ; Sun, 25 Jul 2010 23:12:04 -0400 (EDT) In-Reply-To: X-Mailer: Apple Mail (2.1081) X-Brightmail-Tracker: AAAAAA== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:127814 Archived-At: Here's a stab at implementing Jan's suggestion: testing for dirent.h in = configure instead of dancing around SYSV_SYSTEM_DIR. The changes are = pretty small, and I have signed papers already anyway. I did simplify a test that checked for MSDOS, and I have no way to test = on that platform, so I would appreciate it if someone would check to = make sure I did no harm. Thanks. *Chad P.S. If someone would prefer unidiffs instead, just let me know. Also, = I could put together a ChangeLog entry if that would be helpful -- I = just realized that I hadn't done so, but the changes are pretty = straightforward. =3D=3D=3D modified file 'configure' *** configure 2010-07-25 19:09:54 +0000 --- configure 2010-07-26 02:39:53 +0000 *************** *** 6149,6155 **** 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 do : as_ac_Header=3D`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" = "$ac_includes_default" --- 6149,6155 ---- 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 dirent.h do : as_ac_Header=3D`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" = "$ac_includes_default" =3D=3D=3D modified file 'configure.in' *** configure.in 2010-07-25 19:09:54 +0000 --- configure.in 2010-07-26 02:36:43 +0000 *************** *** 1204,1210 **** 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) =20 AC_MSG_CHECKING(if personality LINUX32 can be set) AC_TRY_COMPILE([#include ], [personality = (PER_LINUX32)], --- 1204,1210 ---- 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 dirent.h) =20 AC_MSG_CHECKING(if personality LINUX32 can be set) AC_TRY_COMPILE([#include ], [personality = (PER_LINUX32)], =3D=3D=3D 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,742 **** --- 737,745 ---- /* Define to 1 if you have the header file. */ #undef HAVE_UTMP_H =20 + /* Define to 1 if you have the header file. */ + #undef HAVE_DIRENT_H +=20 /* Define to 1 if you have the `vfork' function. */ #undef HAVE_VFORK =20 =3D=3D=3D modified file 'src/dired.c' *** src/dired.c 2010-07-25 00:20:51 +0000 --- src/dired.c 2010-07-26 03:03:56 +0000 *************** *** 48,76 **** Since applying strlen to the name always works, we'll just do that. = */ #define NAMLEN(p) strlen (p->d_name) =20 ! #ifdef SYSV_SYSTEM_DIR =20 #include #define DIRENTRY struct dirent =20 ! #else /* not SYSV_SYSTEM_DIR */ =20 - #ifdef MSDOS - #include - #else #include - #endif -=20 #include =20 - #ifndef MSDOS #define DIRENTRY struct direct =20 extern DIR *opendir (char *); extern struct direct *readdir (DIR *); =20 ! #endif /* not MSDOS */ ! #endif /* not SYSV_SYSTEM_DIR */ =20 /* Some versions of Cygwin don't have d_ino in `struct dirent'. */ #if defined(MSDOS) || defined(__CYGWIN__) --- 48,69 ---- Since applying strlen to the name always works, we'll just do that. = */ #define NAMLEN(p) strlen (p->d_name) =20 ! #ifdef HAVE_DIRENT_H =20 #include #define DIRENTRY struct dirent =20 ! #else /* not HAVE_DIRENT */ =20 #include #include =20 #define DIRENTRY struct direct =20 extern DIR *opendir (char *); extern struct direct *readdir (DIR *); =20 ! #endif /* HAVE_DIRENT_H */ =20 /* Some versions of Cygwin don't have d_ino in `struct dirent'. */ #if defined(MSDOS) || defined(__CYGWIN__) =3D=3D=3D modified file 'src/sysdep.c' *** src/sysdep.c 2010-07-13 10:57:00 +0000 --- src/sysdep.c 2010-07-26 02:48:50 +0000 *************** *** 2447,2453 **** =0C /* Directory routines for systems that don't have them. */ =20 ! #ifdef SYSV_SYSTEM_DIR =20 #include =20 --- 2447,2453 ---- =0C /* Directory routines for systems that don't have them. */ =20 ! #ifdef HAVE_DIRENT =20 #include =20 *************** *** 2464,2470 **** return rtnval; } #endif /* not HAVE_CLOSEDIR */ ! #endif /* SYSV_SYSTEM_DIR */ =20 =0C int --- 2464,2470 ---- return rtnval; } #endif /* not HAVE_CLOSEDIR */ ! #endif /* HAVE_DIRENT */ =20 =0C int