Browse Source

libintl.h: add _(x) and N_(x) and use it everywhere

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>
Peter S. Mazinger 13 years ago
parent
commit
ef74720709

+ 9 - 0
include/libintl.h

@@ -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 */

+ 0 - 3
include/rpc/auth.h

@@ -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>
 

+ 0 - 5
include/rpc/rpc.h

@@ -38,11 +38,6 @@
 #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>
 

+ 0 - 5
include/rpc/types.h

@@ -33,11 +33,6 @@
 #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 */

+ 0 - 3
include/rpc/xdr.h

@@ -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>

+ 1 - 2
libc/inet/gai_strerror.c

@@ -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;

+ 1 - 0
libc/inet/rpc/auth_unix.c

@@ -42,6 +42,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <unistd.h>
+#include <libintl.h>
 #include <sys/param.h>
 
 #include <rpc/types.h>

+ 1 - 0
libc/inet/rpc/get_myaddress.c

@@ -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 */

+ 1 - 1
libc/inet/rpc/pm_getmaps.c

@@ -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>

+ 1 - 1
libc/inet/rpc/pmap_clnt.c

@@ -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>
 

+ 1 - 0
libc/inet/rpc/rpc_private.h

@@ -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;

+ 1 - 2
libc/inet/rpc/ruserpass.c

@@ -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);

+ 1 - 1
libc/inet/rpc/svc_run.c

@@ -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 */
 

+ 1 - 1
libc/inet/rpc/svc_tcp.c

@@ -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>

+ 1 - 1
libc/inet/rpc/svc_udp.c

@@ -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>
 

+ 1 - 1
libc/inet/rpc/svc_unix.c

@@ -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>

+ 1 - 0
libc/inet/rpc/xdr.c

@@ -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>

+ 1 - 0
libc/inet/rpc/xdr_array.c

@@ -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>

+ 1 - 1
libc/inet/rpc/xdr_rec.c

@@ -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>

+ 1 - 0
libc/inet/rpc/xdr_reference.c

@@ -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>