aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--awk.h6
-rw-r--r--extension/ChangeLog5
-rw-r--r--extension/gawkdirfd.h14
-rw-r--r--io.c4
5 files changed, 26 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 74c7a139..ac3d2276 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-07-24 Arnold D. Robbins <arnold@skeeve.com>
+
+ * io.c (FAKE_FD_VALUE): Move definition from here ...
+ * awk.h (FAKE_FD_VALUE): ... to here. Fixes compilation on MinGW.
+
2013-07-08 Arnold D. Robbins <arnold@skeeve.com>
* io.c (get_a_record): Change `min' to `MIN' for consistency with
diff --git a/awk.h b/awk.h
index b9d3a1b0..e01726d9 100644
--- a/awk.h
+++ b/awk.h
@@ -206,6 +206,12 @@ typedef void *stackoverflow_context_t;
#define stackoverflow_install_handler(catchstackoverflow, extra_stack, STACK_SIZE) 0
#endif
+/*
+ * This is for fake directory file descriptors on systems that don't
+ * allow to open() a directory.
+ */
+#define FAKE_FD_VALUE 42
+
/* use this as lintwarn("...")
this is a hack but it gives us the right semantics */
#define lintwarn (*(set_loc(__FILE__, __LINE__),lintfunc))
diff --git a/extension/ChangeLog b/extension/ChangeLog
index 04159df8..91146f3b 100644
--- a/extension/ChangeLog
+++ b/extension/ChangeLog
@@ -1,3 +1,8 @@
+2013-07-24 Arnold D. Robbins <arnold@skeeve.com>
+
+ * gawkdirfd.h (FAKE_FD_VALUE): Move definition up in the file to give
+ clean compile on MinGW.
+
2013-06-10 Arnold D. Robbins <arnold@skeeve.com>
* configure.ac (AC_HEADER_MAJOR): New macro added.
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
diff --git a/io.c b/io.c
index a1c902ba..59ddd115 100644
--- a/io.c
+++ b/io.c
@@ -185,10 +185,6 @@
#define INCREMENT_REC(X) X++
#endif
-/* This is for fake directory file descriptors on systems that don't
- allow to open() a directory. */
-#define FAKE_FD_VALUE 42
-
typedef enum { CLOSE_ALL, CLOSE_TO, CLOSE_FROM } two_way_close_type;
/* Several macros to make the code a bit clearer. */