[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCHes] gawk-3.1.0 build problems under DJGPP
From: |
Peter J. Farley III |
Subject: |
[PATCHes] gawk-3.1.0 build problems under DJGPP |
Date: |
Tue, 07 Aug 2001 01:02:23 -0400 |
Below are diffs for the current gawk-3.1.0 tarball to improve building
under DJGPP/MS-DOS environments. The problems resolved are:
1. m4/strtod.m4 is missing #endif at the end; gcc-2.95.3 complains
about this and fails to compile the config test.
2. configure tests for a void argument to getpgrp() using a C program
that uses the setpgrp() function. DJGPP does not implement this
function, and configure chooses to assume there *is* an argument to
getpgrp() when the test fails. configure.in is patched to add *MS-DOS*
to the "bypass test" code in configure for this test, resulting in
using no argument to getpgrp(), which is the correct choice for DJGPP.
3. pc/gawkmisc.pc sets the value of char variable "quote" to '"'. This
causes the "badarg" test to fail, since the "Usage" message print
statements use the value of "quote", which is '\'' on the system that
produced the file "test/badarg.ok". Changed the value of char variable
"quote" to '\'', which seems to make more sense.
4. test/Makefile was updated to make the "manyfiles" test work on
DJGPP/MS-DOS (needed '\015' in argument to tr to strip CR's as well as
LF's), to use ";" as a path separator in the awkpath test and to bypass
the "pid" and "clos1way" tests under DJGPP, which doesn't implement pid
or ppid in the same way *ix systems do, nor can it implement the "|&"
internet functionality. The diff is to tests/Makefile.am.
5. The script fixvers was updated to use $CMP instead of cmp, and the
Makefile.am file was updated to call fixvers using the syntax
"CMP=$(CMP) ./fixvers -v" (and "-p") so that make can be invoked under
DJGPP using "make CMP=diff".
This change *should* probably be to test for DJGPP in the main Makefile
or maybe in configure and select "diff" instead of "cmp" for DJGPP
build environments, but I didn't get the tuits for that change yet.
6. awklib/Makefile.am was changed to delete the two lines:
nodist_grcat_SOURCES = grcat.c
nodist_pwcat_SOURCES = pwcat.c
because these two unreferenced variables cause an automake errors at
"make" time.
I do realize that the choices I made for most of these changes could
and probably should be handled better, but they did allow me to build
and successfully test gawk-3.1.0 under DJGPP copying only
pc/gawkmisc.pc to the main build directory, with no other changes.
Well, *almost* no other changes. The file awklib/eg/lib/pwcat.c prints
the pw_passwd and pw_gecos fields of the password structure (defined in
/include/pwd.h), but the currently released version of DJGPP, v2.03,
does not implement these fields. The problem has been fixed in the
current CVS DJGPP, but this is not generally available yet. I had to
download the CVS versions of the pwd.h changes and patch my copy of the
DJGPP include and libc. I don't have a general solution for this,
except to eliminate pwcat.c from being built, and I did not research
enough yet to know if that is a wise thing to do.
Comments, brickbats, criticism's welcome. Some of these diff lines
might word-wrap, I tried to turn off wrapping in my mail client but I'm
not entirely sure how it will come through to you. Apologies in
advance for that.
HTH
=========strtodm4.dif===================
--- strtod.m40 Sun Jan 21 15:55:26 2001
+++ strtod.m4 Wed Aug 1 23:46:18 2001
@@ -49,6 +49,7 @@
exit (0);
else
exit (1);
+#endif
}],
gawk_ac_cv_func_strtod_c89=yes, gawk_ac_cv_func_strtod_c89=no,
gawk_ac_cv_func_strtod_c89=no)])
=========strtodm4.dif===================
=========configin.dif===================
*** configure.in0 Tue May 15 16:46:40 2001
--- configure.in Thu Aug 2 00:46:14 2001
***************
*** 151,158 ****
dnl check for how to use getpgrp
dnl have to hardwire it for VMS POSIX. Sigh.
dnl ditto for BeOS.
case `(uname) 2> /dev/null` in
! *VMS*|*BeOS*)
AC_DEFINE(GETPGRP_VOID)
;;
*) AC_FUNC_GETPGRP
--- 151,159 ----
dnl check for how to use getpgrp
dnl have to hardwire it for VMS POSIX. Sigh.
dnl ditto for BeOS.
+ dnl ditto for MS-DOS(DJGPP).
case `(uname) 2> /dev/null` in
! *VMS*|*BeOS*|*MS-DOS*)
AC_DEFINE(GETPGRP_VOID)
;;
*) AC_FUNC_GETPGRP
=========configin.dif===================
=========gwkmscpc.dif===================
*** pc/gawkmisc.pc Sun Jan 28 13:49:24 2001
--- gawkmisc.pc Sun Aug 5 19:43:46 2001
***************
*** 23,29 ****
* Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA
*/
! char quote = '"';
char envsep = ';';
#ifdef DEFPATH
char *defpath = DEFPATH;
--- 23,29 ----
* Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA
*/
! char quote = '\'';
char envsep = ';';
#ifdef DEFPATH
char *defpath = DEFPATH;
=========gwkmscpc.dif===================
=========maktstam.dif===================
*** test/Makefile.am Tue Mar 20 09:09:42 2001
--- Makefilt.am Tue Aug 7 00:44:22 2001
***************
*** 383,389 ****
inet: inetmesg inetechu inetecht inetdayu inetdayt
msg::
! @echo 'Any output from "cmp" is bad news, although some differences'
@echo 'in floating point values are probably benign -- in
particular,'
@echo 'some systems may omit a leading zero and the floating point'
@echo 'precision may lead to slightly different output in a few
cases.'
--- 383,389 ----
inet: inetmesg inetechu inetecht inetdayu inetdayt
msg::
! @echo 'Any output from "'$(CMP)'" is bad news, although some
differences'
@echo 'in floating point values are probably benign -- in
particular,'
@echo 'some systems may omit a leading zero and the floating point'
@echo 'precision may lead to slightly different output in a few
cases.'
***************
*** 475,481 ****
@mkdir junk
@$(AWK) 'BEGIN { for (i = 1; i <= 300; i++) print i, i}' >_$@
@$(AWK) -f $(srcdir)/manyfiles.awk _$@ _$@
! @echo "This number better be 1 ->" | tr -d '\012'
@wc -l junk/* | $(AWK) '$$1 != 2' | wc -l
@rm -rf junk _$@
--- 475,481 ----
@mkdir junk
@$(AWK) 'BEGIN { for (i = 1; i <= 300; i++) print i, i}' >_$@
@$(AWK) -f $(srcdir)/manyfiles.awk _$@ _$@
! @echo "This number better be 1 ->" | tr -d '\012\015'
@wc -l junk/* | $(AWK) '$$1 != 2' | wc -l
@rm -rf junk _$@
***************
*** 525,531 ****
-$(CMP) $(srcdir)/splitargv.ok _$@ && rm -f _$@
awkpath::
! @AWKPATH="$(srcdir):$(srcdir)/lib" $(AWK) -f awkpath.awk >_$@
-$(CMP) $(srcdir)/awkpath.ok _$@ && rm -f _$@
nfset::
--- 525,535 ----
-$(CMP) $(srcdir)/splitargv.ok _$@ && rm -f _$@
awkpath::
! @if test x$DJDIR = x; then \
! AWKPATH="$(srcdir):$(srcdir)/lib" $(AWK) -f awkpath.awk >_$@; \
! else \
! AWKPATH="$(srcdir);$(srcdir)/lib" $(AWK) -f awkpath.awk >_$@; \
! fi
-$(CMP) $(srcdir)/awkpath.ok _$@ && rm -f _$@
nfset::
***************
*** 735,742 ****
# AIX /bin/sh exec's the last command in a list, therefore issue a
":"
# command so that pid.sh is fork'ed as a child before being exec'ed.
pid::
! @AWKPATH=$(srcdir) AWK=$(AWK) $(SHELL) $(srcdir)/pid.sh $$$$ >
_`basename address@hidden ; :
! -$(CMP) $(srcdir)/pid.ok _`basename address@hidden && rm -f _`basename address@hidden
_`basename address@hidden
strftlng::
@TZ=UTC; export TZ; $(AWK) -f $(srcdir)/strftlng.awk >_$@
--- 739,750 ----
# AIX /bin/sh exec's the last command in a list, therefore issue a
":"
# command so that pid.sh is fork'ed as a child before being exec'ed.
pid::
! @if test x$DJDIR = x; then \
! AWKPATH=$(srcdir) AWK=$(AWK) $(SHELL) $(srcdir)/pid.sh $$$$ >
_`basename address@hidden ; : ; \
! $(CMP) $(srcdir)/pid.ok _`basename address@hidden && rm -f _`basename address@hidden
_`basename address@hidden ; \
! else \
! echo "/dev/pid, /dev/ppid test bypassed for DJGPP"; \
! fi
strftlng::
@TZ=UTC; export TZ; $(AWK) -f $(srcdir)/strftlng.awk >_$@
***************
*** 981,988 ****
-$(CMP) $(srcdir)/leaddig.ok _$@ && rm -f _$@
clos1way::
! @$(AWK) -f $(srcdir)/clos1way.awk >_$@
! -$(CMP) $(srcdir)/clos1way.ok _$@ && rm -f _$@
arynasty::
@$(AWK) -f $(srcdir)/arynasty.awk >_$@
--- 989,1000 ----
-$(CMP) $(srcdir)/leaddig.ok _$@ && rm -f _$@
clos1way::
! @if test x$DJDIR = x; then \
! $(AWK) -f $(srcdir)/clos1way.awk >_$@; \
! $(CMP) $(srcdir)/clos1way.ok _$@ && rm -f _$@; \
! else \
! echo "clos1way test bypassed for DJGPP, |& not implemented"; \
! fi
arynasty::
@$(AWK) -f $(srcdir)/arynasty.awk >_$@
=========maktstam.dif===================
=========fixvers.dif===================
*** fixvers.0 Sun Jan 21 15:55:06 2001
--- fixvers Sun Aug 5 20:50:44 2001
***************
*** 28,34 ****
-v)
VERS=`echo $line | sed 's/.*,
*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\))/\1.\2/'`
sed "s/X\.Y/$VERS/" < version.in > version.new
! if cmp version.c version.new
then
:
else
--- 28,34 ----
-v)
VERS=`echo $line | sed 's/.*,
*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\))/\1.\2/'`
sed "s/X\.Y/$VERS/" < version.in > version.new
! if $CMP version.c version.new
then
:
else
***************
*** 40,46 ****
-p)
LEV=`echo $line | sed 's/.*,
*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\))/\3/'`
echo "#define PATCHLEVEL $LEV" > patchlev.new
! if cmp patchlev.h patchlev.new
then
:
else
--- 40,46 ----
-p)
LEV=`echo $line | sed 's/.*,
*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\))/\3/'`
echo "#define PATCHLEVEL $LEV" > patchlev.new
! if $CMP patchlev.h patchlev.new
then
:
else
=========fixvers.dif===================
=========makeflam.dif===================
*** Makefile.am Tue May 15 17:09:08 2001
--- ..\Makefile.am Sun Aug 5 21:05:36 2001
***************
*** 155,161 ****
# on what's in configure.in. No-one else but me should have
# to use them. So there.
patchlev.h: configure.in
! ./fixvers -p
version.c: configure.in version.in
! ./fixvers -v
--- 155,161 ----
# on what's in configure.in. No-one else but me should have
# to use them. So there.
patchlev.h: configure.in
! CMP=$(CMP) ./fixvers -p
version.c: configure.in version.in
! CMP=$(CMP) ./fixvers -v
=========makeflam.dif===================
=========maklibam.dif===================
*** Makefile.am0 Tue Feb 27 09:53:18 2001
--- Makefile.am Sun Aug 5 22:21:08 2001
***************
*** 31,38 ****
bin_SCRIPTS = igawk
libexec_PROGRAMS = pwcat grcat
AUXAWK = passwd.awk group.awk
- nodist_grcat_SOURCES = grcat.c
- nodist_pwcat_SOURCES = pwcat.c
all: stamp-eg $(AUXPROGS) igawk $(AUXAWK)
--- 31,36 ----
=========maklibam.dif===================
---------------------------------------------------------
Peter J. Farley III (address@hidden)
- [PATCHes] gawk-3.1.0 build problems under DJGPP,
Peter J. Farley III <=