[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gawk-diffs] [SCM] gawk branch, master, updated. gawk-4.1.0-3635-gf0be50
From: |
Eli Zaretskii |
Subject: |
[gawk-diffs] [SCM] gawk branch, master, updated. gawk-4.1.0-3635-gf0be506 |
Date: |
Sat, 2 Feb 2019 04:54:15 -0500 (EST) |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".
The branch, master has been updated
via f0be506c0b0c2a220e0a3112dca91ec352aad530 (commit)
from ed3ce8fb4800e0746726d7d59642518fa4983889 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=f0be506c0b0c2a220e0a3112dca91ec352aad530
commit f0be506c0b0c2a220e0a3112dca91ec352aad530
Author: Eli Zaretskii <address@hidden>
Date: Sat Feb 2 11:52:51 2019 +0200
Fix compilation errors and warnings with MinGW64.
diff --git a/ChangeLog b/ChangeLog
index b1727e7..1007bb8 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2019-02-02 Eli Zaretskii <address@hidden>
+
+ * nonposix.h: If setlocale is already a defined macro, #undef it
+ before redefining. This avoids compilation warnings if someone
+ tries to compile Gawk with Gettext's libintl.h, which redirects
+ setlocale to its own function.
+ Reported by Budi <address@hidden>.
+
+ * debug.c [__MINGW32__]: Prototype for w32_execvp.
+ (restart) [__MINGW32__]: Call w32_execvp instead of execvp. Don't
+ type-cast d_argv anymore.
+
2019-01-27 Arnold D. Robbins <address@hidden>
* awkgram.y (qualify_name): Return duplicated strings.
diff --git a/debug.c b/debug.c
index c60cc5a..981f95b 100644
--- a/debug.c
+++ b/debug.c
@@ -30,6 +30,10 @@
#include <fcntl.h> /* open() */
#endif
+#ifdef __MINGW32__
+int w32_execvp(const char *, char **);
+#endif
+
extern bool exiting;
extern SRCFILE *srcfiles;
extern INSTRUCTION *rule_list;
@@ -2915,7 +2919,7 @@ restart(bool run)
/* start a new process replacing the current process */
#ifdef __MINGW32__
- execvp(d_argv[0], (const char * const *)d_argv);
+ w32_execvp(d_argv[0], d_argv);
#else
execvp(d_argv[0], d_argv);
#endif
diff --git a/nonposix.h b/nonposix.h
index 26ef32b..52fb21f 100644
--- a/nonposix.h
+++ b/nonposix.h
@@ -57,6 +57,12 @@ int unsetenv (const char *);
int setenv (const char *, const char *, int);
void w32_maybe_set_errno (void);
char *w32_setlocale (int, const char *);
+/* libintl.h from GNU gettext defines setlocale to redirect that to
+ its own function. Note: this will have to be revisited if MinGW
+ Gawk will support ENABLE_NLS at some point. */
+#ifdef setlocale
+# undef setlocale
+#endif
#define setlocale(c,v) w32_setlocale(c,v)
#endif /* __MINGW32__ */
diff --git a/pc/ChangeLog b/pc/ChangeLog
index 3e63e20..18bbbf1 100644
--- a/pc/ChangeLog
+++ b/pc/ChangeLog
@@ -1,5 +1,10 @@
2019-02-02 Eli Zaretskii <address@hidden>
+ * gawkmisc.pc (w32_execvp) [__MINGW32__]: Renamed from execvp, to
+ avoid compiler errors with MinGW64, which stupidly defined a
+ deviant prototype for execvp, because GCC's built-in does.
+ Reported by Budi <address@hidden>.
+
* Makefile.tst (typedregex4):
* GenMakefileTst.awk (substitutions): Replace a literal slash with
$(SLASH) in the typedregex4 test.
diff --git a/pc/gawkmisc.pc b/pc/gawkmisc.pc
index 7c4436e..2e58101 100644
--- a/pc/gawkmisc.pc
+++ b/pc/gawkmisc.pc
@@ -794,7 +794,7 @@ nl_langinfo (int item)
*
* This will need work if we ever need a real version of execvp.
*/
-int execvp(const char *file, const char *const *argv)
+int w32_execvp(const char *file, char **argv)
{
if (_spawnvp(_P_WAIT, file, (const char * const *)argv) != -1)
exit(EXIT_SUCCESS);
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 12 ++++++++++++
debug.c | 6 +++++-
nonposix.h | 6 ++++++
pc/ChangeLog | 5 +++++
pc/gawkmisc.pc | 2 +-
5 files changed, 29 insertions(+), 2 deletions(-)
hooks/post-receive
--
gawk
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gawk-diffs] [SCM] gawk branch, master, updated. gawk-4.1.0-3635-gf0be506,
Eli Zaretskii <=