we have #define MAXHOSTNAMELEN 64, but #define NI_MAXHOST 1025
vda.linux at googlemail.com
Sat Sep 5 22:45:41 UTC 2009
#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.
What do you think?
More information about the uClibc