cat >gettext.c < /* Handle the case that we link against GNU libintl but include a non * GNU libintl.h. */ #ifndef __USE_GNU_GETTEXT # error " is not GNU gettext. Maybe you have to adjust your include path." #endif #include int main (argc, argv) int argc; char* argv[]; { /* FIXME: The gettext runtime libraries provided by Solaris 8 and 9 are not sufficient. Those of Solaris 10 *may* work. To play safe, we currently only compile the XS version for GNU gettext and use some undocumented features, to test for that. Thanks to Bruno Haible for the hint. */ extern int _nl_msg_cat_cntr; #if 0 /* This seems to be defined in the GNU libc only, not in standalone * GNU gettext. */ extern int* _nl_domain_bindings; #endif textdomain ("dummy"); bindtextdomain ("dummy", "."); bind_textdomain_codeset ("dummy", "us-ascii"); gettext ("msgid"); dgettext ("dummy", "msgid"); dcgettext ("dummy", "msgid", LC_MESSAGES); ngettext ("msgid", "msgid_plural", #if 0 _nl_msg_cat_cntr + *_nl_domain_bindings); #else _nl_msg_cat_cntr); #endif dngettext ("dummy", "msgid", "msgid_plural", 1); dcngettext ("dummy", "msgid", "msgid_plural", 1, LC_MESSAGES); return 0; } EOF cc -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fstack-protector -L/usr/local/lib -lnsl -ldl -lm -lcrypt -lutil -lpthread -lc -o gettest.exe gettest.c