<URL: http://bugs.freeciv.org/Ticket/Display.html?id=13287 >

> [dmarks - Fr 28. Okt 2005, 15:06:09]:
> 
> > [jdorje - Fri Oct 28 02:37:44 2005]:
> > 
> > Daniel Markstedt wrote:
> > 
> > > climisc.c:295: warning: passing arg 3 of `my_snprintf' makes pointer
> > > from integer without a cast
> > 
> > That's because gettext headers aren't properly included.  This is
surely 
> > a bug but if linking works and it runs then it is harmless.
> > 
> > However, it should obviously be fixed.  Question 1: where is gettext() 
> > defined?  Try running "man -a gettext" and see if tells you anything to 
> > #include.  Then try "grep gettext /usr/include/*.h".
> 
> Neither of those commands give anything. The former command gives "No
> manual entry for gettext". The fact is that my gettext package is
> installed via Darwinports and resides in my /opt/local/ directory
> 
> Therefore: "grep gettext /opt/local/include/*.h" gives this:
> 
> /opt/local/include/gettext-po.h:/* Public API for GNU gettext PO files -
> contained in libgettextpo.
> /opt/local/include/gettext-po.h:extern int libgettextpo_version;
> /opt/local/include/libintl.h:   gettext() and dgettext().  It is
> specified in POSIX, but not in ANSI C.
> /opt/local/include/libintl.h:   implementation of gettext.  */
> /opt/local/include/libintl.h:/* Resolve a platform specific conflict on
> DJGPP.  GNU gettext takes
> /opt/local/include/libintl.h:   precedence over _conio_gettext.  */
> /opt/local/include/libintl.h:# undef gettext
> /opt/local/include/libintl.h:   necessary, because some systems define
> gettext/textdomain/... in the C
> /opt/local/include/libintl.h:   Since Solaris gettext() behaves
> differently than GNU gettext(), this
> /opt/local/include/libintl.h:   The redirection happens by default
> through macros in C, so that &gettext
> /opt/local/include/libintl.h:   class methods called 'gettext'.  */
> /opt/local/include/libintl.h:extern char *libintl_gettext (const char
> *__msgid);
> /opt/local/include/libintl.h:static inline char *gettext (const char
> *__msgid)
> /opt/local/include/libintl.h:  return libintl_gettext (__msgid);
> /opt/local/include/libintl.h:# define gettext libintl_gettext
> /opt/local/include/libintl.h:extern char *gettext (const char *__msgid)
> /opt/local/include/libintl.h:       _INTL_ASM (libintl_gettext);
> /opt/local/include/libintl.h:extern char *libintl_dgettext (const char
> *__domainname, const char *__msgid);
> /opt/local/include/libintl.h:static inline char *dgettext (const char
> *__domainname, const char *__msgid)
> /opt/local/include/libintl.h:  return libintl_dgettext (__domainname,
> __msgid);
> /opt/local/include/libintl.h:# define dgettext libintl_dgettext
> /opt/local/include/libintl.h:extern char *dgettext (const char
> *__domainname, const char *__msgid)
> /opt/local/include/libintl.h:       _INTL_ASM (libintl_dgettext);
> /opt/local/include/libintl.h:extern char *libintl_dcgettext (const char
> *__domainname, const char *__msgid,
> /opt/local/include/libintl.h:static inline char *dcgettext (const char
> *__domainname, const char *__msgid,
> /opt/local/include/libintl.h:  return libintl_dcgettext (__domainname,
> __msgid, __category);
> /opt/local/include/libintl.h:# define dcgettext libintl_dcgettext
> /opt/local/include/libintl.h:extern char *dcgettext (const char
> *__domainname, const char *__msgid,
> /opt/local/include/libintl.h:       _INTL_ASM (libintl_dcgettext);
> /opt/local/include/libintl.h:/* Similar to `gettext' but select the
> plural form corresponding to the
> /opt/local/include/libintl.h:extern char *libintl_ngettext (const char
> *__msgid1, const char *__msgid2,
> /opt/local/include/libintl.h:static inline char *ngettext (const char
> *__msgid1, const char *__msgid2,
> /opt/local/include/libintl.h:  return libintl_ngettext (__msgid1,
> __msgid2, __n);
> /opt/local/include/libintl.h:# define ngettext libintl_ngettext
> /opt/local/include/libintl.h:extern char *ngettext (const char
> *__msgid1, const char *__msgid2,
> /opt/local/include/libintl.h:       _INTL_ASM (libintl_ngettext);
> /opt/local/include/libintl.h:/* Similar to `dgettext' but select the
> plural form corresponding to the
> /opt/local/include/libintl.h:extern char *libintl_dngettext (const char
> *__domainname, const char *__msgid1,
> /opt/local/include/libintl.h:static inline char *dngettext (const char
> *__domainname, const char *__msgid1,
> /opt/local/include/libintl.h:  return libintl_dngettext (__domainname,
> __msgid1, __msgid2, __n);
> /opt/local/include/libintl.h:# define dngettext libintl_dngettext
> /opt/local/include/libintl.h:extern char *dngettext (const char
> *__domainname,
> /opt/local/include/libintl.h:       _INTL_ASM (libintl_dngettext);
> /opt/local/include/libintl.h:/* Similar to `dcgettext' but select the
> plural form corresponding to the
> /opt/local/include/libintl.h:extern char *libintl_dcngettext (const char
> *__domainname,
> /opt/local/include/libintl.h:static inline char *dcngettext (const char
> *__domainname,
> /opt/local/include/libintl.h:  return libintl_dcngettext (__domainname,
> __msgid1, __msgid2, __n, __category);
> /opt/local/include/libintl.h:# define dcngettext libintl_dcngettext
> /opt/local/include/libintl.h:extern char *dcngettext (const char
> *__domainname,
> /opt/local/include/libintl.h:       _INTL_ASM (libintl_dcngettext);
> /opt/local/include/libintl.h:   in source files that #include
> <libintl.h> or #include "gettext.h".
> /opt/local/include/libintl.h:   or gettext() but for which the format
> string could be the return value
> /opt/local/include/libintl.h:   of _() or gettext() need to add this
> #include.  Oh well.  */
> 
> 
> >  The look at 
> > config.h and see what the "HAVE_LIBINTL_H" and "HAVE_LOCALE_H" lines
say.
> > 
> > -jason
> > 
> 
> /* #undef HAVE_LIBINTL_H */
> 
> and 
> 
> #define HAVE_LOCALE_H 1
> 
> 
> -Daniel
> 

So your gettext() function is defined in /opt/local/include/libintl.h,
but the configure script doesn't find libintl.h. 

Does it work when you prepend CFLAGS="-I/opt/local/include" to the
configure command?

And if that doesn't work, can you please send the config.log file?


_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to