aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2012-02-15 21:22:43 +0200
committerArnold D. Robbins <arnold@skeeve.com>2012-02-15 21:22:43 +0200
commit8a2eed59fd54d901721376426b34c0c128bf0cfb (patch)
treedf525d99d37779db3e9f13a2b839c570b495cd82
parentb8123662e8cb41e033771151500d927456953ab2 (diff)
downloadegawk-8a2eed59fd54d901721376426b34c0c128bf0cfb.tar.gz
egawk-8a2eed59fd54d901721376426b34c0c128bf0cfb.tar.bz2
egawk-8a2eed59fd54d901721376426b34c0c128bf0cfb.zip
Update MinGW execvp, additions to Makefile and config.
-rw-r--r--pc/ChangeLog19
-rw-r--r--pc/Makefile10
-rw-r--r--pc/config.h8
-rw-r--r--pc/config.sed2
-rw-r--r--pc/gawkmisc.pc4
5 files changed, 36 insertions, 7 deletions
diff --git a/pc/ChangeLog b/pc/ChangeLog
index ee9deca2..c0d5c313 100644
--- a/pc/ChangeLog
+++ b/pc/ChangeLog
@@ -1,3 +1,22 @@
+2012-02-15 Arnold D. Robbins <arnold@skeeve.com>
+
+ * gawkmisc.pc (execvp): Modify signature, return -1
+ on error.
+
+2012-02-11 Eli Zaretskii <eliz@gnu.org>
+
+ Fix dependencies in pc/Makefile.
+ * Makefile ($(ALLOBJS) $(LIBOBJS) eval_p$O profile_p$O): Add eval_d$O,
+ debug$O, and command$O.
+
+ Support MinGW build with the readline library.
+ * Makefile (default): Add a line for the mingw32-readline target.
+ (mingw32-readline): New target, passes -DHAVE_LIBREADLINE to the
+ compiler and adds -lreadline to the linker command line.
+
+ * config.sed: Comment out "#undef HAVE_LIBREADLINE", so that it
+ could be #define'd on the compiler command line.
+
2012-02-10 Arnold D. Robbins <arnold@skeeve.com>
* gawkmisc.pc (execvp): New function based on code from Eli
diff --git a/pc/Makefile b/pc/Makefile
index 6156ce96..e78318fa 100644
--- a/pc/Makefile
+++ b/pc/Makefile
@@ -14,6 +14,8 @@ default:
@echo " emxnt ... NT exe [emx/gcc with RSXNT] "
@echo " emxbnd .. OS/2 and DOS 32-bit exe [emx/gcc] "
@echo " mingw32 . Windows32 exe [Mingw32 GNU C] "
+ @echo " mingw32-readline . Like mingw32, but with readline "
+ @echo " [You will need to have GNU readline library installed.] "
@echo " ----------------------------------------------------- "
@echo " test .... Perform tests (see README_d/README.pc) "
@echo " install . Install gawk under $(prefix)/ "
@@ -167,6 +169,12 @@ mingw32:
LNK=LMINGW32 PLNK=PLMINGW32 DLNK=DLMINGW32 \
LF="-gdwarf-2 -g3" LF2=-lmsvcp60 RSP=
+mingw32-readline:
+ $(MAK) all \
+ CC=gcc O=.o CF="-DHAVE_LIBREADLINE -O2 -gdwarf-2 -g3" OBJ=popen.o \
+ LNK=LMINGW32 PLNK=PLMINGW32 DLNK=DLMINGW32 \
+ LF="-gdwarf-2 -g3" LF2="-lreadline -lmsvcp60" RSP=
+
# Define BIND for BINDless compiles, otherwise $($(BIND)) may break.
BIND = EMPTY
PBIND = EMPTY
@@ -237,7 +245,7 @@ $(DRSPFILE) : $(DGAWKOBJS)
# and we have -I. on the compiler command line. unistd.h is
# included by awk.h.
# 2. custom.h is not mentioned because pc ports don't use it.
-$(ALLOBJS) $(LIBOBJS) eval_p$O profile_p$O: \
+$(ALLOBJS) $(LIBOBJS) eval_p$O profile_p$O eval_d$O debug$O command$O: \
awk.h regex.h config.h gettext.h mbsupport.h protos.h dfa.h getopt.h
builtin$O: floatmagic.h random.h popen.h
diff --git a/pc/config.h b/pc/config.h
index 94215f8b..72f75bc6 100644
--- a/pc/config.h
+++ b/pc/config.h
@@ -123,7 +123,7 @@
#define HAVE_LIBM 1
/* Define to 1 if you have a fully functional readline library. */
-#undef HAVE_LIBREADLINE
+/* #undef HAVE_LIBREADLINE */
/* Define if you have the libsigsegv library. */
#undef HAVE_LIBSIGSEGV
@@ -425,7 +425,7 @@
#define PACKAGE_NAME "GNU Awk"
/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "GNU Awk 4.0.0h"
+#define PACKAGE_STRING "GNU Awk 4.0.0i"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "gawk"
@@ -434,7 +434,7 @@
#define PACKAGE_URL "http://www.gnu.org/software/gawk/"
/* Define to the version of this package. */
-#define PACKAGE_VERSION "4.0.0h"
+#define PACKAGE_VERSION "4.0.0i"
/* Define to 1 if *printf supports %F format */
#undef PRINTF_HAS_F_FORMAT
@@ -496,7 +496,7 @@
/* Version number of package */
-#define VERSION "4.0.0h"
+#define VERSION "4.0.0i"
/* Number of bits in a file offset, on hosts where this is settable. */
#undef _FILE_OFFSET_BITS
diff --git a/pc/config.sed b/pc/config.sed
index 7fe0f922..96b2c2d7 100644
--- a/pc/config.sed
+++ b/pc/config.sed
@@ -73,6 +73,8 @@ s/^#undef HAVE_FMOD *$/#define HAVE_FMOD 1/
#define HAVE_ISWUPPER 1\
#endif
s/^#undef HAVE_LIBM *$/#define HAVE_LIBM 1/
+/^#undef HAVE_LIBREADLINE *$/c\
+/* #undef HAVE_LIBREADLINE */
s/^#undef HAVE_LIMITS_H *$/#define HAVE_LIMITS_H 1/
/^#undef HAVE_LOCALE_H *$/c\
#ifdef __MINGW32__\
diff --git a/pc/gawkmisc.pc b/pc/gawkmisc.pc
index 27855cc6..6e5b8bb8 100644
--- a/pc/gawkmisc.pc
+++ b/pc/gawkmisc.pc
@@ -570,12 +570,12 @@ wctob (wint_t wc)
}
/*
- * On MS-Windows, execvp causes the shell and the re-exec'ed
+ * On MS-Windows with MinGW, execvp causes the shell and the re-exec'ed
* dgawk to compete for the keyboard input.
*
* This will need work if we ever need a real version of execvp.
*/
-int execvp(const char *file, char *const argv[])
+int execvp(const char *file, const char *const *argv)
{
if (_spawnvp(_P_WAIT, file, (const char * const *)argv) != -1)
exit(EXIT_SUCCESS);