[pacman-dev] [PATCH] Drastically reduce the number of syscalls.

Allan McRae allan at archlinux.org
Thu Aug 5 01:17:33 EDT 2010

On 05/08/10 07:36, Tim Nieradzik wrote:
> On Wed, 04 Aug 2010 14:45, Allan McRae wrote:
>> That is a platform specific construct (not defined by POSIX).  It
>> works with glibc (not sure about uclibc) and on BSD libc, but I
>> believe this broken on OSX and potentially on broken cygwin.  And
>> those are only the platforms I know people are using pacman on...
>> Any ideas if we can autoconf around that?
> Looks like DT_DIR is defined in Mac OS X, too (cf. [1]).
> It's also supported in Cygwin (since 1.7.0, see [2]).
> I think it'd be best to go with a simple "#ifdef DT_DIR". If you'd
> rather do it the autoconf-way, you could try a similar approach as in
> this [3] patch.
> [1] http://developer.apple.com/mac/library/documentation/Darwin/Reference/ManPages/man5/dir.5.html
> [2] http://lists.zerezo.com/cygwin/msg42255.html
> [3] http://www.mail-archive.com/notmuch@notmuchmail.org/msg02242.html

Well, it looks like updates to Cygwin and OSX have added support.   So I 
think it is fine to use this approach.

@Dan: given most platforms support DT_DIR, would you prefer to just 
assume DT_DIR support or do something like creating a function _is_dir() 
with an "#ifdef DT_DIR" block?


More information about the pacman-dev mailing list