www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/05/02/21:43:43

Message-Id: <200105021633.MAA15973@delorie.com>
From: "Juan Manuel Guerrero" <ST001906 AT HRZ1 DOT HRZ DOT TU-Darmstadt DOT De>
Organization: Darmstadt University of Technology
To: djgpp-announce AT delorie DOT com
Date: Wed, 2 May 2001 16:42:31 +0200
Subject: ANNOUNCE: DJGPP port of GNU gettext 0.10.37
Reply-To: djgpp AT delorie DOT com

This is a port of GNU Gettext 0.10.37 to MSDOS/DJGPP.


The GNU gettext package provides the needed tools and library functions for
authors or maintainers of other packages or programs which they want to see
internationalized. Starting with GNU Gettext 0.10.36, the official GNU gettext
distribution has build-in DJGPP support, so you should be able to build future
official GNU distributions out-of-the-box, as soon as djdev204.zip has been
released. As long as you use djdev203.zip, you should ***ALWAYS*** download
the DJGPP port of GNU gettext. The reason for this is the well known name
clash existing between the BORLAND-compatibility gettext() function declared
in conio.h provided by libc.a and the GNU gettext() function declared in
libintl.h and provided by libintl.a. Only the binary package of the DJGPP ports
of GNU gettext will provide the required files to patch your C library.


The binaries, docs and source packages can be downloaded from Simtel.NET
and mirrors as:
  <ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/gtxt037b.zip>
  <ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/gtxt037d.zip>
  <ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/gtxt037s.zip>


It should be noticed that GNU gettext **DEPENDS** on the GNU libiconv
distribution. This implies that the DJGPP port of libiconv (licv161b.zip or
later) **MUST** be downloaded and installed too. The GNU libiconv port provides
the required functionality for on-the-fly recoding from UNIX charsets to the
appropiate MSDOS codepages to the DJGPP port of GNU gettext. This port is
available from Simtel.NET and mirrors as:
  <ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/licv161b.zip>
  <ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/licv161s.zip>

The installation of GNU libiconv is **NOT** optional, neither for rebuilding
this package from sources nor for using this package in your own aplications.
All future DJGPP ports of GNU distributions that want to provide NLS support
will depend on **BOTH** ports, GNU gettext **AND** GNU libiconv. For using GNU
gettext in your own projects, you must **ALWAYS** link with a command like this:
  -lintl -liconv

If you link your projects with libintl.a but without libiconv.a you will get
linker errors about unresolved external references in libintl.a.
Users not interested in the on-the-fly recoding capability will have to
reconfigure and recompile the DJGPP port of GNU gettext from scratch. In this
case follow the following steps:
1) Deinstall **ANY** existing DJGPP port of libiconv.
2) Install the source package of the DJGPP port of GNU gettext in an appropiate
   directory.
3) From the gnu/gtxt-010.37 directory run the following commands:
     make distclean
     djgpp\config
     make
     make check
4) To install the products run the command:
     make install prefix=x:/some/appropiate/directory
   Replace prefix with an apropiate installation path. If no prefix is given at
   all the default prefix, this is /dev/env/DJDIR, will be used.


Although, gettext has build-in DJGPP support, it can not be used with
the stock djdev203.zip distribution. This is because a name conflict
between a libc function and a libintl function existes. DJGPP's libc
contains a BORLAND-compatibility function called gettext. This name
collides with the gettext function provided by libintl. This DJGPP port
of GNU gettext provides a new conio.h and a recompiled conio.o file that
will remove the existing name clash. If you install the binary package
you will find both files in the %DJDIR%/gnu/gtxt-010.37/djgpp/djdev-2.03
subdirectory (%DJDIR% is the path to your DJGPP installation tree). To
update your libc.a proceed as follows:
1) Cd into the %DJDIR%/gnu/gtxt-010.37/djgpp/djdev-2.03 directory.
   First, you should backup your old header and library. For this task,
   run the following commands:
     copy %DJDIR%\include\conio.h %DJDIR%\include\conio.bak
     copy %DJDIR%\lib\libc.a %DJDIR%\lib\libc.bak
   Substitute %DJDIR% by the path to your DJGPP installation.
2) Now you can copy the new header into your include directory
   running the command:
     copy conio.h %DJDIR%\include
3) Now you can substitute the old conio.o file in libc.a with the new one.
   For this task you will need the `ar' program from binutils installed.
   Run the command:
     ar -rv %DJDIR%\lib\libc.a conio.o
   This will replace in your libc.a the existing conio.o by this new one.
   Substitute %DJDIR% by the path to your DJGPP installation.
   You are done.

Now the name conflict between the BORLAND-Compatibility gettext function and
the GNU gettext function has been removed. To remove this conflict, the BORLAND
-compatibility function has been renamed into _conio_gettext. At the same time
a code snippet has been added to conio.h. This code will check if libintl.h has
**NOT** been included by the source file. If this is true a macro called gettext
will be defined to _conio_gettext will be defined. At the same time, libintl.h
will **ALWAYS** redefine the macro gettext to gettext. This implies that the
keyword gettext is **ALWAYS** assigned to the GNU gettext function and never to
the BORLAND_compatibility function from libc.a if both headers, libintl.h and
conio.h, are included by the same source file. Of course, the goal of all this
is not only to remove the name clash between both functions, but also to keep
the user visible changes as small as possible. All this has the following
implications:
1) Sources that use BORLAND-compatibility gettext() and do **NOT** use
   GNU gettext() can still be compiled without any change and/or difficulty
   with the new C library and header. This is because this sources will include
   conio.h and **NOT** libintl.h so the gettext keyword will continue making
   reference to the BORLAND-compatibility function defined in conio.c.
   In this case the updated DJGPP libc.a will not exhibit any user visible
   change.
2) Sources that use GNU gettext() and do **NOT** use BORLAND-compatibility
   gettext() can also still be compiled without any change and/or difficulty.
   This sources will include libintl.h and **NOT** conio.h so the sources
   will never see the BORLAND-compatibility gettext() declaration in conio.h.
   In this case the updated DJGPP libc.a will not exhibit any user visible
   change.
3) Sources that use GNU gettext() **AND** BORLAND-compatibility gettext()
   can **NOT** be compiled without some changes. This sources will include
   both headers libintl.h **AND** conio.h. In this case the keyword gettext
   will be reserved for the GNU gettext() and will ***NEVER*** make reference
   to the BORLAND-compatibility gettext function. This function will now be 
   available as _conio_gettext. The user will have to replace *EVERY* occurence
   of the BORLAND-compatibility gettext function by new keyword _conio_gettext
   in the sources.

***PLEASE*** read the readme file in the djgpp directory to become familiar
with all this.


The binary package gtxt037b.zip contains all needed files to get NLS
support for the following DJGPP ports:
  bison-1.28 (bsn128s.zip)
  enscript-1.5.0 (ens150s.zip)
  enscript-1.6.1 (ens161s.zip)
  enscript-1.6.2 (ens162s.zip)
  fileutils-3.16 (fil316s.zip)
  fileutils-4.0 (fil40s-beta1.zip from http://www.phekda.freeserve.co.uk/richdawe/djgpp/fileutils/)
  grep-2.4 (grep24s.zip)
  id-utils-3.2 (idu32s.zip)
  make-3.79.1 (mak3791s.zip)
  recode-3.5 (rcode35s.zip)
  sed-3.02.80 (sed-3.02.80.tar.gz from ftp://alpha.gnu.org/pub/gnu/sed)
  sharutils-4.2c (shar42cs.zip)
  sh-utils-2.0i (shl20is.zip)
  sh-utils-2.0j (shl20js.zip)
  tar-1.12a (tar112as.zip)
  texinfo-4.0 (txi40s.zip)
  textutils-2.0 (txt20s.zip)


Send GNU gettext specific bug reports to <bug-gnu-utils AT gnu DOT org>.
Send suggestions and bug reports concerning the DJGPP port to
comp.os.msdos.djgpp or <djgpp AT delorie DOT com>.

  Guerrero, Juan Manuel <st001906 AT hrz1 DOT hrz DOT tu-darmstadt DOT de>

- Raw text -


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