It is impossible to formulate sane ABI based on
size of ulong because it can be 32-bit or 64-bit.
Basically it means that you cannot portably use
more that 32 option chars in one call anyway...
Make it explicit.
things like xasprintf() into xfuncs.c, remove xprint_file_by_name() (it only
had one user), clean up lots of #includes... General cleanup pass. What I've
been doing for the last couple days.
And it conflicts! I've removed httpd.c from this checkin due to somebody else
touching that file. It builds for me. I have to catch a bus. (Now you know
why I'm looking forward to Mercurial.)
- Switched to getopt argument parsing
- Added -f option to get fully qualified domain name
- Fixed the -s (short) and -d (domain) options, which were not
doing a gethostbyname lookup to get the FQDN before trying to
separate the local and domain portions of the hostname.
- Fixed probem with 'agressive setting' of the hostname...the
previous busybox version would try to set the hostname if called
with a non-option argument, or the -F option, even if another
option (like -i or -s) was given. This behavior does not match
the net-tools hostname, which does not attempt to set anything if
given a 'display' option, regardless of the presence/absence of
the -F option or additional command line arguments.
- When using a file to set the hostname, behavior now matches
net-tools version...previous busybox version did not handle
comments, and simply grabbed the first line from the file.
busybox.h which slowed compiles. I left only what was needed and then fixed up
all the apps to include their own header files. I also fixed naming for pwd.h
and grp.h functions. Tested to compile and run with libc5, glibc, and uClibc.
-Erik