aboutsummaryrefslogtreecommitdiffstats
path: root/extension
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2013-02-11 20:57:47 +0200
committerArnold D. Robbins <arnold@skeeve.com>2013-02-11 20:57:47 +0200
commit4d8fd72d6cdd54aec2881ef5ecb17cad0e595f99 (patch)
treee167b86935c88820aee45d80230440a241323694 /extension
parent0c0982740c0afda6ec893e6fcd361533033331f4 (diff)
downloadegawk-4d8fd72d6cdd54aec2881ef5ecb17cad0e595f99.tar.gz
egawk-4d8fd72d6cdd54aec2881ef5ecb17cad0e595f99.tar.bz2
egawk-4d8fd72d6cdd54aec2881ef5ecb17cad0e595f99.zip
Add backup version of fnmatch.c. Fix fnmatch extension.
Diffstat (limited to 'extension')
-rw-r--r--extension/ChangeLog5
-rw-r--r--extension/fnmatch.c9
2 files changed, 13 insertions, 1 deletions
diff --git a/extension/ChangeLog b/extension/ChangeLog
index 9304e5b8..291b564d 100644
--- a/extension/ChangeLog
+++ b/extension/ChangeLog
@@ -1,3 +1,8 @@
+2013-02-11 Arnold D. Robbins <arnold@skeeve.com>
+
+ * fnmatch.c: Pull in versions of C routine from missing_d
+ if the native system doesn't provide them.
+
2013-02-11 Eli Zaretskii <eliz@gnu.org>
* filefuncs.c (S_ISLNK, lstat, readlink, S_IRGRP, S_IWGRP, S_IXGRP,
diff --git a/extension/fnmatch.c b/extension/fnmatch.c
index c63fe136..7f8ab8d7 100644
--- a/extension/fnmatch.c
+++ b/extension/fnmatch.c
@@ -45,9 +45,16 @@
#define _(msgid) gettext(msgid)
#define N_(msgid) msgid
-#ifdef HAVE_FNMATCH_H
#define _GNU_SOURCE 1 /* use GNU extensions if they're there */
+#ifdef HAVE_FNMATCH_H
#include <fnmatch.h>
+#else
+#include "../missing_d/fnmatch.h" /* version that comes with gawk */
+#endif
+
+#ifndef HAVE_FNMATCH
+#include "../missing_d/fnmatch.c" /* ditto */
+#define HAVE_FNMATCH
#endif
/* Provide GNU extensions as no-ops if not defined */