bug-gawk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gawk] Proposition of a DJGPP specific patch.


From: Eli Zaretskii
Subject: Re: [bug-gawk] Proposition of a DJGPP specific patch.
Date: Sat, 01 Jul 2017 19:31:58 +0300

> Date: Tue, 27 Jun 2017 00:09:23 +0200
> From: Juan Manuel Guerrero <address@hidden>
> 
> Sadly I have read that the DJGPP port is deprecated now so I do not know
> if this patch is still welcome at all but I send it anyway.  If no DJGPP
> specific contribution is desired anymore please let me know.

As Aharon wrote, the reason for deprecation is that the maintainer of
the DJGPP port stepped down and no one volunteered to replace him.  If
you agree to become the new maintainer of the DJGPP port, the port
will be un-deprecated that very moment.

> Meanwhile DJGPP 2.05 is out thus the proposed changes are tailored for
> 2.05 and no longer for 2.03 as used to be.  It is not my intention to
> intentionaly break 2.03 support but if I have to remove certain 2.03
> features to easier implement 2.05 specific changes I have done it.

Sounds good to me.

> The file that need most adjustments is pc/config.sed to generate a config.h
> that reflects the DJGPP 2.05 features.  A poor man putwc implementation has
> been added to pc/gawkmisc.pc.  Also io.h is included to provide the required
> setmode prototype.  nonposix.h will provide prototypes for btowc and putwc and
> awk.h will include nonposix.h if compiled with DJGPP as it is already done if
> compiled with EMX or MINGW.  The DJGPP specific section of pc/Makefile has
> been adjusted to provide definitions for pkgextensiondir, infodir, mandir,
> DEFLIBPATH and LOCALEDIR.  For all use of these variables $(prefix) is used to
> define their path.  If prefix is not defined it will default to 
> "/dev/env/DJDIR".
> 
> Of course, all proposed changes have no influence on other ports.
> As usual suggestions, objections and comments are welcome.

Thanks.  Below are some comments:

> --- gawk-4.1.4.orig/pc/config.sed     2016-05-30 20:10:06 +0000
> +++ gawk-4.1.4/pc/config.sed  2017-06-23 23:09:56 +0000
> @@ -49,23 +49,23 @@ s/^#undef HAVE_FMOD *$/#define HAVE_FMOD
>   /^#undef HAVE_GETADDRINFO *$/c\
>   #ifdef __MINGW32__\
>   #define HAVE_GETADDRINFO 1\
>   #endif
>   /^#undef HAVE_INTMAX_T *$/c\
> -#ifdef __MINGW32__\
> +#if defined(__MINGW32__) || defined(__DJGPP__)\
>   #define HAVE_INTMAX_T 1\
>   #endif
>   /^#undef HAVE_INTTYPES_H *$/c\
> -#ifdef __MINGW32__\
> +#if defined(__MINGW32__) || defined(__DJGPP__)\
>   #define HAVE_INTTYPES_H 1\
>   #endif
>   /^#undef HAVE_INTTYPES_H_WITH_UINTMAX *$/c\
>   #ifdef __MINGW32__\
>   #define HAVE_INTTYPES_H_WITH_UINTMAX address@hidden  Proposition of a DJGPP 
> specific patch.
> 
> Sadly I have read that the DJGPP port is deprecated now so I do not know

There seems to be some snafu here: the first part of the diffs is
followed by the text of your email.  Please resend the patch without
these problems.

> diff -aprNU5 gawk-4.1.4.orig/pc/Makefile gawk-4.1.4/pc/Makefile
> --- gawk-4.1.4.orig/pc/Makefile       2016-05-30 20:10:06 +0000
> +++ gawk-4.1.4/pc/Makefile    2017-06-23 23:09:56 +0000
> @@ -79,11 +79,14 @@ MAK = $(MAKE) $(MAKEFILE)
>   #prefix =
>   prefix = c:/gnu
>   pkgdatadir = $(prefix)/lib/awk
>   pkgextensiondir = $(prefix)/lib/gawk
>   DEFLIBPATH = "\"$(pkgextensiondir)\""
> +LOCALEDIR="\"$(prefix)/share/locale\""
>   SHLIBEXT = "\"dll\""
> +infodir = $(prefix)/info
> +mandir = $(prefix)/share/man
>   #
>   # Define the install method. Method 1 is Unix-like (and requires cat
>   # and cp); method 2 uses gawk and batch files.
>   install = 1
>   #------------------------------------------------------------------------
> @@ -98,12 +101,18 @@ DO_BIND= $($(BIND))
>   #========================================================================
>   #========================== DJGPP =======================================
>   #========================================================================
> 
>   ifneq ($(DJGPP),)
> -prefix = $(DJDIR)
> +prefix = /dev/env/DJDIR
>   pkgdatadir = $(prefix)/share/awk
> +pkgextensiondir = $(prefix)/lib/gawk
> +DEFLIBPATH = "\"$(pkgextensiondir)\""
> +LOCALEDIR="\"$(prefix)/share/locale\""
> +SHLIBEXT = "\"dxe\""
> +infodir = $(prefix)/share/info
> +mandir = $(prefix)/share/man

Why did you need to add some of these lines twice: once in the DJGPP
part, the other in the common part?

> @@ -286,12 +295,12 @@ install1:
>       -mkdir "$(prefix)"
>       -mkdir "$(prefix)/bin"
>       -mkdir "$(prefix)/share"
>       -mkdir "$(prefix)/share/man"
>       -mkdir "$(pkgdatadir)" "$(prefix)/share/man/man1" "$(prefix)/share/info"
> -     cp *awk.exe igawk.bat igawk.cmd pc/awklib/igawk $(prefix)/bin
>       cp gawk.exe $(prefix)/bin/awk.exe
> +     cp *awk.exe igawk.bat igawk.cmd pc/awklib/igawk $(prefix)/bin

This seems to be a change of order of 2 lines?  Why is this needed?

>       cp awklib/eg/lib/* pc/awklib/igawk.awk $(pkgdatadir)
>       cp doc/*.1 $(prefix)/share/man/man1
>       cp doc/*.info $(prefix)/share/info
> 
>   # install2 is equivalent to install1, but doesn't require cp, sed, etc.
> 
>   #endif
>   /^#undef HAVE_ISASCII *$/c\
> -#ifdef __MINGW32__\
> +#if defined(__MINGW32__) || defined(__DJGPP__)\
>   #define HAVE_ISASCII 1\
>   #endif
>   /^#undef HAVE_ISWCTYPE *$/c\
>   #ifdef __MINGW32__\
>   #define HAVE_ISWCTYPE 1\

And here once again is some snafu: the diffs for pc/Makefile are
followed by part of the diffs for config.sed.

Thanks.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]