asintl.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /* asintl.h - gas-specific header for gettext code.
  2. Copyright (C) 1998-2015 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. #ifdef HAVE_LOCALE_H
  18. # ifndef ENABLE_NLS
  19. /* The Solaris version of locale.h always includes libintl.h. If we have
  20. been configured with --disable-nls then ENABLE_NLS will not be defined
  21. and the dummy definitions of bindtextdomain (et al) below will conflict
  22. with the defintions in libintl.h. So we define these values to prevent
  23. the bogus inclusion of libintl.h. */
  24. # define _LIBINTL_H
  25. # define _LIBGETTEXT_H
  26. # endif
  27. # include <locale.h>
  28. #endif
  29. #ifdef ENABLE_NLS
  30. # include <libintl.h>
  31. # define _(String) gettext (String)
  32. # ifdef gettext_noop
  33. # define N_(String) gettext_noop (String)
  34. # else
  35. # define N_(String) (String)
  36. # endif
  37. #else
  38. # define gettext(Msgid) (Msgid)
  39. # define dgettext(Domainname, Msgid) (Msgid)
  40. # define dcgettext(Domainname, Msgid, Category) (Msgid)
  41. # define textdomain(Domainname) while (0) /* nothing */
  42. # define bindtextdomain(Domainname, Dirname) while (0) /* nothing */
  43. # define _(String) (String)
  44. # define N_(String) (String)
  45. #endif