aboutsummaryrefslogtreecommitdiffstats
path: root/extension/inplace.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2013-01-22 20:45:40 +0200
committerArnold D. Robbins <arnold@skeeve.com>2013-01-22 20:45:40 +0200
commitb524848350bded2a8a05673b679dc707eae378b4 (patch)
tree7126277dbcfd691d6312d3f180a79d0af99b9572 /extension/inplace.c
parente2d1cb477ed8359991efa29024ca117ca2674725 (diff)
downloadegawk-b524848350bded2a8a05673b679dc707eae378b4.tar.gz
egawk-b524848350bded2a8a05673b679dc707eae378b4.tar.bz2
egawk-b524848350bded2a8a05673b679dc707eae378b4.zip
Improve portability.
Diffstat (limited to 'extension/inplace.c')
-rw-r--r--extension/inplace.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/extension/inplace.c b/extension/inplace.c
index 20682ea5..e09f9000 100644
--- a/extension/inplace.c
+++ b/extension/inplace.c
@@ -44,6 +44,10 @@
#define _(msgid) gettext(msgid)
#define N_(msgid) msgid
+#if ! defined(S_ISREG) && defined(S_IFREG)
+#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
+#endif
+
static const gawk_api_t *api; /* for convenience macros to work */
static awk_ext_id_t *ext_id;
static const char *ext_version = "inplace extension: version 1.0";