[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
close vs socket vs getline
From: |
Simon Josefsson |
Subject: |
close vs socket vs getline |
Date: |
Thu, 19 Mar 2009 12:55:32 +0100 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.90 (gnu/linux) |
This may have been discussed before, but I don't recall a solution, so
maybe a new report will help.
Gsasl and gnutls uses the close, socket and getline modules from gnulib.
I get a problem when building gnulib's self-tests for mingw. You can
reproduce it by using:
rm -rf m
gnulib-tool --create-testdir --with-tests --dir m close getdelim socket
cd m
./configure --host=i586-mingw32msvc --build=i686-pc-linux-gnu
make check
The error is:
i586-mingw32msvc-gcc -g -O2 -o test-getdelim.exe test-getdelim.o
../gllib/libgnu.a
../gllib/libgnu.a(close.o): In function `_gl_close_fd_maybe_socket':
/home/jas/src/gnulib/m/gllib/close.c:39: undefined reference to address@hidden'
/home/jas/src/gnulib/m/gllib/close.c:46: undefined reference to address@hidden'
../gllib/libgnu.a(close.o): In function `set_winsock_errno':
/home/jas/src/gnulib/m/gllib/w32sock.h:34: undefined reference to
address@hidden'
/home/jas/src/gnulib/m/gllib/w32sock.h:35: undefined reference to
address@hidden'
What appears to be missing is that -lws2_32 is added to the linker line.
If I link the test-getdelim.exe program with -lws2_32 and re-run make
check, everything works fine.
Some ideas:
1) Should the sockets.m4 module unconditionally add LIBSOCKET to LDADD?
2) Should the gnulib-tool generated Makefile.am add LIBSOCKET to LDADD?
Is there any other options?
Thanks,
/Simon
- close vs socket vs getline,
Simon Josefsson <=