[pacman-dev] [PATCH] Drastically reduce the number of syscalls.
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. ).
> It's also supported in Cygwin (since 1.7.0, see ).
> 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  patch.
>  http://developer.apple.com/mac/library/documentation/Darwin/Reference/ManPages/man5/dir.5.html
>  http://lists.zerezo.com/cygwin/msg42255.html
>  http://firstname.lastname@example.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