This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Confused by gettext on cygwin


>Date: Wed, 04 Jul 2001 21:09:20 -0400
>From: "Charles S. Wilson" <cwilson@ece.gatech.edu>
>
...
>Well, the gettext.h created by gettextize is made as a copy of a special 
>gettext.h stored in /usr/share/gettext/intl/.  During my build process 
>for cygwin, the /usr/share/gettext/intl/gettext.h file is created 
>identical to the system gettext.h in /usr/include.  So, if the system 
>file is different from some baseline, then the created file will also be 
>different.
>
>It was necessary to modify gettext.h on cygwin to support using the 
>braindead windows shared library format (DLLs).  Functions and variables 
>must be declared with special compile-time directives 
>(__declspec(dllimport), __declspec(dllexport)) -- thus, the headers must 
>be modified.
>
>Now, I have corresponded with the "real" gettext people about this. 
>Their response is that these changes are just too damn ugly to 
>incorporate -- and there MAY be upcoming changes to GCC and binutils so 
>that cygwin no longer requires this uglification.  Therefore, those guys 
>are taking a wait-and-see approach.  We all hope that the uglification 
>goes away at some point.
>
>> I thought that the purpose of the created files were to generate them
>> exactly in the same way independantly of what system they were
>> generated on. The are probably not compiled on that system anyway.
>> 
>> What is it about gettext that I have missunderstood?
>
>
>Nothing.
>
>If you merely want to gettextize a package that will be built on another 
>platform, or will be built on cygwin ALWAYS using the 
>--with-included-gettext (that is, you'll never use the cygwin system 
>libintl.a with your package), then just
>
>copy the "linux" or "official" gettext.h into /usr/share/gettext/intl on 
>your cygwin system.  In fact, that may not be a bad idea in ALL cases, 
>because if somebody builds your package on cygwin and DOESN't specify 
>--with-included-gettext, then the build will use the 
>/usr/include/gettext.h and /usr/lib/libintl.a -- so no problems: your 
>"official" gettextized gettext.h won't even get used in that case.
>
>Hmmm...perhaps the cygwin gettext package should put the official 
>gettext.h into /usr/share/gettext/intl, and only use the modified, 
>DLL-supporting gettext.h for /usr/include...

I think your conclusion is appealing. As I see it the gettext package
should be regarded as a package with two different purposes.

1. The purpose of providing the gettext library and directories on a
   system where it is installed.
2. The purpose of providing every package internationalized with GNU
   gettext with the necessary files consistantly and identically.

My observation is that in this case is that the purpose 1 on a
cygwin-system has infected the purpose 2.

I think the best thing would be if the gettextize command include
non-modified files i.e. directly from the gettext distribution
(exactly as the gettextize command would do on all other systems).

If there are problems getting the purpose 1 right on a system, like
the special DLL-requirements you are talking about, then that would
perhaps complicated purpose 1 but that should never modify purpose 2.

	/Linus

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]