aboutsummaryrefslogtreecommitdiffstats
path: root/pc
diff options
context:
space:
mode:
Diffstat (limited to 'pc')
-rw-r--r--pc/ChangeLog21
-rw-r--r--pc/Makefile.tst13
-rw-r--r--pc/config.h21
-rw-r--r--pc/config.sed120
-rw-r--r--pc/testoutcmp.awk38
5 files changed, 136 insertions, 77 deletions
diff --git a/pc/ChangeLog b/pc/ChangeLog
index 9f56a20d..429a88ed 100644
--- a/pc/ChangeLog
+++ b/pc/ChangeLog
@@ -1,4 +1,23 @@
-2011-10-27 Scott Deifik <scottd.mail@sbcglobal.net>
+2011-12-06 Scott Deifik <scottd.mail@sbcglobal.net>
+
+ * Makefile.tst: Sync with mainline version.
+ Use testoutcmp.awk script.
+
+2011-12-06 Arnold D. Robbins <arnold@skeeve.com>
+
+ * testoutcmp.awk: Script to replace cmd for DJGPP.
+
+2011-11-01 Scott Deifik <scottd.mail@sbcglobal.net>
+
+ * config.sed: Additional update.
+
+2011-10-29 Eli Zaretskii <eliz@gnu.org>
+
+ * config.sed: Fix some edits, to be consistent with the old
+ config.h file. Make regexps match #undef lines with whitespace
+ at the end of the line. Add forgotten EMX #defines.
+
+2011-10-27 Scott Deifik <scottd.mail@sbcglobal.net>
* Makefile.tst: Sync with mainline version.
diff --git a/pc/Makefile.tst b/pc/Makefile.tst
index e63b8eb5..db214348 100644
--- a/pc/Makefile.tst
+++ b/pc/Makefile.tst
@@ -90,6 +90,10 @@ CMP = diff
#CMP = diff -c
#CMP = gcmp
+# cmp replacement program for PC where the error messages aren't
+# exactly the same. Should run even on old awk.
+TESTOUTCMP = $(AWK) -f ../testoutcmp.awk
+
# Set your "cp," "mv," and "mkdir" commands here. Note: DOS's copy must take
# forward slashes.
#CP = cp
@@ -115,6 +119,7 @@ PATH_SEPARATOR = ;
# ============================================================================
srcdir = .
+abs_builddir = .
# Get rid of core files when cleaning and generated .ok file
CLEANFILES = core core.* fmtspcl.ok
@@ -512,9 +517,9 @@ gsubtst3::
space::
@echo $@
- @echo Expect space to fail with DJGPP.
@$(AWK) -f ' ' $(srcdir)/space.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
- @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
+# @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
+ @-$(TESTOUTCMP) $(srcdir)/$@.ok _$@ && rm -f _$@
printf0::
@echo $@
@@ -741,7 +746,8 @@ beginfile1::
beginfile2:
@echo $@
@-( cd $(srcdir) && AWK="$(abs_builddir)/$(AWKPROG)" $(srcdir)/$@.sh $(srcdir)/$@.in ) > _$@ 2>&1
- @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
+# @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
+ @-$(TESTOUTCMP) $(srcdir)/$@.ok _$@ && rm -f _$@
dumpvars::
@echo $@
@@ -1876,6 +1882,7 @@ procinfs:
pty1:
@echo pty1
+ @echo Expect pty1 to fail with DJGPP.
@AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
diff --git a/pc/config.h b/pc/config.h
index 41fd895a..a9dac512 100644
--- a/pc/config.h
+++ b/pc/config.h
@@ -13,7 +13,7 @@
#define GETGROUPS_T gid_t
/* Define to 1 if the `getpgrp' function requires zero arguments. */
-#undef GETPGRP_VOID
+#define GETPGRP_VOID 1
/* Define to 1 if you have the `alarm' function. */
#define HAVE_ALARM 1
@@ -51,9 +51,7 @@
#undef HAVE_DOPRNT
/* Define to 1 if you have the <fcntl.h> header file. */
-#ifdef __MINGW32__
#define HAVE_FCNTL_H 1
-#endif
/* Define to 1 if you have the `fmod' function. */
#define HAVE_FMOD 1
@@ -131,9 +129,7 @@
#undef HAVE_LIBSIGSEGV
/* Define to 1 if you have the <limits.h> header file. */
-#if defined(DJGPP) || defined(__MINGW32__)
#define HAVE_LIMITS_H 1
-#endif
/* Define to 1 if you have the <locale.h> header file. */
#ifdef __MINGW32__
@@ -298,9 +294,7 @@
#undef HAVE_ST_BLKSIZE
/* Define to 1 if you have the `system' function. */
-#ifdef __MINGW32__
#define HAVE_SYSTEM 1
-#endif
/* Define to 1 if you have the <sys/ioctl.h> header file. */
#undef HAVE_SYS_IOCTL_H
@@ -354,9 +348,7 @@
#define HAVE_TZNAME 1
/* Define to 1 if you have the `tzset' function. */
-#ifdef __MINGW32__
#define HAVE_TZSET 1
-#endif
/* Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>. */
#if defined(DJGPP) || defined(__MINGW32__)
@@ -433,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.0c"
+#define PACKAGE_STRING "GNU Awk 4.0.0f"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "gawk"
@@ -442,7 +434,7 @@
#define PACKAGE_URL "http://www.gnu.org/software/gawk/"
/* Define to the version of this package. */
-#define PACKAGE_VERSION "4.0.0c"
+#define PACKAGE_VERSION "4.0.0f"
/* Define to 1 if *printf supports %F format */
#undef PRINTF_HAS_F_FORMAT
@@ -504,7 +496,7 @@
/* Version number of package */
-#define VERSION "4.0.0c"
+#define VERSION "4.0.0f"
/* Number of bits in a file offset, on hosts where this is settable. */
#undef _FILE_OFFSET_BITS
@@ -595,6 +587,11 @@
#define HAVE_POPEN_H 1
#endif
+#if defined(__EMX__)
+#define strcasecmp stricmp
+#define strncasecmp strnicmp
+#endif
+
#if defined(__MINGW32__)
# define WEXITSTATUS(stat_val) ((stat_val) & ~0xC0000000)
#endif
diff --git a/pc/config.sed b/pc/config.sed
index c0fa766a..7fe0f922 100644
--- a/pc/config.sed
+++ b/pc/config.sed
@@ -26,111 +26,110 @@
/configh\.in/a\
/* pc/config.h. Generated automatically by pc/config.sed. */
+s/^#undef GETPGRP_VOID *$/#define GETPGRP_VOID 1/
s/^#undef GETGROUPS_T *$/#define GETGROUPS_T gid_t/
+/^#undef GETPGRP_VOID$/c\
+#ifdef DJGPP\
+#define GETPGRP_VOID 1\
+#endif
s/^#undef HAVE_ALARM *$/#define HAVE_ALARM 1/
s/^#undef HAVE_ATEXIT *$/#define HAVE_ATEXIT 1/
-/^#undef HAVE_BTOWC$/c\
+/^#undef HAVE_BTOWC *$/c\
#ifdef _WIN32\
#define HAVE_BTOWC 1\
#endif
-/^#undef HAVE_DECL_TZNAME$/c\
+/^#undef HAVE_DECL_TZNAME *$/c\
#ifdef __MINGW32__\
#define HAVE_DECL_TZNAME 1\
#endif
-/^#undef HAVE_FCNTL_H$/c\
-#ifdef __MINGW32__\
-#define HAVE_FCNTL_H 1\
-#endif
+s/^#undef HAVE_FCNTL_H *$/#define HAVE_FCNTL_H 1/
s/^#undef HAVE_FMOD *$/#define HAVE_FMOD 1/
-/^#undef HAVE_INTMAX_T$/c\
+/^#undef HAVE_INTMAX_T *$/c\
#ifdef __MINGW32__\
#define HAVE_INTMAX_T 1\
#endif
-/^#undef HAVE_INTTYPES_H$/c\
+/^#undef HAVE_INTTYPES_H *$/c\
#ifdef __MINGW32__\
#define HAVE_INTTYPES_H 1\
#endif
-/^#undef HAVE_INTTYPES_H_WITH_UINTMAX$/c\
+/^#undef HAVE_INTTYPES_H_WITH_UINTMAX *$/c\
#ifdef __MINGW32__\
#define HAVE_INTTYPES_H_WITH_UINTMAX 1\
#endif
-/^#undef HAVE_ISASCII$/c\
+/^#undef HAVE_ISASCII *$/c\
#ifdef __MINGW32__\
#define HAVE_ISASCII 1\
#endif
-/^#undef HAVE_ISWCTYPE$/c\
+/^#undef HAVE_ISWCTYPE *$/c\
#ifdef __MINGW32__\
#define HAVE_ISWCTYPE 1\
#endif
-/^#undef HAVE_ISWLOWER$/c\
+/^#undef HAVE_ISWLOWER *$/c\
#ifdef __MINGW32__\
#define HAVE_ISWLOWER 1\
#endif
-/^#undef HAVE_ISWUPPER$/c\
+/^#undef HAVE_ISWUPPER *$/c\
#ifdef __MINGW32__\
#define HAVE_ISWUPPER 1\
#endif
s/^#undef HAVE_LIBM *$/#define HAVE_LIBM 1/
-/^#undef HAVE_LIMITS_H$/c\
-#if defined(DJGPP) || defined(__MINGW32__)\
-#define HAVE_LIMITS_H 1\
-#endif
-/^#undef HAVE_LOCALE_H$/c\
+s/^#undef HAVE_LIMITS_H *$/#define HAVE_LIMITS_H 1/
+/^#undef HAVE_LOCALE_H *$/c\
#ifdef __MINGW32__\
#define HAVE_LOCALE_H 1\
#endif
-/^#undef HAVE_LONG_LONG$/c\
+/^#undef HAVE_LONG_LONG *$/c\
#ifdef __MINGW32__\
#define HAVE_LONG_LONG 1\
#endif
-/^#undef HAVE_MBRLEN$/c\
+/^#undef HAVE_MBRLEN *$/c\
#ifdef __MINGW32__\
#define HAVE_MBRLEN 1\
#endif
-/^#undef HAVE_MBRTOWC$/c\
+/^#undef HAVE_MBRTOWC *$/c\
#ifdef __MINGW32__\
#define HAVE_MBRTOWC 1\
#endif
s/^#undef HAVE_MEMCMP *$/#define HAVE_MEMCMP 1/
s/^#undef HAVE_MEMCPY *$/#define HAVE_MEMCPY 1/
-/^#undef HAVE_MEMMOVE$/c\
+/^#undef HAVE_MEMMOVE *$/c\
#ifdef __MINGW32__\
#define HAVE_MEMMOVE 1\
#endif
s/^#undef HAVE_MEMSET *$/#define HAVE_MEMSET 1/
-/^#undef HAVE_MKSTEMP$/c\
+/^#undef HAVE_MKSTEMP *$/c\
#ifdef DJGPP\
#define HAVE_MKSTEMP 1\
#endif
s/^#undef HAVE_MKTIME *$/#define HAVE_MKTIME 1/
-/^#undef HAVE_SETENV$/c\
+/^#undef HAVE_SETENV *$/c\
#if defined(__MINGW32__) || defined(__DJGPP__)\
#define HAVE_SETENV 1\
#endif
-/^#undef HAVE_SETLOCALE$/c\
+/^#undef HAVE_SETLOCALE *$/c\
#ifdef __MINGW32__\
#define HAVE_SETLOCALE 1\
#endif
-/^#undef HAVE_SNPRINTF$/c\
+/^#undef HAVE_SNPRINTF *$/c\
#ifdef __MINGW32__\
#define HAVE_SNPRINTF 1\
#endif
s/^#undef HAVE_STDARG_H *$/#define HAVE_STDARG_H 1/
-/^#undef HAVE_STDDEF_H$/c\
+/^#undef HAVE_STDDEF_H *$/c\
#ifdef __GNUC__\
#define HAVE_STDDEF_H 1\
#endif
-/^#undef HAVE_STDINT_H$/c\
+/^#undef HAVE_STDINT_H *$/c\
#ifdef __MINGW32__\
#define HAVE_STDINT_H 1\
#endif
-/^#undef HAVE_STDLIB_H$/c\
+/^#undef HAVE_STDLIB_H *$/c\
#ifdef __MINGW32__\
#define HAVE_STDLIB_H 1\
#endif
s/^#undef HAVE_STRCHR *$/#define HAVE_STRCHR 1/
s/^#undef HAVE_STRERROR *$/#define HAVE_STRERROR 1/
-/^#undef HAVE_STRFTIME$/c\
+/^#undef HAVE_STRFTIME *$/c\
#ifdef __MINGW32__\
/* MinGW uses the replacement from missing_d, to support the %e specifier. */\
#define strftime rpl_strftime\
@@ -139,88 +138,82 @@ s/^#undef HAVE_STRERROR *$/#define HAVE_STRERROR 1/
#endif
s/^#undef HAVE_STRINGIZE *$/#define HAVE_STRINGIZE 1/
s/^#undef HAVE_STRING_H *$/#define HAVE_STRING_H 1/
-/^#undef HAVE_STRNCASECMP$/c\
+/^#undef HAVE_STRNCASECMP *$/c\
#define HAVE_STRNCASECMP 1\
#ifdef __EMX__\
#define strncasecmp strnicmp\
#endif
s/^#undef HAVE_STRTOD *$/#define HAVE_STRTOD 1/
-/^#undef HAVE_STRTOUL$/c\
+/^#undef HAVE_STRTOUL *$/c\
#ifdef __MINGW32__\
#define HAVE_STRTOUL 1\
#endif
-/^#undef HAVE_SYSTEM$/c\
-#ifdef __MINGW32__\
-#define HAVE_SYSTEM 1\
-#endif
-/^#undef HAVE_SYS_PARAM_H$/c\
+s/^#undef HAVE_SYSTEM *$/#define HAVE_SYSTEM 1/
+/^#undef HAVE_SYS_PARAM_H *$/c\
#ifndef __MINGW32__\
#define HAVE_SYS_PARAM_H 1\
#endif
-/^#undef HAVE_SYS_STAT_H$/c\
+/^#undef HAVE_SYS_STAT_H *$/c\
#ifdef __MINGW32__\
#define HAVE_SYS_STAT_H 1\
#endif
-/^#undef HAVE_SYS_TIME_H$/c\
+/^#undef HAVE_SYS_TIME_H *$/c\
#if defined(DJGPP) || defined(__MINGW32__)\
#define HAVE_SYS_TIME_H 1\
#endif
s/^#undef HAVE_SYS_TYPES_H *$/#define HAVE_SYS_TYPES_H 1/
-/^#undef HAVE_TOWLOWER$/c\
+/^#undef HAVE_TOWLOWER *$/c\
#ifdef __MINGW32__\
#define HAVE_TOWLOWER 1\
#endif
-/^#undef HAVE_TOWUPPER$/c\
+/^#undef HAVE_TOWUPPER *$/c\
#ifdef __MINGW32__\
#define HAVE_TOWUPPER 1\
#endif
s/^#undef HAVE_TZNAME *$/#define HAVE_TZNAME 1/
-/^#undef HAVE_TZSET$/c\
-#ifdef __MINGW32__\
-#define HAVE_TZSET 1\
-#endif
-/^#undef HAVE_UINTMAX_T$/c\
+s/^#undef HAVE_TZSET *$/#define HAVE_TZSET 1/
+/^#undef HAVE_UINTMAX_T *$/c\
#if defined(DJGPP) || defined(__MINGW32__)\
#define HAVE_UINTMAX_T 1\
#ifdef DJGPP\
#define uintmax_t unsigned long long\
#endif\
#endif
-/^#undef HAVE_UNISTD_H$/c\
+/^#undef HAVE_UNISTD_H *$/c\
#if defined(DJGPP) || defined(__MINGW32__)\
#define HAVE_UNISTD_H 1\
#endif
s/^#undef HAVE_UNSIGNED_LONG_LONG *$/#define HAVE_UNSIGNED_LONG_LONG 1/
-/^#undef HAVE_USLEEP$/c\
+/^#undef HAVE_USLEEP *$/c\
#if defined(DJGPP) || defined(__MINGW32__)\
#define HAVE_USLEEP 1\
#endif
s/^#undef HAVE_VPRINTF *$/#define HAVE_VPRINTF 1/
-/^#undef HAVE_WCHAR_H$/c\
+/^#undef HAVE_WCHAR_H *$/c\
#ifdef __MINGW32__\
#define HAVE_WCHAR_H 1\
#endif
-/^#undef HAVE_WCRTOMB$/c\
+/^#undef HAVE_WCRTOMB *$/c\
#ifdef __MINGW32__\
#define HAVE_WCRTOMB 1\
#endif
-/^#undef HAVE_WCSCOLL$/c\
+/^#undef HAVE_WCSCOLL *$/c\
#ifdef __MINGW32__\
#define HAVE_WCSCOLL 1\
#endif
-/^#undef HAVE_WCTYPE$/c\
+/^#undef HAVE_WCTYPE *$/c\
#ifdef __MINGW32__\
#define HAVE_WCTYPE 1\
#endif
-/^#undef HAVE_WCTYPE_H$/c\
+/^#undef HAVE_WCTYPE_H *$/c\
#ifdef __MINGW32__\
#define HAVE_WCTYPE_H 1\
#endif
-/^#undef HAVE_WCTYPE_T$/c\
+/^#undef HAVE_WCTYPE_T *$/c\
#ifdef __MINGW32__\
#define HAVE_WCTYPE_T 1\
#endif
-/^#undef HAVE_WINT_T$/c\
+/^#undef HAVE_WINT_T *$/c\
#ifdef __MINGW32__\
#define HAVE_WINT_T 1\
#endif
@@ -231,31 +224,31 @@ s/^#undef RETSIGTYPE *$/#define RETSIGTYPE void/
#if defined(DJGPP) || defined(__MINGW32__)\
#include <limits.h>\
#endif
-/^#undef SIZEOF_UNSIGNED_INT$/c\
+/^#undef SIZEOF_UNSIGNED_INT *$/c\
#if UINT_MAX == 65536\
#define SIZEOF_UNSIGNED_INT 2\
#elif UINT_MAX == 4294967295U\
#define SIZEOF_UNSIGNED_INT 4\
#endif
-/^#undef SIZEOF_UNSIGNED_LONG$/c\
+/^#undef SIZEOF_UNSIGNED_LONG *$/c\
#if ULONG_MAX == 4294967295UL\
#define SIZEOF_UNSIGNED_LONG 4\
#endif
s/^#undef STDC_HEADERS *$/#define STDC_HEADERS 1/
s/^#undef TIME_WITH_SYS_TIME *$/#define TIME_WITH_SYS_TIME 1/
-/^#undef inline$/c\
+/^#undef inline *$/c\
#ifdef __GNUC__\
#define inline __inline__\
#endif
-/^#undef intmax_t$/c\
+/^#undef intmax_t *$/c\
#ifdef DJGPP\
#define intmax_t long long\
#endif
-/^#undef restrict$/c\
+/^#undef restrict *$/c\
#ifdef DJGPP\
#define restrict\
#endif
-/^#undef uintmax_t$/c\
+/^#undef uintmax_t *$/c\
#ifdef DJGPP\
#define uintmax_t unsigned long long\
#endif
@@ -274,6 +267,11 @@ $a\
#define HAVE_POPEN_H 1\
#endif\
\
+#if defined(__EMX__)\
+#define strcasecmp stricmp\
+#define strncasecmp strnicmp\
+#endif\
+\
#if defined(__MINGW32__)\
# define WEXITSTATUS(stat_val) ((stat_val) & ~0xC0000000)\
#endif
diff --git a/pc/testoutcmp.awk b/pc/testoutcmp.awk
new file mode 100644
index 00000000..ff190155
--- /dev/null
+++ b/pc/testoutcmp.awk
@@ -0,0 +1,38 @@
+# cmp replacement program for PC where the error messages aren't
+# exactly the same. should run even on old awk
+
+{
+ if (FNR == NR)
+ file = 0
+ else
+ file = 1
+ gsub(/\r/, "", $0)
+ lines[file, FNR] = $0
+}
+
+END {
+ if (NR/2 != FNR) {
+ printf("testoutcmp: warning: files are not of equal length!\n") > "/dev/stderr"
+ exit 1
+ }
+
+ for (i = 1; i <= FNR; i++) {
+ good = lines[0, i]
+ actual = lines[1, i]
+ if (good == actual)
+ continue
+
+ l = length(good)
+ if (substr(good, l, 1) == ")")
+ l--
+ if (substr(good, 1, l) == substr(actual, 1, l))
+ continue
+ else {
+ printf("%s and %s are not equal\n", ARGV[1],
+ ARGV[2]) > "/dev/stderr"
+ exit 1
+ }
+ }
+
+ exit 0
+}