all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: 12958@debbugs.gnu.org
Subject: bug#12958: Assume POSIX 1003.1-1988 or later for dirent.h.
Date: Thu, 22 Nov 2012 19:19:49 +0200	[thread overview]
Message-ID: <83y5httv0q.fsf@gnu.org> (raw)
In-Reply-To: <50ADA717.4060007@cs.ucla.edu>

> Date: Wed, 21 Nov 2012 20:16:23 -0800
> From: Paul Eggert <eggert@cs.ucla.edu>
> 
> Here's a patch that I'd like to install to simplify Emacs based
> on assuming that the underyling system supports POSIX 1003.1-1988
> or later with respect to dirent.h.  This is universal these days
> on GNUish hosts.  I'm CC'ing this to Eli, as this affects the
> Microsoft port, by updating it a bit to use the POSIXish
> "struct dirent" rather than the pre-POSIX "struct direct".
> I have tested this on GNU/Linux but not on Microsoft.

This is OK, but this part:

> +/* Return true if DP represents a real directory entry.  */
> +static bool
> +dirent_nonempty (struct dirent *dp)
> +{
> +#ifdef MSDOS
> +  return dp->d_name[0] != 0;
> +#else
> +  return 1;
> +#endif
> +}

is not needed at all.  The reason there was an MSDOS specific
definition of DIRENT_NONEMPTY macro is that the Posix definition used
d_ino, which the MSDOS implementation doesn't provide.  But if that
member is not used, we can toss this macro and assume that every entry
is "real".

Otherwise, I see no problems with this patch.

Thanks.





  parent reply	other threads:[~2012-11-22 17:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-22  4:16 bug#12958: Assume POSIX 1003.1-1988 or later for dirent.h Paul Eggert
2012-11-22  4:36 ` Paul Eggert
2012-11-22 16:26   ` Eli Zaretskii
2012-11-22 17:19 ` Eli Zaretskii [this message]
2012-11-23  9:09   ` Paul Eggert
2012-11-22 17:47 ` Juanma Barranquero

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=83y5httv0q.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=12958@debbugs.gnu.org \
    --cc=eggert@cs.ucla.edu \
    /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.