aboutsummaryrefslogtreecommitdiffstats
path: root/include/intl.h
blob: f120e472a756e59f53bccc8c0eec5b5035d15359 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#ifndef _INTL_H_
#define _INTL_H_

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

#ifndef HAVE_STPCPY
#include <string.h>

extern inline stpcpy(char *dest, const char *src) {
	char c;
	do {
		c = *dest++ = *src++;
	} while (c)
	return dest;
}
#endif

#if defined(ENABLE_NLS) && defined(HAVE_GETTEXT)
#  include <libintl.h>
#  define N_(x) (x)
#  define _(x) gettext(x)
#  ifndef HAVE_BINDTEXTDOMAIN_CODESET
#    define bind_textdomain_codeset(p, c)
#  endif
#else
#  define N_(x) (x)
#  define _(x) (x)
#  define textdomain(x)
#  define bind_textdomain_codeset(p, c)
#endif

/* Define this, if you have gettext */
#define HAVE_GETTEXT 1

#endif /* _INTL_H_ */