bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dirent.h on MSVC


From: Bruno Haible
Subject: Re: dirent.h on MSVC
Date: Wed, 21 Sep 2011 23:20:07 +0200
User-agent: KMail/1.13.6 (Linux/2.6.37.6-0.5-desktop; KDE/4.6.0; x86_64; ; )

I did on 2011-09-12:
>       * lib/opendir.c: New file.

This doesn't compile on mingw, because of NULL. Trivial fix:


2011-09-21  Bruno Haible  <address@hidden>

        opendir: Avoid compilation error on mingw.
        * lib/opendir.c: Include <stddef.h> always. Include <unistd.h> as well.
        * modules/opendir (Depends-on): Add unistd.

--- lib/opendir.c.orig  Wed Sep 21 23:10:13 2011
+++ lib/opendir.c       Wed Sep 21 23:09:14 2011
@@ -20,6 +20,7 @@
 #include <dirent.h>
 
 #include <errno.h>
+#include <stddef.h>
 
 #if HAVE_OPENDIR
 
@@ -28,7 +29,6 @@
 
 #else
 
-# include <stddef.h>
 # include <stdlib.h>
 
 # include "dirent-private.h"
@@ -36,6 +36,10 @@
 
 #endif
 
+#if REPLACE_FCHDIR
+# include <unistd.h>
+#endif
+
 DIR *
 opendir (const char *dir_name)
 {
--- modules/opendir.orig        Wed Sep 21 23:10:13 2011
+++ modules/opendir     Wed Sep 21 23:09:53 2011
@@ -10,6 +10,7 @@
 dirent
 largefile
 filename        [test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1]
+unistd          [test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1]
 
 configure.ac:
 gl_FUNC_OPENDIR
-- 
In memoriam Orlando Letelier <http://en.wikipedia.org/wiki/Orlando_Letelier>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]