OSDN Git Service

libintl.h: add _(x) and N_(x) and use it everywhere
authorPeter S. Mazinger <ps.m@gmx.net>
Sat, 12 Mar 2011 21:52:58 +0000 (22:52 +0100)
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Fri, 15 Jun 2012 12:00:22 +0000 (14:00 +0200)
remove _LIBC part from rpc headers
include libintl.h to rpc_private.h and use that instead of rpc.h
include libintl.h anywhere else needed replacing _(x) and N_(x)

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
20 files changed:
include/libintl.h
include/rpc/auth.h
include/rpc/rpc.h
include/rpc/types.h
include/rpc/xdr.h
libc/inet/gai_strerror.c
libc/inet/rpc/auth_unix.c
libc/inet/rpc/get_myaddress.c
libc/inet/rpc/pm_getmaps.c
libc/inet/rpc/pmap_clnt.c
libc/inet/rpc/rpc_private.h
libc/inet/rpc/ruserpass.c
libc/inet/rpc/svc_run.c
libc/inet/rpc/svc_tcp.c
libc/inet/rpc/svc_udp.c
libc/inet/rpc/svc_unix.c
libc/inet/rpc/xdr.c
libc/inet/rpc/xdr_array.c
libc/inet/rpc/xdr_rec.c
libc/inet/rpc/xdr_reference.c

index be3969f..6631d0b 100644 (file)
@@ -23,6 +23,8 @@
 
 #include <features.h>
 
+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
+
 /* We define an additional symbol to signal that we use the GNU
    implementation of gettext.  */
 #define __USE_GNU_GETTEXT 1
@@ -125,4 +127,11 @@ extern char *bind_textdomain_codeset (__const char *__domainname,
 
 __END_DECLS
 
+#endif /* __UCLIBC_HAS_GETTEXT_AWARENESS__ */
+
+#ifdef _LIBC
+# define _(x) x
+# define N_(x) x
+#endif
+
 #endif /* libintl.h */
index 9a7a7d3..1d5198c 100644 (file)
@@ -41,9 +41,6 @@
 #ifndef _RPC_AUTH_H
 
 #define _RPC_AUTH_H    1
-#ifdef _LIBC
-#define _(X)   X
-#endif
 #include <features.h>
 #include <rpc/xdr.h>
 
index cd5d8a8..df05428 100644 (file)
 #ifndef _RPC_RPC_H
 #define _RPC_RPC_H 1
 
-#ifdef _LIBC
-#define _(X)   X
-#include <features.h>
-#endif
-
 #include <rpc/types.h>         /* some typedefs */
 #include <netinet/in.h>
 
index e166ddf..8eff8e7 100644 (file)
 #ifndef _RPC_TYPES_H
 #define _RPC_TYPES_H 1
 
-#ifdef _LIBC
-#define _(X)   X
-#endif
-#include <features.h>
-
 typedef int bool_t;
 typedef int enum_t;
 /* This needs to be changed to uint32_t in the future */
index 24cc8f8..2fbe3e7 100644 (file)
@@ -36,9 +36,6 @@
 #ifndef _RPC_XDR_H
 #define _RPC_XDR_H 1
 
-#ifdef _LIBC
-# define _(X)  X
-#endif
 #include <features.h>
 #include <sys/types.h>
 #include <rpc/types.h>
index cfcb507..ab6bf98 100644 (file)
@@ -19,9 +19,8 @@
 
 #include <stdio.h>
 #include <netdb.h>
+#include <libintl.h>
 
-#define N_(x) x
-#define _(x) x
 static const struct
   {
     int code;
index 62d97dc..95d08f0 100644 (file)
@@ -42,6 +42,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <unistd.h>
+#include <libintl.h>
 #include <sys/param.h>
 
 #include <rpc/types.h>
index ab4ac33..04999a1 100644 (file)
@@ -44,6 +44,7 @@ static char sccsid[] = "@(#)get_myaddress.c 1.4 87/08/11 Copyr 1984 Sun Micro";
 #include <sys/socket.h>
 #include <stdio.h>
 #include <unistd.h>
+#include <libintl.h>
 #include <net/if.h>
 #include <sys/ioctl.h>
 /* Order of following two #includes reversed by roland@gnu */
index e7b97e6..1c313c2 100644 (file)
@@ -39,7 +39,7 @@ static char sccsid[] = "@(#)pmap_getmaps.c 1.10 87/08/11 Copyr 1984 Sun Micro";
  * Copyright (C) 1984, Sun Microsystems, Inc.
  */
 
-#include <rpc/rpc.h>
+#include "rpc_private.h"
 #include <rpc/pmap_prot.h>
 #include <rpc/pmap_clnt.h>
 #include <netdb.h>
index 868326e..20a5431 100644 (file)
@@ -41,7 +41,7 @@
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
-#include <rpc/rpc.h>
+#include "rpc_private.h"
 #include <rpc/pmap_prot.h>
 #include <rpc/pmap_clnt.h>
 
index adb8138..9e01df4 100644 (file)
@@ -1,6 +1,7 @@
 #ifndef _RPC_PRIVATE_H
 #define _RPC_PRIVATE_H
 #include <rpc/rpc.h>
+#include <libintl.h>
 
 /* Now define the internal interfaces.  */
 extern u_long _create_xid (void) attribute_hidden;
index dd83021..d2b5eeb 100644 (file)
@@ -39,9 +39,8 @@
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
+#include <libintl.h>
 
-
-#define _(X)  (X)
 /* #include "ftp_var.h" */
 
 static int token (void);
index a685df3..f3e0209 100644 (file)
@@ -34,7 +34,7 @@
 #include <errno.h>
 #include <unistd.h>
 #include <sys/poll.h>
-#include <rpc/rpc.h>
+#include "rpc_private.h"
 
 /* used by svc_[max_]pollfd */
 
index 9810594..e44becf 100644 (file)
@@ -44,7 +44,7 @@ static char sccsid[] = "@(#)svc_tcp.c 1.21 87/08/11 Copyr 1984 Sun Micro";
 #include <stdio.h>
 #include <unistd.h>
 #include <string.h>
-#include <rpc/rpc.h>
+#include "rpc_private.h"
 #include <sys/socket.h>
 #include <sys/poll.h>
 #include <errno.h>
index 0d3840e..9a185d2 100644 (file)
@@ -42,7 +42,7 @@ static char sccsid[] = "@(#)svc_udp.c 1.24 87/08/11 Copyr 1984 Sun Micro";
 #include <stdio.h>
 #include <unistd.h>
 #include <string.h>
-#include <rpc/rpc.h>
+#include "rpc_private.h"
 #include <sys/socket.h>
 #include <errno.h>
 
index 1a7874c..715f6e4 100644 (file)
@@ -40,7 +40,7 @@
 #include <stdio.h>
 #include <unistd.h>
 #include <string.h>
-#include <rpc/rpc.h>
+#include "rpc_private.h"
 #include <rpc/svc.h>
 #include <sys/socket.h>
 #include <sys/uio.h>
index de10c45..d07607c 100644 (file)
@@ -44,6 +44,7 @@ static char sccsid[] = "@(#)xdr.c 1.35 87/08/12";
 #include <stdio.h>
 #include <limits.h>
 #include <string.h>
+#include <libintl.h>
 
 #include <rpc/types.h>
 #include <rpc/xdr.h>
index cd90050..a058f93 100644 (file)
@@ -45,6 +45,7 @@ static char sccsid[] = "@(#)xdr_array.c 1.10 87/08/11 Copyr 1984 Sun Micro";
 #include <rpc/types.h>
 #include <rpc/xdr.h>
 #include <limits.h>
+#include <libintl.h>
 
 #ifdef USE_IN_LIBIO
 # include <wchar.h>
index a5f49c6..f02f50e 100644 (file)
@@ -47,7 +47,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <unistd.h>
-#include <rpc/rpc.h>
+#include "rpc_private.h"
 
 #ifdef USE_IN_LIBIO
 # include <wchar.h>
index 6061e93..a7a494a 100644 (file)
@@ -44,6 +44,7 @@ static char sccsid[] = "@(#)xdr_reference.c 1.11 87/08/11 SMI";
 #include <string.h>
 #include <rpc/types.h>
 #include <rpc/xdr.h>
+#include <libintl.h>
 
 #ifdef USE_IN_LIBIO
 # include <wchar.h>