X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Flanginfo.in.h;h=54fa1af350dcd7e0895e78947538dcca989937a3;hb=b187ff0528e2a081392a834e684d1d0c161708a7;hp=26678cc533eb775d04d8d44197ac3acd4b43a373;hpb=e0bf16819c83c3ef1d11bf373f5f90a1f09c534c;p=gnulib.git diff --git a/lib/langinfo.in.h b/lib/langinfo.in.h index 26678cc53..54fa1af35 100644 --- a/lib/langinfo.in.h +++ b/lib/langinfo.in.h @@ -1,5 +1,5 @@ /* Substitute for and wrapper around . - Copyright (C) 2009 Free Software Foundation, Inc. + Copyright (C) 2009, 2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -123,13 +123,11 @@ typedef int nl_item; #endif -/* The definition of GL_LINK_WARNING is copied here. */ +/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ -/* Declare overridden functions. */ +/* The definition of _GL_WARN_ON_USE is copied here. */ -#ifdef __cplusplus -extern "C" { -#endif +/* Declare overridden functions. */ /* Return a piece of locale dependent information. @@ -138,23 +136,25 @@ extern "C" { #if @GNULIB_NL_LANGINFO@ # if @REPLACE_NL_LANGINFO@ -# undef nl_langinfo -# define nl_langinfo rpl_nl_langinfo -# endif -# if !@HAVE_NL_LANGINFO@ || @REPLACE_NL_LANGINFO@ -extern char *nl_langinfo (nl_item item); +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef nl_langinfo +# define nl_langinfo rpl_nl_langinfo +# endif +_GL_FUNCDECL_RPL (nl_langinfo, char *, (nl_item item)); +_GL_CXXALIAS_RPL (nl_langinfo, char *, (nl_item item)); +# else +# if !@HAVE_NL_LANGINFO@ +_GL_FUNCDECL_SYS (nl_langinfo, char *, (nl_item item)); +# endif +_GL_CXXALIAS_SYS (nl_langinfo, char *, (nl_item item)); # endif +_GL_CXXALIASWARN (nl_langinfo); #elif defined GNULIB_POSIXCHECK # undef nl_langinfo -# define nl_langinfo(i) \ - (GL_LINK_WARNING ("nl_langinfo is not portable - " \ - "use gnulib module nl_langinfo for portability"), \ - nl_langinfo (i)) -#endif - - -#ifdef __cplusplus -} +# if HAVE_RAW_DECL_NL_LANGINFO +_GL_WARN_ON_USE (nl_langinfo, "nl_langinfo is not portable - " + "use gnulib module nl_langinfo for portability"); +# endif #endif