Re: gethostname fix for mingw

2008-10-22 Thread Simon Josefsson
Ben Pfaff <[EMAIL PROTECTED]> writes: > Michel reported on pspp-dev that PSPP fails to compile on mingw > due to the following error: > >> In file included from >> C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/windows.h:98, >> from lseek.c:26: >> C:/MinGW/bin/../lib/gc

Re: [PATCH] random_r: new module

2008-10-22 Thread Simon Josefsson
Jim Meyering <[EMAIL PROTECTED]> writes: > I saw that there was no random-number generating module in gnulib, > and certainly nothing reentrant, so took glibc's random_r.c and did this: Actually there is gc-gnulib.c and gc-libgcrypt.c which both provides random numbers, although they are intended

Re: FD_ISSET replacement

2008-10-22 Thread Simon Josefsson
Bruno Haible <[EMAIL PROTECTED]> writes: > Simon Josefsson wrote: >> The sys_socket module generates this warning: >> >> ../lgl/sys/socket.h: In function 'rpl_fd_isset': >> ../lgl/sys/socket.h:158: warning: comparison between signed and unsigned >> ../lgl/sys/socket.h:159: warning: comparison bet

gethostname fix for mingw (was: Re: Problem with gethostbyname)

2008-10-22 Thread Ben Pfaff
Michel reported on pspp-dev that PSPP fails to compile on mingw due to the following error: > In file included from > C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/windows.h:98, > from lseek.c:26: > C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/winsock2.h:6

Re: FD_ISSET replacement

2008-10-22 Thread Bruno Haible
Simon Josefsson wrote: > The sys_socket module generates this warning: > > ../lgl/sys/socket.h: In function 'rpl_fd_isset': > ../lgl/sys/socket.h:158: warning: comparison between signed and unsigned > ../lgl/sys/socket.h:159: warning: comparison between signed and unsigned > > I pushed the patch

Re: mingw: pwd.h and grp.h functions, uid_t, getuid, chown, fork, etc

2008-10-22 Thread Bruno Haible
Hi Simon, > Generally, I think it would be nice to identify all modules that doesn't > work under mingw yet. Last time I checked, I needed --avoid=savewd --avoid=mkancesdirs --avoid=mkdir-p --avoid=getugroups --avoid=idcache --avoid=userspec in order to get a successful build on mingw. Your au

Re: Error trying to compile pspp using up-to-date gnulib

2008-10-22 Thread John Darrington
The pspp build system includes the line gnulib-tool ... --import ... unilbrk/ulc-width-linebreaks ... My guess is that mingw is trying and failing to quote the unilbrk/ulc-width-linebreaks string. J' On Wed, Oct 22, 2008 at 11:02:04AM -0300, Michel Boaventura wrote: Hi Simon, I

Re: [PATCH] random_r: new module

2008-10-22 Thread Bruno Haible
Jim Meyering wrote: > I saw that there was no random-number generating module in gnulib, > and certainly nothing reentrant, so took glibc's random_r.c and did this: Very nice! > diff --git a/doc/glibc-functions/random_r.texi > b/doc/glibc-functions/random_r.texi > index 50081b6..96f9384 100644 >

[PATCH] random_r: new module

2008-10-22 Thread Jim Meyering
I saw that there was no random-number generating module in gnulib, and certainly nothing reentrant, so took glibc's random_r.c and did this: >From bd84b1cb02226a86e36dce4456cd02125d542cb5 Mon Sep 17 00:00:00 2001 From: Jim Meyering <[EMAIL PROTECTED]> Date: Wed, 22 Oct 2008 11:19:27 +0200 Subject:

selinux-h: two enhancements

2008-10-22 Thread David Lutterkort
These two patches change the new selinux-h module by (1) setting LIB_SELINUX so that it can easily be linked against (based very closely on what coreutils does) and (2) add _UNUSED_PARAMETER_ annotation to all the functions in the stub implementations to avoid spurious compiler wanrings David

[PATCH] selinux-h: mark parameters of stub functions as intentionally unused

2008-10-22 Thread David Lutterkort
From: Jim Meyering <[EMAIL PROTECTED]> * lib/se-selinux.in.h: Mark parameters as _UNUSED_PARAMETER_. * lib/se-context.in.h: Likewise. --- lib/se-context.in.h | 18 +++--- lib/se-selinux.in.h | 50 ++ 2 files changed, 41 insertions(+)

[PATCH] selinux-h: search for LIB_SELINUX and mark it as a link requirement

2008-10-22 Thread David Lutterkort
--- m4/selinux-selinux-h.m4 |8 modules/selinux-h |3 +++ 2 files changed, 11 insertions(+), 0 deletions(-) diff --git a/m4/selinux-selinux-h.m4 b/m4/selinux-selinux-h.m4 index 822ffa2..464b782 100644 --- a/m4/selinux-selinux-h.m4 +++ b/m4/selinux-selinux-h.m4 @@ -14,4 +14,

signbit.m4 spurious failure

2008-10-22 Thread Eric Blake
I noticed that on cygwin, signbit switched from detected to undetected, and traced it to the following: configure:42677: checking for signbit macro configure:42768: ccache gcc -std=gnu99 -o conftest.exe -gdwarf-2 -Wall -Wl,--a s-needed conftest.c >&5 conftest.c:352: error: initializer element

FD_ISSET replacement

2008-10-22 Thread Simon Josefsson
The sys_socket module generates this warning: ../lgl/sys/socket.h: In function 'rpl_fd_isset': ../lgl/sys/socket.h:158: warning: comparison between signed and unsigned ../lgl/sys/socket.h:159: warning: comparison between signed and unsigned I pushed the patch below. However, is the code really a

Re: getgroups: test: =: unary operator expected

2008-10-22 Thread Simon Josefsson
Jim Meyering <[EMAIL PROTECTED]> writes: > Simon Josefsson <[EMAIL PROTECTED]> wrote: >> Jim, the getgroups m4 check causes errors on mingw: >> >> ./configure: line 8004: test: =: unary operator expected >> >> The problem is this code: >> >> AC_REQUIRE([AC_FUNC_GETGROUPS]) >> if test $ac_cv_fu

Re: getgroups: test: =: unary operator expected

2008-10-22 Thread Jim Meyering
Simon Josefsson <[EMAIL PROTECTED]> wrote: > Jim, the getgroups m4 check causes errors on mingw: > > ./configure: line 8004: test: =: unary operator expected > > The problem is this code: > > AC_REQUIRE([AC_FUNC_GETGROUPS]) > if test $ac_cv_func_getgroups_works = no; then > > The AC_FUNC_GETGRO

Re: Error trying to compile pspp using up-to-date gnulib

2008-10-22 Thread Michel Boaventura
Hi Simon, I've tried a grep "./\"unilbrk" but it doesn't find anything. I guess this may be a complicated problem, so I ask one of the pspp-dev team to make me a snapshot of pspp, because I only got this error trying to make pspp with the git version of both pspp and gnulib. Thanks for the help,

Re: Error trying to compile pspp using up-to-date gnulib

2008-10-22 Thread Simon Josefsson
"Michel Boaventura" <[EMAIL PROTECTED]> writes: > Hi Guys, > > When I tried to compile pspp using both pspp and gnulib git versions I > got this using mingw and windows: > > Creating directory ./"unilbrk > mkdir: cannot create directory `./"unilbrk': No such file or directory > /home/Michel/gnulib

mingw: pwd.h and grp.h functions, uid_t, getuid, chown, fork, etc

2008-10-22 Thread Simon Josefsson
Looking at the recent gnulib build failures on mingw, there is a pattern of remaining issues to work on. For reference see: http://autobuild.josefsson.org/gnulib/log-200810220353954696000.txt Two main problems appears to be: 1) pwd.h user handling functions including chown Is there any chance

Re: declare gethostname in unistd.h

2008-10-22 Thread Simon Josefsson
Bruno, the patch causes build failures on mingw: ./unistd.h:313: error: conflicting types for 'gethostname' /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/include/winsock2.h:635: error: previous declaration of 'gethostname' was here The problem is that the native gethostna

getgroups: test: =: unary operator expected

2008-10-22 Thread Simon Josefsson
Jim, the getgroups m4 check causes errors on mingw: ./configure: line 8004: test: =: unary operator expected The problem is this code: AC_REQUIRE([AC_FUNC_GETGROUPS]) if test $ac_cv_func_getgroups_works = no; then The AC_FUNC_GETGROUPS function doesn't set ac_cv_func_getgroups_works if ther

compiler warning: thread on mingw

2008-10-22 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 ../../tests/glthread/thread.c: In function `gl_thread_exit_func': ../../tests/glthread/thread.c:213: warning: control reaches end of non-void function I'm committing this: - -- Don't work too hard, make some time for fun as well! Eric Blake

canon-host on cygwin

2008-10-22 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 For a couple days now, canon-host.c is failing to build on cygwin 1.5.x, which provides but lacks struct addrinfo (cygwin didn't add struct addrinfo/getaddrinfo until 1.7.0). canon-host.c: In function `canon_host_r': canon-host.c:64: error: storage s

Why is configmake.h not (git-)ignored?

2008-10-22 Thread Reuben Thomas
I just noticed that in a project of mine that uses gnulib, configmake.h is in the git repo. Since this contains details of how I've configured my build, that doesn't seem right, but equally, configmake.h is not listed in the auto-generated .gitignore, which is why I've added it to the repo. Is