delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/03/09/16:39:47

From: Bruno Haible <haible AT ilog DOT fr>
MIME-Version: 1.0
Message-ID: <15017.19621.800332.788802@honolulu.ilog.fr>
Date: Fri, 9 Mar 2001 22:35:33 +0100 (CET)
To: "Juan Manuel Guerrero" <ST001906 AT HRZ1 DOT HRZ DOT TU-Darmstadt DOT De>
Cc: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>, djgpp-workers AT delorie DOT com
Subject: Re: gettext pretest available
In-Reply-To: <343878750F9@HRZ1.hrz.tu-darmstadt.de>
References: <343878750F9 AT HRZ1 DOT hrz DOT tu-darmstadt DOT de>
X-Mailer: VM 6.72 under 21.1 (patch 8) "Bryce Canyon" XEmacs Lucid
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

Juan Manuel Guerrero writes:
> This is a new patch that accounts for all the issues discussed lats week.
> This is a minimal set of changes needed for DJGPP support.

Thanks for this patch and the later djgpp/ subdirectory. All of this
has, in one form or the other, been integrated in the newest snapshot
(at the same location).

> diff -acprNC3 gettext-2001-02-05.orig/intl/libgnuintl.h gettext-2001-02-05/intl/libgnuintl.h
> *** gettext-2001-02-05.orig/intl/libgnuintl.h	Tue Feb  6 12:58:40 2001
> --- gettext-2001-02-05/intl/libgnuintl.h	Tue Feb 27 22:40:34 2001
> ***************
> *** 39,44 ****
> --- 39,53 ----
>   # endif
>   #endif
>   
> + #ifdef __DJGPP__
> + /* This will remove the conflict between the gettext function
> +    from libintl.h and DJGPP's gettext function from conio.h.
> +    GNU gettext takes *always* precedence over DJGPP's _conio_gettext. */
> + # undef   gettext
> + # define  gettext gettext
> + # define  __LIBINTL_H_INCLUDED__
> + #endif /* not __DJGPP__ */
> + 
>   #ifdef __cplusplus
>   extern "C" {
>   #endif

Done, except that I don't see the need for __LIBINTL_H_INCLUDED__. You
have _LIBINTL_H, you have __USE_GNU_GETTEXT. You don't need a third
macro.

> + #if O_BINARY
> + # define IS_DIR_SEPARATOR(path) (((path)[0]) == '/' || ((path)[0]) == '\\')
> + # define IS_DEVICE(path)        (((path)[0]) && ((path)[1]) == ':')
> + # define IS_ABSOLUTE_PATH(path) (IS_DIR_SEPARATOR(path) || IS_DEVICE(path))
> + # define PATH_SEPARATOR         ';'
> + #else /* not O_BINARY */
> + # define IS_ABSOLUTE_PATH(path) (((path)[0]) == '/')
> + # define PATH_SEPARATOR         ':'
> + #endif /* not O_BINARY */

These macros are OK, one more is needed. But the "#if O_BINARY"
conditional is wrong: it would also be true on Unix emulations on
Windows, like Cygwin. These systems have O_BINARY but a standard Unix
pathname system.

> It should be noticed that if lib/vasprintf.c is compiled, the following warning
> is issued:
>   make.exe[2]: Entering directory `z:/__/gettext-0.10.36/lib'
>   gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../intl    -g -O2 -c vasprintf.c
>   vasprintf.c: In function `int_vasprintf':
>   vasprintf.c:65: warning: passing arg 2 of `strtoul' from incompatible pointer type
>   vasprintf.c:75: warning: passing arg 2 of `strtoul' from incompatible pointer type

Thanks, that's been dealt with. The same warning also showed up on
Solaris.

> *** gettext-2001-02-05.orig/Makefile.am	Mon Feb  5 18:38:02 2001
> --- gettext-2001-02-05/Makefile.am	Sat Mar  3 18:23:24 2001
> *************** gettextsrcdir = $(datadir)/gettext
> *** 26,32 ****
>   gettextsrc_DATA = ABOUT-NLS
>   
>   EXTRA_DIST = BUGS DISCLAIM README.gemtext aclocal.sh
> ! SUBDIRS = doc intl lib src po m4 misc tests
>   
>   ABOUT-NLS: $(srcdir)/doc/nls.texi $(srcdir)/doc/matrix.texi
>   	rm -f $(srcdir)/ABOUT-NLS \
> --- 26,32 ----
>   gettextsrc_DATA = ABOUT-NLS
>   
>   EXTRA_DIST = BUGS DISCLAIM README.gemtext aclocal.sh
> ! SUBDIRS = doc intl lib src po m4 misc tests djgpp
>   
>   ABOUT-NLS: $(srcdir)/doc/nls.texi $(srcdir)/doc/matrix.texi
>   	rm -f $(srcdir)/ABOUT-NLS \

I didn't take this patch, because I don't like the idea that on all
Unix platforms the build descends into the djgpp/ subdirectory. (That
could become dangerous if this directory is not maintained regularly.)
Instead I put a simple Makefile without autoconf machinery into djgpp/.

Bruno

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019