This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[patch] rpcgen portability fix
- From: David Holland <dholland at eecs dot harvard dot edu>
- To: libc-alpha at sourceware dot org
- Date: Sat, 12 Jan 2008 00:53:57 -0500
- Subject: [patch] rpcgen portability fix
sizeof(char) is always 1. However, CHAR_BIT isn't necessarily 8.
FWIW...
diff -u -r1.28 rpc_main.c
--- rpc_main.c 20 Mar 2006 16:58:13 -0000 1.28
+++ rpc_main.c 12 Jan 2008 05:40:50 -0000
@@ -908,7 +908,7 @@
int i;
int j;
int c;
- char flag[(1 << 8 * sizeof(char))];
+ char flag[1 << CHAR_BIT];
int nflags;
cmdname = argv[0];
--
- David A. Holland / dholland@eecs.harvard.edu