Re: declare sethostname if unistd.h doesn't

2011-11-29 Thread Bruno Haible
Hello Ben, > If it would help and people wouldn't mind, I'll post the current patch > series for review so that if I'm off track I can correct before > implementing the remaining bits (including the tests). Cool. Yes, please, show it! > On cygwin, the sethostname function is included in libgnu.a

Re: declare sethostname if unistd.h doesn't

2011-11-29 Thread Ben Walton
Excerpts from Simon Josefsson's message of Mon Nov 21 05:00:04 -0500 2011: > My point was that the POSIX prototype uses size_t and Solaris seems > to use int, and as Paul pointed out, on 64-bit Solaris systems just > providing the prototype will break -- there needs to be a wrapper > function or a

Re: declare sethostname if unistd.h doesn't

2011-11-21 Thread Simon Josefsson
Ben Walton writes: > Excerpts from Simon Josefsson's message of Sun Nov 20 14:04:42 -0500 2011: > > Hi Simon, > >> Have you tested that it resolves the portability issue? If so that is >> great. My man page says Solaris uses this prototype: >> >> int sethostname(char *name, int namelen);

Re: declare sethostname if unistd.h doesn't

2011-11-20 Thread Ben Walton
Excerpts from Bruno Haible's message of Sun Nov 20 09:12:55 -0500 2011: Hi Bruno, Thanks for the detailed rundown on this patch. It's nice to get such good feedback. > Yes, the declaration is missing in the Solaris 10 header files, but > also on other platforms that have the function: AIX and O

Re: declare sethostname if unistd.h doesn't

2011-11-20 Thread Ben Walton
Excerpts from Simon Josefsson's message of Sun Nov 20 14:04:42 -0500 2011: Hi Simon, > Have you tested that it resolves the portability issue? If so that is > great. My man page says Solaris uses this prototype: > > int sethostname(char *name, int namelen); I used a modified version of t

Re: declare sethostname if unistd.h doesn't

2011-11-20 Thread Paul Eggert
On 11/20/11 11:04, Simon Josefsson wrote: > however possibly int and size_t have the same size on all Solaris 8 and > 9 architectures? No, on 64-bit Solaris hosts, int is 32, size_t is 64; this has been true since full 64-bit support was added (Solaris 7 in the late 1990s, if I recall correctly).

Re: declare sethostname if unistd.h doesn't

2011-11-20 Thread Bruno Haible
Simon Josefsson wrote: > I support installing this if it does something useful on at > least some (Solaris) machine, since the current situation does not > appear to work on any (Solaris) machine. I'm in favour of doing it using the normal Gnulib style - one module per POSIX or glibc function. And

Re: declare sethostname if unistd.h doesn't

2011-11-20 Thread Simon Josefsson
Ben Walton writes: > Hi All, > > When testing the pending release of inetutils on solaris 9/10, I > discovered that sethostname isn't declared in unistd.h on Solaris. > The following patch adds handling for this although I'm not positive > that it's the best way to do it. At the very least it's

Re: declare sethostname if unistd.h doesn't

2011-11-20 Thread Bruno Haible
Hi Ben, > When testing the pending release of inetutils on solaris 9/10, I > discovered that sethostname isn't declared in unistd.h on Solaris. > The following patch adds handling for this although I'm not positive > that it's the best way to do it. At the very least it's a starting > point for d