[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: glob.c and MSVC
From: |
Gisle Vanem |
Subject: |
Re: glob.c and MSVC |
Date: |
Wed, 25 Feb 2015 01:43:38 +0100 |
User-agent: |
Mozilla/5.0 (Windows NT 6.3; WOW64; rv:35.0) Gecko/20100101 Firefox/35.0 SeaMonkey/2.32.1 |
Paul Eggert wrote 22-Jan-2015:
diff --git a/ChangeLog b/ChangeLog
index e0c12d3..8839306 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2015-01-21 Paul Eggert<address@hidden>
+
+ getcwd, glob, scandir: port to MSVC
+ Problem reported by Gisle Vanem in:
+ http://lists.gnu.org/archive/html/bug-gnulib/2015-01/msg00066.html
+ * lib/getcwd.c, lib/glob.c, lib/scandir.c:
+ Do not #undef opendir and closedir if !HAVE_OPENDIR.
The MSVC build is still broken by a reversion of the above Changelog
entry (or that change never made it in?). MSVC does NOT have opendir(),
closedir() etc. Hence this should be there AFAICS:
--- a/glob.c 2015-02-24 21:28:53 +0000 (forget the time-stamp; I just did a fresh
"git clone")
+++ b/glob.c 2015-02-24 21:51:40 +0000
@@ -188,8 +188,10 @@
therefore save some unnecessary recursion in fchdir.c and opendir_safer.c.
FIXME - if the kernel ever adds support for multi-thread safety for
avoiding standard fds, then we should use opendir_safer. */
+# if HAVE_OPENDIR
# undef opendir
# undef closedir
+# endif
# if HAVE_ALLOCA
/* The OS usually guarantees only one guard page at the bottom of the stack,
---------------
Otherwise I'm getting this link error:
glob.obj : error LNK2019: unresolved external symbol _opendir referenced in
function _glob_in_dir
glob.obj : error LNK2019: unresolved external symbol _closedir referenced in
function _glob_in_dir
where rpl_opendir + rpl_closedir should have been used instead (I do have
those).
--
--gv
- Re: glob.c and MSVC,
Gisle Vanem <=