aboutsummaryrefslogtreecommitdiffstats
path: root/extension/gawkdirfd.h
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2013-07-24 21:53:30 +0300
committerArnold D. Robbins <arnold@skeeve.com>2013-07-24 21:53:30 +0300
commit0981cc089ea88f146a6c949146e73f88c1b295e9 (patch)
treec38e5520a6d4b8d34fc2cce98c8c9aa3eccc9814 /extension/gawkdirfd.h
parent893f4e3b9bf37cbfd4222970b0bc472e7e6f11d9 (diff)
downloadegawk-0981cc089ea88f146a6c949146e73f88c1b295e9.tar.gz
egawk-0981cc089ea88f146a6c949146e73f88c1b295e9.tar.bz2
egawk-0981cc089ea88f146a6c949146e73f88c1b295e9.zip
Fix compiling on MinGW.
Diffstat (limited to 'extension/gawkdirfd.h')
-rw-r--r--extension/gawkdirfd.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/extension/gawkdirfd.h b/extension/gawkdirfd.h
index 52b91804..4710dab4 100644
--- a/extension/gawkdirfd.h
+++ b/extension/gawkdirfd.h
@@ -25,6 +25,16 @@
# define ENOTSUP ENOSYS
#endif
+/*
+ * This is for fake directory file descriptors on systems that don't
+ * allow to open() a directory.
+ *
+ * It would be nice if this could be shared with the definition in awk.h
+ * in the main code base, but there's not a very clean way to do that,
+ * at least that I can see.
+ */
+#define FAKE_FD_VALUE 42
+
#ifndef DIR_TO_FD
# define DIR_TO_FD(d) (FAKE_FD_VALUE)
#endif
@@ -39,7 +49,3 @@ dirfd (DIR *dir_p)
return fd;
}
#endif /* HAVE_DIRFD */
-
-/* This is for fake directory file descriptors on systems that don't
- allow to open() a directory. */
-#define FAKE_FD_VALUE 42