asintl.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /* asintl.h - gas-specific header for gettext code.
  2. Copyright (C) 1998-2022 Free Software Foundation, Inc.
  3. Written by Tom Tromey <tromey@cygnus.com>
  4. This file is part of GAS, the GNU Assembler.
  5. GAS is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 3, or (at your option)
  8. any later version.
  9. GAS is distributed in the hope that it will be useful, but WITHOUT
  10. ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  11. or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
  12. License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with GAS; see the file COPYING. If not, write to the Free
  15. Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
  16. 02110-1301, USA. */
  17. #ifndef ENABLE_NLS
  18. /* The Solaris version of locale.h always includes libintl.h. If we have
  19. been configured with --disable-nls then ENABLE_NLS will not be defined
  20. and the dummy definitions of bindtextdomain (et al) below will conflict
  21. with the definitions in libintl.h. So we define these values to prevent
  22. the bogus inclusion of libintl.h. */
  23. # define _LIBINTL_H
  24. # define _LIBGETTEXT_H
  25. #endif
  26. #include <locale.h>
  27. #ifdef ENABLE_NLS
  28. # include <libintl.h>
  29. # define _(String) gettext (String)
  30. # ifdef gettext_noop
  31. # define N_(String) gettext_noop (String)
  32. # else
  33. # define N_(String) (String)
  34. # endif
  35. #else
  36. # define gettext(Msgid) (Msgid)
  37. # define dgettext(Domainname, Msgid) (Msgid)
  38. # define dcgettext(Domainname, Msgid, Category) (Msgid)
  39. # define ngettext(Msgid1, Msgid2, n) \
  40. (n == 1 ? Msgid1 : Msgid2)
  41. # define dngettext(Domainname, Msgid1, Msgid2, n) \
  42. (n == 1 ? Msgid1 : Msgid2)
  43. # define dcngettext(Domainname, Msgid1, Msgid2, n, Category) \
  44. (n == 1 ? Msgid1 : Msgid2)
  45. # define textdomain(Domainname) do {} while (0)
  46. # define bindtextdomain(Domainname, Dirname) do {} while (0)
  47. # define _(String) (String)
  48. # define N_(String) (String)
  49. #endif