we have #define MAXHOSTNAMELEN 64, but #define NI_MAXHOST 1025
vapier at gentoo.org
Sun Sep 6 06:26:20 UTC 2009
On Saturday 05 September 2009 18:45:41 Denys Vlasenko wrote:
> include/rpc/types.h declares
> #ifndef MAXHOSTNAMELEN
> #define MAXHOSTNAMELEN 64
> while include/netdb.h declares
> # define NI_MAXHOST 1025
> (1) It probably would be better if we have internally consistent
> idea how big a hostname we allow.
> (2) NI_MAXHOST is too big. Do we really need to support
> hostnames which are about ten times longer than avevare
> screen line? We have a global data object in libc/inet/rpc/rexec.c
> declared as "char ahostbuf[NI_MAXHOST]". This eats 1kb of bss.
> I think we can set NI_MAXHOST to 128 with no danger
> of breaking things, or maybe even to 64.
i dont think these defines really mean the same thing. things to consider:
- rexec (rpc) code is taken from glibc
- the defines we have match glibc
- rpc code in the C library is a dead concept (use libtirpc)
- really shouldnt bother "improving" dead code
with these in mind, i think the code remain the same. if you concerned about
RPC bloat on your system, move over to libtirpc.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 836 bytes
Desc: This is a digitally signed message part.
More information about the uClibc