mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
[HAVE_LOCALE_H]: Include locale.h.
[! HAVE_LOCALE_H] (setlocale): Define as no-op. [ENABLE_NLS]: Include libintl.h. [ENABLE_NLS] (gettext): Define. [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions. (N_, PACKAGE, LOCALEDIR): New macros.
This commit is contained in:
21
src/system.h
21
src/system.h
@@ -23,3 +23,24 @@
|
||||
#include <strings.h>
|
||||
/* memory.h and strings.h conflict on some systems. */
|
||||
#endif /* not STDC_HEADERS and not HAVE_STRING_H */
|
||||
|
||||
#if HAVE_LOCALE_H
|
||||
# include <locale.h>
|
||||
#endif
|
||||
#if !HAVE_SETLOCALE
|
||||
# define setlocale(Category, Locale)
|
||||
#endif
|
||||
|
||||
#if ENABLE_NLS
|
||||
# include <libintl.h>
|
||||
# define _(Text) gettext (Text)
|
||||
#else
|
||||
# define bindtextdomain(Domain, Directory)
|
||||
# define textdomain(Domain)
|
||||
# define _(Text) Text
|
||||
#endif
|
||||
#define N_(Text) Text
|
||||
|
||||
/* In the meantime, waiting for Automake. */
|
||||
#define PACKAGE "bison"
|
||||
#define LOCALEDIR "/usr/local/share/locale"
|
||||
|
||||
Reference in New Issue
Block a user