gethostname inadvertently replaced on W32

2009-07-28 Thread Martin Lambers
Hello everybody, W32 has gethostname in ws2_32.dll. This is not detected by gethostname.m4, and gethostname is inadvertently replaced by a function that always returns an empty string. The following patch fixes this for me. It works on Debian and with a MinGW cross compiler. I tried to change get

Re: gethostname inadvertently replaced on W32

2009-07-28 Thread Martin Lambers
On Tue, Jul 28, 2009 at 10:08:34AM +0200, Martin Lambers wrote: > The following patch fixes this for me. Sorry, this is not true (I forgot to 'make clean' and did not see this earlier). The unistd.h header from gnulib defines gethostname to rpl_gethostname, but no such function is available, and t

Re: gnulib problem with mktime & ctime interaction

2009-07-28 Thread Jim Meyering
Bruno Haible wrote: ... > Thanks. Even more minimally: > > $ ./gnulib-tool --create-testdir --dir=/tmp/testdir mktime > $ cat > foo.cc < #include > #include > EOF > $ (cd /tmp/testdir && ac_cv_func_working_mktime=no ./configure && make) > $ gcc -I/tmp/testdir -I/tmp/testdir/gllib -c

Re: overly zealous git hook

2009-07-28 Thread Jim Meyering
Bruno Haible wrote: >> >> Since I prefer that the hook continue to apply to all files >> >> for which I have a say, perhaps you'd like to itemize the files >> >> for which you want to allow trailing blank lines? >> > >> > Yes. These should be: modules/**/* and **/ChangeLog*. I believe it >> >> My p

Re: gethostname inadvertently replaced on W32

2009-07-28 Thread Martin Lambers
Hello again, I just noticed that this problem was already found and fixed by Simon in March: http://www.mail-archive.com/bug-gnulib@gnu.org/msg13671.html There was some discussion about the right approach, but no decision was made. Bruno, Simon, would you please reconsider applying the patch? Wi

getloadavg.c fails to compile on QNX 6.4.1

2009-07-28 Thread mkraai
Howdy, getloadavg.c fails to build on QNX 6.4.1. /usr/include/nlist.h exists, so configure defines HAVE_NLIST_H. This makes getloadavg.c define NLIST_STRUCT. Since NLIST_STRUCT is defined, getloadavg.c assumes that n_name is a pointer, but /usr/include/nlist.h makes it a 12-character array.

Re: gnulib problem with mktime & ctime interaction

2009-07-28 Thread Bruno Haible
Jim Meyering wrote: > You're welcome to push it. Done. > I don't see any value in retaining the original declaration. The error that was reported occurred because GCC's does #undef mktime using ::mktime; and that fails to compile if the original declaration is not present. Bruno

Re: getloadavg.c fails to compile on QNX 6.4.1

2009-07-28 Thread Jim Meyering
mkr...@beckman.com wrote: > getloadavg.c fails to build on QNX 6.4.1. /usr/include/nlist.h exists, so > configure defines HAVE_NLIST_H. This makes getloadavg.c define > NLIST_STRUCT. Since NLIST_STRUCT is defined, getloadavg.c assumes that > n_name is a pointer, but /usr/include/nlist.h makes it

Re: gethostname inadvertently replaced on W32

2009-07-28 Thread Simon Josefsson
Martin Lambers writes: > Hello again, > > I just noticed that this problem was already found and fixed by Simon in > March: http://www.mail-archive.com/bug-gnulib@gnu.org/msg13671.html > > There was some discussion about the right approach, but no decision was > made. > > Bruno, Simon, would you

Re: gethostname inadvertently replaced on W32

2009-07-28 Thread Martin Lambers
On Tue, 28. Jul 2009, 23:18:09 +0200, Simon Josefsson wrote: > OTOH, I haven't tested whether my old patch still works. Martin, have > you? It applied cleanly (except for the ChangeLog entry) and I tested it on Debian lenny and with a MinGW cross compiler. This time I built from scratch, to avoid