aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2016-07-01 06:38:01 +0300
committerArnold D. Robbins <arnold@skeeve.com>2016-07-01 06:38:01 +0300
commitbc1cf4039d9e52ae7b285f20e68a846d9143a210 (patch)
treebb8eaddac245266f2add4ba28b5e8a1956d2e5b5
parent5da46e952e81f827abc4b75bd79178cfc2875460 (diff)
downloadegawk-bc1cf4039d9e52ae7b285f20e68a846d9143a210.tar.gz
egawk-bc1cf4039d9e52ae7b285f20e68a846d9143a210.tar.bz2
egawk-bc1cf4039d9e52ae7b285f20e68a846d9143a210.zip
Minor portability fixes in some of the extensions.
-rw-r--r--extension/ChangeLog9
-rw-r--r--extension/inplace.c1
-rw-r--r--extension/revtwoway.c8
3 files changed, 15 insertions, 3 deletions
diff --git a/extension/ChangeLog b/extension/ChangeLog
index 7f62f11b..71af2159 100644
--- a/extension/ChangeLog
+++ b/extension/ChangeLog
@@ -1,3 +1,12 @@
+2016-07-01 Arnold D. Robbins <arnold@skeeve.com>
+
+ * inplace.c (do_inplace_begin): Flush stdout at the start to
+ try to avoid flushing problems on some obscure BSD systems.
+ * revtwoway.c (gawk_getdtablesize): Renamed from getdtablesize.
+ (getdtablesize): New macro. Avoids problems on FreeBSD 10
+ where configure didn't work correctly. Thanks to Nelson Beebe.
+ Update copyright year.
+
2016-01-27 Arnold D. Robbins <arnold@skeeve.com>
* filefuncs.c (do_statvfs): Define out f_fsid on AIX.
diff --git a/extension/inplace.c b/extension/inplace.c
index 07d256b7..c7eb5564 100644
--- a/extension/inplace.c
+++ b/extension/inplace.c
@@ -125,6 +125,7 @@ do_inplace_begin(int nargs, awk_value_t *result)
int fd;
assert(result != NULL);
+ fflush(stdout);
if (state.tname)
fatal(ext_id, _("inplace_begin: in-place editing already active"));
diff --git a/extension/revtwoway.c b/extension/revtwoway.c
index c0d9381a..dfe58a1e 100644
--- a/extension/revtwoway.c
+++ b/extension/revtwoway.c
@@ -7,7 +7,7 @@
*/
/*
- * Copyright (C) 2012-2014 the Free Software Foundation, Inc.
+ * Copyright (C) 2012-2014, 2016 the Free Software Foundation, Inc.
*
* This file is part of GAWK, the GNU implementation of the
* AWK Programming Language.
@@ -64,10 +64,10 @@ int plugin_is_GPL_compatible;
static size_t max_fds;
#ifndef HAVE_GETDTABLESIZE
-/* getdtablesize --- replacement version that should be good enough */
+/* gawk_getdtablesize --- replacement version that should be good enough */
static inline int
-getdtablesize()
+gawk_getdtablesize()
{
/*
* Algorithm for the GNULIB folks:
@@ -89,6 +89,8 @@ getdtablesize()
/* In the meantime, this is good enough for us: */
return 1024;
}
+
+#define getdtablesize() gawk_getdtablesize()
#endif
/*