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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
--- m4/package_utilies.m4
+++ m4/package_utilies.m4
@@ -100,6 +100,7 @@
xgettext=$XGETTEXT
AC_SUBST(xgettext)
AC_PACKAGE_NEED_UTILITY($1, "$xgettext", xgettext, gettext)
+ AC_DEFINE([ENABLE_GETTEXT], 1, [enable gettext])
fi
if test -z "$RPM"; then
--- include/gettext.h
+++ include/gettext.h
@@ -0,0 +1,10 @@
+#include <config.h>
+#ifdef ENABLE_GETTEXT
+# include <libintl.h>
+# define _(x) gettext(x)
+#else
+# define _(x) (x)
+# define textdomain(d) do { } while (0)
+# define bindtextdomain(d,dir) do { } while (0)
+#endif
+#include <locale.h>
--- attr/attr.c
+++ attr/attr.c
@@ -26,6 +26,7 @@
#include <errno.h>
#include <string.h>
#include <locale.h>
+#include "gettext.h"
#include <attr/attributes.h>
#include "config.h"
--- libattr/attr_copy_file.c.orig 2007-09-20 02:51:37.000000000 -0400
+++ libattr/attr_copy_file.c 2007-09-20 02:51:51.000000000 -0400
@@ -19,6 +19,7 @@
#if defined (HAVE_CONFIG_H)
#include "config.h"
+#include "gettext.h"
#endif
#include <sys/types.h>
--- libattr/attr_copy_fd.c.orig 2007-09-20 02:52:23.000000000 -0400
+++ libattr/attr_copy_fd.c 2007-09-20 02:52:31.000000000 -0400
@@ -19,6 +19,7 @@
#if defined (HAVE_CONFIG_H)
#include "config.h"
+#include "gettext.h"
#endif
#include <sys/types.h>
--- getfattr/getfattr.c.orig 2007-09-20 02:52:49.000000000 -0400
+++ getfattr/getfattr.c 2007-09-20 02:52:59.000000000 -0400
@@ -30,6 +30,7 @@
#include <regex.h>
#include <ftw.h>
#include <locale.h>
+#include "gettext.h"
#include <attr/xattr.h>
#include "config.h"
--- setfattr/setfattr.c.orig 2007-09-20 02:53:12.000000000 -0400
+++ setfattr/setfattr.c 2007-09-20 02:53:20.000000000 -0400
@@ -28,6 +28,7 @@
#include <getopt.h>
#include <locale.h>
#include <ctype.h>
+#include "gettext.h"
#include <attr/xattr.h>
#include "config.h"
|