Integrated preprocessor patch - revised

Philipp Thomas pthomas@suse.de
Mon Sep 11 12:53:00 GMT 2000


* Zack Weinberg (zack@wolery.cumb.org) [20000911 20:32]:

> $(srcdir)/$(PACKAGE).pot: $(POTFILES)
> 	$(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \
> 	  --add-comments --keyword=_ --keyword=N_ \
> 	  --files-from=$(srcdir)/POTFILES.in --defines \
> 	&& test ! -f $(PACKAGE).po \
> 	   || ( rm -f $(srcdir)/$(PACKAGE).pot \
> 		&& mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot )
> 
> is always exposed, but without --enable-maintainer-mode the command is
> 'touch $(srcdir)/$(PACKAGE).pot' or similar?

Not a bad idea! I'll look at it sometime this week, as I have a pile of work
that has to be done by tomorrow (looks like another night session, just the
thing you need on the day before your birthday ...).
 
> Even simpler, have configure activate --enable-maintainer-mode if all
> the commands it wants are found.  I think this is only xgettext at the
> moment?

Basically yes, but we currently still need a special version of xgettext.
Paul Eggerts patches have finally found their way into the gettext CVS, but
an additionally needed patch is still pending approval. So until that patch
hasn't been accepted, it wouldn't be that easy to determine wether we've got
the right one. At least not for someone like me who isn't that firm in
writing autoconf tests.

Testing for --defines is easy, but how do I test the special form of
--keywords=foo:3 which tells the new xgettext that the third parameter of
foo is the string to translate?
 
> Unrelated question: are we ever going to go back to
> --without-included-gettext default?  If you want to build a profiled
> cc1 on a platform where gettext is in libc, you get link errors if you
> don't use --without-included-gettext.

Yes, we have a similiar problem with static linked binaries. The problem is
stuff like this (from intl/dgettext.c):

/* Names for the libintl functions are a problem.  They must not clash
   with existing names and they should follow ANSI C.  But this source
   code is also used in GNU C Library where the names have a __
   prefix.  So we have to make a difference here.  */
#ifdef _LIBC
# define DGETTEXT __dgettext
# define DCGETTEXT __dcgettext
#else
# define DGETTEXT dgettext__
# define DCGETTEXT dcgettext__
#endif

libc needs __dgettext, so libc's gettext implementation is pulled in,
clashing with libintl. Now we have two choices:

 - compile our libintl with _LIBC defined or modify the the sources to also
   define __dgettext in presence of IN_GCC or something similiar.

 - make --without-included-gettext the default.

I'd prefer the latter but it has the drawback that our libintl will only be
built on a fraction of the hosts it's currently being built on, so bugs in
that area are much less likely to be caught.

Philipp

-- 
Philipp Thomas <pthomas@suse.de>
Development, SuSE GmbH, Schanzaecker Str. 10, D-90443 Nuremberg, Germany

#define NINODE  50              /* number of in core inodes */
#define NPROC   30              /* max number of processes */
 	-- Version 7 UNIX for PDP 11, /usr/include/sys/param.h


More information about the Gcc-bugs mailing list