(root)/
gettext-0.22.4/
gettext-runtime/
intl/
libgnuintl.in.h
       1  /* Message catalogs for internationalization.
       2     Copyright (C) 1995-1997, 2000-2016, 2018-2023 Free Software Foundation, Inc.
       3  
       4     This program is free software: you can redistribute it and/or modify
       5     it under the terms of the GNU Lesser General Public License as published by
       6     the Free Software Foundation; either version 2.1 of the License, or
       7     (at your option) any later version.
       8  
       9     This program is distributed in the hope that it will be useful,
      10     but WITHOUT ANY WARRANTY; without even the implied warranty of
      11     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      12     GNU Lesser General Public License for more details.
      13  
      14     You should have received a copy of the GNU Lesser General Public License
      15     along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
      16  
      17  #ifndef _LIBINTL_H
      18  #define _LIBINTL_H 1
      19  
      20  #include <locale.h>
      21  #if (defined __APPLE__ && defined __MACH__) && @HAVE_NEWLOCALE@
      22  # include <xlocale.h>
      23  #endif
      24  
      25  /* The LC_MESSAGES locale category is the category used by the functions
      26     gettext() and dgettext().  It is specified in POSIX, but not in ANSI C.
      27     On systems that don't define it, use an arbitrary value instead.
      28     On Solaris, <locale.h> defines __LOCALE_H (or _LOCALE_H in Solaris 2.5)
      29     then includes <libintl.h> (i.e. this file!) and then only defines
      30     LC_MESSAGES.  To avoid a redefinition warning, don't define LC_MESSAGES
      31     in this case.  */
      32  #if !defined LC_MESSAGES && !(defined __LOCALE_H || (defined _LOCALE_H && defined __sun))
      33  # define LC_MESSAGES 1729
      34  #endif
      35  
      36  /* We define an additional symbol to signal that we use the GNU
      37     implementation of gettext.  */
      38  #define __USE_GNU_GETTEXT 1
      39  
      40  /* Provide information about the supported file formats.  Returns the
      41     maximum minor revision number supported for a given major revision.  */
      42  #define __GNU_GETTEXT_SUPPORTED_REVISION(major) \
      43    ((major) == 0 || (major) == 1 ? 1 : -1)
      44  
      45  /* Resolve a platform specific conflict on DJGPP.  GNU gettext takes
      46     precedence over _conio_gettext.  */
      47  #ifdef __DJGPP__
      48  # undef gettext
      49  #endif
      50  
      51  #ifdef __cplusplus
      52  extern "C" {
      53  #endif
      54  
      55  
      56  /* Version number: (major<<16) + (minor<<8) + subminor */
      57  #define LIBINTL_VERSION 0x001604
      58  extern int libintl_version;
      59  
      60  
      61  /* We redirect the functions to those prefixed with "libintl_".  This is
      62     necessary, because some systems define gettext/textdomain/... in the C
      63     library (namely, Solaris 2.4 and newer, and GNU libc 2.0 and newer).
      64     If we used the unprefixed names, there would be cases where the
      65     definition in the C library would override the one in the libintl.so
      66     shared library.  Recall that on ELF systems, the symbols are looked
      67     up in the following order:
      68       1. in the executable,
      69       2. in the shared libraries specified on the link command line, in order,
      70       3. in the dependencies of the shared libraries specified on the link
      71          command line,
      72       4. in the dlopen()ed shared libraries, in the order in which they were
      73          dlopen()ed.
      74     The definition in the C library would override the one in libintl.so if
      75     either
      76       * -lc is given on the link command line and -lintl isn't, or
      77       * -lc is given on the link command line before -lintl, or
      78       * libintl.so is a dependency of a dlopen()ed shared library but not
      79         linked to the executable at link time.
      80     Since Solaris gettext() behaves differently than GNU gettext(), this
      81     would be unacceptable.
      82  
      83     The redirection happens by default through macros in C, so that &gettext
      84     is independent of the compilation unit, but through inline functions in
      85     C++, in order not to interfere with the name mangling of class fields or
      86     class methods called 'gettext'.  */
      87  
      88  /* The user can define _INTL_REDIRECT_INLINE or _INTL_REDIRECT_MACROS.
      89     If he doesn't, we choose the method.  A third possible method is
      90     _INTL_REDIRECT_ASM, supported only by GCC.  */
      91  #if !(defined _INTL_REDIRECT_INLINE || defined _INTL_REDIRECT_MACROS)
      92  # if defined __GNUC__ && __GNUC__ >= 2 && !(defined __APPLE_CC__ && __APPLE_CC__ > 1) && !defined __MINGW32__ && !(__GNUC__ == 2 && defined _AIX) && (defined __STDC__ || defined __cplusplus)
      93  #  define _INTL_REDIRECT_ASM
      94  # else
      95  #  ifdef __cplusplus
      96  #   define _INTL_REDIRECT_INLINE
      97  #  else
      98  #   define _INTL_REDIRECT_MACROS
      99  #  endif
     100  # endif
     101  #endif
     102  /* Auxiliary macros.  */
     103  #ifdef _INTL_REDIRECT_ASM
     104  # define _INTL_ASM(cname) __asm__ (_INTL_ASMNAME (__USER_LABEL_PREFIX__, #cname))
     105  # define _INTL_ASMNAME(prefix,cnamestring) _INTL_STRINGIFY (prefix) cnamestring
     106  # define _INTL_STRINGIFY(prefix) #prefix
     107  #else
     108  # define _INTL_ASM(cname)
     109  #endif
     110  
     111  /* _INTL_MAY_RETURN_STRING_ARG(n) declares that the given function may return
     112     its n-th argument literally.  This enables GCC to warn for example about
     113     printf (gettext ("foo %y")).  */
     114  #if defined __GNUC__ && __GNUC__ >= 3 && !(defined __APPLE_CC__ && __APPLE_CC__ > 1 && !(defined __clang__ && __clang__ && __clang_major__ >= 3) && defined __cplusplus)
     115  # define _INTL_MAY_RETURN_STRING_ARG(n) __attribute__ ((__format_arg__ (n)))
     116  #else
     117  # define _INTL_MAY_RETURN_STRING_ARG(n)
     118  #endif
     119  
     120  /* Look up MSGID in the current default message catalog for the current
     121     LC_MESSAGES locale.  If not found, returns MSGID itself (the default
     122     text).  */
     123  #ifdef _INTL_REDIRECT_INLINE
     124  extern char *libintl_gettext (const char *__msgid)
     125         _INTL_MAY_RETURN_STRING_ARG (1);
     126  static inline
     127  _INTL_MAY_RETURN_STRING_ARG (1)
     128  char *gettext (const char *__msgid)
     129  {
     130    return libintl_gettext (__msgid);
     131  }
     132  #else
     133  # ifdef _INTL_REDIRECT_MACROS
     134  #  define gettext libintl_gettext
     135  # endif
     136  extern char *gettext (const char *__msgid)
     137         _INTL_ASM (libintl_gettext)
     138         _INTL_MAY_RETURN_STRING_ARG (1);
     139  #endif
     140  
     141  /* Look up MSGID in the DOMAINNAME message catalog for the current
     142     LC_MESSAGES locale.  */
     143  #ifdef _INTL_REDIRECT_INLINE
     144  extern char *libintl_dgettext (const char *__domainname, const char *__msgid)
     145         _INTL_MAY_RETURN_STRING_ARG (2);
     146  static inline
     147  _INTL_MAY_RETURN_STRING_ARG (2)
     148  char *dgettext (const char *__domainname, const char *__msgid)
     149  {
     150    return libintl_dgettext (__domainname, __msgid);
     151  }
     152  #else
     153  # ifdef _INTL_REDIRECT_MACROS
     154  #  define dgettext libintl_dgettext
     155  # endif
     156  extern char *dgettext (const char *__domainname, const char *__msgid)
     157         _INTL_ASM (libintl_dgettext)
     158         _INTL_MAY_RETURN_STRING_ARG (2);
     159  #endif
     160  
     161  /* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
     162     locale.  */
     163  #ifdef _INTL_REDIRECT_INLINE
     164  extern char *libintl_dcgettext (const char *__domainname, const char *__msgid,
     165                                  int __category)
     166         _INTL_MAY_RETURN_STRING_ARG (2);
     167  static inline
     168  _INTL_MAY_RETURN_STRING_ARG (2)
     169  char *dcgettext (const char *__domainname, const char *__msgid, int __category)
     170  {
     171    return libintl_dcgettext (__domainname, __msgid, __category);
     172  }
     173  #else
     174  # ifdef _INTL_REDIRECT_MACROS
     175  #  define dcgettext libintl_dcgettext
     176  # endif
     177  extern char *dcgettext (const char *__domainname, const char *__msgid,
     178                          int __category)
     179         _INTL_ASM (libintl_dcgettext)
     180         _INTL_MAY_RETURN_STRING_ARG (2);
     181  #endif
     182  
     183  
     184  /* Similar to 'gettext' but select the plural form corresponding to the
     185     number N.  */
     186  #ifdef _INTL_REDIRECT_INLINE
     187  extern char *libintl_ngettext (const char *__msgid1, const char *__msgid2,
     188                                 unsigned long int __n)
     189         _INTL_MAY_RETURN_STRING_ARG (1) _INTL_MAY_RETURN_STRING_ARG (2);
     190  static inline
     191  _INTL_MAY_RETURN_STRING_ARG (1) _INTL_MAY_RETURN_STRING_ARG (2)
     192  char *ngettext (const char *__msgid1, const char *__msgid2,
     193                  unsigned long int __n)
     194  {
     195    return libintl_ngettext (__msgid1, __msgid2, __n);
     196  }
     197  #else
     198  # ifdef _INTL_REDIRECT_MACROS
     199  #  define ngettext libintl_ngettext
     200  # endif
     201  extern char *ngettext (const char *__msgid1, const char *__msgid2,
     202                         unsigned long int __n)
     203         _INTL_ASM (libintl_ngettext)
     204         _INTL_MAY_RETURN_STRING_ARG (1) _INTL_MAY_RETURN_STRING_ARG (2);
     205  #endif
     206  
     207  /* Similar to 'dgettext' but select the plural form corresponding to the
     208     number N.  */
     209  #ifdef _INTL_REDIRECT_INLINE
     210  extern char *libintl_dngettext (const char *__domainname, const char *__msgid1,
     211                                  const char *__msgid2, unsigned long int __n)
     212         _INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3);
     213  static inline
     214  _INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3)
     215  char *dngettext (const char *__domainname, const char *__msgid1,
     216                   const char *__msgid2, unsigned long int __n)
     217  {
     218    return libintl_dngettext (__domainname, __msgid1, __msgid2, __n);
     219  }
     220  #else
     221  # ifdef _INTL_REDIRECT_MACROS
     222  #  define dngettext libintl_dngettext
     223  # endif
     224  extern char *dngettext (const char *__domainname,
     225                          const char *__msgid1, const char *__msgid2,
     226                          unsigned long int __n)
     227         _INTL_ASM (libintl_dngettext)
     228         _INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3);
     229  #endif
     230  
     231  /* Similar to 'dcgettext' but select the plural form corresponding to the
     232     number N.  */
     233  #ifdef _INTL_REDIRECT_INLINE
     234  extern char *libintl_dcngettext (const char *__domainname,
     235                                   const char *__msgid1, const char *__msgid2,
     236                                   unsigned long int __n, int __category)
     237         _INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3);
     238  static inline
     239  _INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3)
     240  char *dcngettext (const char *__domainname,
     241                    const char *__msgid1, const char *__msgid2,
     242                    unsigned long int __n, int __category)
     243  {
     244    return libintl_dcngettext (__domainname, __msgid1, __msgid2, __n, __category);
     245  }
     246  #else
     247  # ifdef _INTL_REDIRECT_MACROS
     248  #  define dcngettext libintl_dcngettext
     249  # endif
     250  extern char *dcngettext (const char *__domainname,
     251                           const char *__msgid1, const char *__msgid2,
     252                           unsigned long int __n, int __category)
     253         _INTL_ASM (libintl_dcngettext)
     254         _INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3);
     255  #endif
     256  
     257  
     258  #ifndef IN_LIBGLOCALE
     259  
     260  /* Set the current default message catalog to DOMAINNAME.
     261     If DOMAINNAME is null, return the current default.
     262     If DOMAINNAME is "", reset to the default of "messages".  */
     263  # ifdef _INTL_REDIRECT_INLINE
     264  extern char *libintl_textdomain (const char *__domainname);
     265  static inline char *textdomain (const char *__domainname)
     266  {
     267    return libintl_textdomain (__domainname);
     268  }
     269  # else
     270  #  ifdef _INTL_REDIRECT_MACROS
     271  #   define textdomain libintl_textdomain
     272  #  endif
     273  extern char *textdomain (const char *__domainname)
     274         _INTL_ASM (libintl_textdomain);
     275  # endif
     276  
     277  /* Specify that the DOMAINNAME message catalog will be found
     278     in DIRNAME rather than in the system locale data base.  */
     279  # ifdef _INTL_REDIRECT_INLINE
     280  extern char *libintl_bindtextdomain (const char *__domainname,
     281                                       const char *__dirname);
     282  static inline char *bindtextdomain (const char *__domainname,
     283                                      const char *__dirname)
     284  {
     285    return libintl_bindtextdomain (__domainname, __dirname);
     286  }
     287  # else
     288  #  ifdef _INTL_REDIRECT_MACROS
     289  #   define bindtextdomain libintl_bindtextdomain
     290  #  endif
     291  extern char *bindtextdomain (const char *__domainname, const char *__dirname)
     292         _INTL_ASM (libintl_bindtextdomain);
     293  # endif
     294  
     295  # if defined _WIN32 && !defined __CYGWIN__
     296  /* Specify that the DOMAINNAME message catalog will be found
     297     in WDIRNAME rather than in the system locale data base.  */
     298  #  ifdef _INTL_REDIRECT_INLINE
     299  extern wchar_t *libintl_wbindtextdomain (const char *__domainname,
     300                                           const wchar_t *__wdirname);
     301  static inline wchar_t *wbindtextdomain (const char *__domainname,
     302                                          const wchar_t *__wdirname)
     303  {
     304    return libintl_wbindtextdomain (__domainname, __wdirname);
     305  }
     306  #  else
     307  #   ifdef _INTL_REDIRECT_MACROS
     308  #    define wbindtextdomain libintl_wbindtextdomain
     309  #   endif
     310  extern wchar_t *wbindtextdomain (const char *__domainname,
     311                                   const wchar_t *__wdirname)
     312         _INTL_ASM (libintl_wbindtextdomain);
     313  #  endif
     314  # endif
     315  
     316  /* Specify the character encoding in which the messages from the
     317     DOMAINNAME message catalog will be returned.  */
     318  # ifdef _INTL_REDIRECT_INLINE
     319  extern char *libintl_bind_textdomain_codeset (const char *__domainname,
     320                                                const char *__codeset);
     321  static inline char *bind_textdomain_codeset (const char *__domainname,
     322                                               const char *__codeset)
     323  {
     324    return libintl_bind_textdomain_codeset (__domainname, __codeset);
     325  }
     326  # else
     327  #  ifdef _INTL_REDIRECT_MACROS
     328  #   define bind_textdomain_codeset libintl_bind_textdomain_codeset
     329  #  endif
     330  extern char *bind_textdomain_codeset (const char *__domainname,
     331                                        const char *__codeset)
     332         _INTL_ASM (libintl_bind_textdomain_codeset);
     333  # endif
     334  
     335  #endif /* IN_LIBGLOCALE */
     336  
     337  
     338  /* Support for format strings with positions in *printf(), following the
     339     POSIX/XSI specification.
     340     Note: These replacements for the *printf() functions are visible only
     341     in source files that #include <libintl.h> or #include "gettext.h".
     342     Packages that use *printf() in source files that don't refer to _()
     343     or gettext() but for which the format string could be the return value
     344     of _() or gettext() need to add this #include.  Oh well.  */
     345  
     346  /* Note: In C++ mode, it is not sufficient to redefine a symbol at the
     347     preprocessor macro level, such as
     348       #define sprintf libintl_sprintf
     349     Some programs may reference std::sprintf after including <libintl.h>.
     350     Therefore we must make sure that std::libintl_sprintf is defined and
     351     identical to ::libintl_sprintf.
     352     The user can define _INTL_CXX_NO_CLOBBER_STD_NAMESPACE to avoid this.
     353     In such cases, they will not benefit from the overrides when using
     354     the 'std' namespace, and they will need to do the references to the
     355     'std' namespace *before* including <libintl.h> or "gettext.h".  */
     356  
     357  #if !@HAVE_POSIX_PRINTF@
     358  
     359  # include <stdio.h>
     360  # include <stddef.h>
     361  
     362  /* Get va_list.  */
     363  # if (defined __STDC__ && __STDC__) || defined __cplusplus || defined _MSC_VER
     364  #  include <stdarg.h>
     365  # else
     366  #  include <varargs.h>
     367  # endif
     368  
     369  # if !((defined fprintf && defined _GL_STDIO_H) || defined GNULIB_overrides_fprintf) /* don't override gnulib */
     370  #  undef fprintf
     371  #  define fprintf libintl_fprintf
     372  extern int fprintf (FILE *, const char *, ...);
     373  #  if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
     374  namespace std { using ::libintl_fprintf; }
     375  #  endif
     376  # endif
     377  # if !((defined vfprintf && defined _GL_STDIO_H) || defined GNULIB_overrides_vfprintf) /* don't override gnulib */
     378  #  undef vfprintf
     379  #  define vfprintf libintl_vfprintf
     380  extern int vfprintf (FILE *, const char *, va_list);
     381  #  if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
     382  namespace std { using ::libintl_vfprintf; }
     383  #  endif
     384  # endif
     385  
     386  # if !((defined printf && defined _GL_STDIO_H) || defined GNULIB_overrides_printf) /* don't override gnulib */
     387  #  undef printf
     388  #  if defined __NetBSD__ || defined __BEOS__ || defined __CYGWIN__ || defined __MINGW32__
     389  /* Don't break __attribute__((format(printf,M,N))).
     390     This redefinition is only possible because the libc in NetBSD, Cygwin,
     391     mingw does not have a function __printf__.
     392     Alternatively, we could have done this redirection only when compiling with
     393     __GNUC__, together with a symbol redirection:
     394         extern int printf (const char *, ...)
     395                __asm__ (#__USER_LABEL_PREFIX__ "libintl_printf");
     396     But doing it now would introduce a binary incompatibility with already
     397     distributed versions of libintl on these systems.  */
     398  #   define libintl_printf __printf__
     399  #  endif
     400  #  define printf libintl_printf
     401  extern int printf (const char *, ...);
     402  #  if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
     403  namespace std { using ::libintl_printf; }
     404  #  endif
     405  # endif
     406  # if !((defined vprintf && defined _GL_STDIO_H) || defined GNULIB_overrides_vprintf) /* don't override gnulib */
     407  #  undef vprintf
     408  #  define vprintf libintl_vprintf
     409  extern int vprintf (const char *, va_list);
     410  #  if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
     411  namespace std { using ::libintl_vprintf; }
     412  #  endif
     413  # endif
     414  
     415  # if !((defined sprintf && defined _GL_STDIO_H) || defined GNULIB_overrides_sprintf) /* don't override gnulib */
     416  #  undef sprintf
     417  #  define sprintf libintl_sprintf
     418  extern int sprintf (char *, const char *, ...);
     419  #  if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
     420  namespace std { using ::libintl_sprintf; }
     421  #  endif
     422  # endif
     423  # if !((defined vsprintf && defined _GL_STDIO_H) || defined GNULIB_overrides_vsprintf) /* don't override gnulib */
     424  #  undef vsprintf
     425  #  define vsprintf libintl_vsprintf
     426  extern int vsprintf (char *, const char *, va_list);
     427  #  if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
     428  namespace std { using ::libintl_vsprintf; }
     429  #  endif
     430  # endif
     431  
     432  # if @HAVE_SNPRINTF@
     433  
     434  #  if !((defined snprintf && defined _GL_STDIO_H) || defined GNULIB_overrides_snprintf) /* don't override gnulib */
     435  #   undef snprintf
     436  #   define snprintf libintl_snprintf
     437  extern int snprintf (char *, size_t, const char *, ...);
     438  #   if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
     439  namespace std { using ::libintl_snprintf; }
     440  #   endif
     441  #  endif
     442  #  if !((defined vsnprintf && defined _GL_STDIO_H) || defined GNULIB_overrides_vsnprintf) /* don't override gnulib */
     443  #   undef vsnprintf
     444  #   define vsnprintf libintl_vsnprintf
     445  extern int vsnprintf (char *, size_t, const char *, va_list);
     446  #   if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
     447  namespace std { using ::libintl_vsnprintf; }
     448  #   endif
     449  #  endif
     450  
     451  # endif
     452  
     453  # if @HAVE_ASPRINTF@
     454  
     455  #  if !((defined asprintf && defined _GL_STDIO_H) || defined GNULIB_overrides_asprintf) /* don't override gnulib */
     456  #   undef asprintf
     457  #   define asprintf libintl_asprintf
     458  extern int asprintf (char **, const char *, ...);
     459  #   if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
     460  namespace std { using ::libintl_asprintf; }
     461  #   endif
     462  #  endif
     463  #  if !((defined vasprintf && defined _GL_STDIO_H) || defined GNULIB_overrides_vasprintf) /* don't override gnulib */
     464  #   undef vasprintf
     465  #   define vasprintf libintl_vasprintf
     466  extern int vasprintf (char **, const char *, va_list);
     467  #   if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
     468  namespace std { using ::libintl_vasprintf; }
     469  #   endif
     470  #  endif
     471  
     472  # endif
     473  
     474  # if @HAVE_WPRINTF@
     475  
     476  #  undef fwprintf
     477  #  define fwprintf libintl_fwprintf
     478  extern int fwprintf (FILE *, const wchar_t *, ...);
     479  #  if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
     480  namespace std { using ::libintl_fwprintf; }
     481  #  endif
     482  #  undef vfwprintf
     483  #  define vfwprintf libintl_vfwprintf
     484  extern int vfwprintf (FILE *, const wchar_t *, va_list);
     485  #  if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
     486  namespace std { using ::libintl_vfwprintf; }
     487  #  endif
     488  
     489  #  undef wprintf
     490  #  define wprintf libintl_wprintf
     491  extern int wprintf (const wchar_t *, ...);
     492  #  if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
     493  namespace std { using ::libintl_wprintf; }
     494  #  endif
     495  #  undef vwprintf
     496  #  define vwprintf libintl_vwprintf
     497  extern int vwprintf (const wchar_t *, va_list);
     498  #  if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
     499  namespace std { using ::libintl_vwprintf; }
     500  #  endif
     501  
     502  #  undef swprintf
     503  #  define swprintf libintl_swprintf
     504  extern int swprintf (wchar_t *, size_t, const wchar_t *, ...);
     505  #  if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
     506  namespace std { using ::libintl_swprintf; }
     507  #  endif
     508  #  undef vswprintf
     509  #  define vswprintf libintl_vswprintf
     510  extern int vswprintf (wchar_t *, size_t, const wchar_t *, va_list);
     511  #  if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
     512  namespace std { using ::libintl_vswprintf; }
     513  #  endif
     514  
     515  # endif
     516  
     517  #endif
     518  
     519  
     520  /* Support for retrieving the name of a locale_t object.  */
     521  #if @ENHANCE_LOCALE_FUNCS@
     522  
     523  # ifndef GNULIB_defined_newlocale /* don't override gnulib */
     524  #  undef newlocale
     525  #  define newlocale libintl_newlocale
     526  extern locale_t newlocale (int, const char *, locale_t);
     527  #  if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
     528  namespace std { using ::libintl_newlocale; }
     529  #  endif
     530  # endif
     531  
     532  # ifndef GNULIB_defined_duplocale /* don't override gnulib */
     533  #  undef duplocale
     534  #  define duplocale libintl_duplocale
     535  extern locale_t duplocale (locale_t);
     536  #  if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
     537  namespace std { using ::libintl_duplocale; }
     538  #  endif
     539  # endif
     540  
     541  # ifndef GNULIB_defined_freelocale /* don't override gnulib */
     542  #  undef freelocale
     543  #  define freelocale libintl_freelocale
     544  extern void freelocale (locale_t);
     545  #  if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
     546  namespace std { using ::libintl_freelocale; }
     547  #  endif
     548  # endif
     549  
     550  #endif
     551  
     552  
     553  /* Support for the locale chosen by the user.  */
     554  #if (defined __APPLE__ && defined __MACH__) || defined _WIN32 || defined __CYGWIN__
     555  
     556  # ifndef GNULIB_defined_setlocale /* don't override gnulib */
     557  #  undef setlocale
     558  #  define setlocale libintl_setlocale
     559  extern char *setlocale (int, const char *);
     560  #  if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
     561  namespace std { using ::libintl_setlocale; }
     562  #  endif
     563  # endif
     564  
     565  # if @HAVE_NEWLOCALE@
     566  
     567  #  undef newlocale
     568  #  define newlocale libintl_newlocale
     569  /* Declare newlocale() only if the system headers define the 'locale_t' type. */
     570  #  if !(defined __CYGWIN__ && !defined LC_ALL_MASK)
     571  extern locale_t newlocale (int, const char *, locale_t);
     572  #   if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
     573  namespace std { using ::libintl_newlocale; }
     574  #   endif
     575  #  endif
     576  
     577  # endif
     578  
     579  #endif
     580  
     581  
     582  /* Support for relocatable packages.  */
     583  
     584  /* Sets the original and the current installation prefix of the package.
     585     Relocation simply replaces a pathname starting with the original prefix
     586     by the corresponding pathname with the current prefix instead.  Both
     587     prefixes should be directory names without trailing slash (i.e. use ""
     588     instead of "/").  */
     589  #define libintl_set_relocation_prefix libintl_set_relocation_prefix
     590  extern void
     591         libintl_set_relocation_prefix (const char *orig_prefix,
     592                                        const char *curr_prefix);
     593  
     594  
     595  #ifdef __cplusplus
     596  }
     597  #endif
     598  
     599  #endif /* libintl.h */