Hello,
I'm trying to reduce the number of patches required to build wine on a musl libc[1] based system.
The first two patches merely fix warnings because of use of deprecated headers. So they are not strictly necessary. The patches should also update configure but why is configure at all in the git repo?
To compile wine without patches two other issues remain:
Various tools used during the build expect getopt_long_only() to have GNU semantics. They don't expect that musl's getopt_long_only() stops after the first non-option argument. The cleanest fix seems to be to add a configure check testing whether getopt_long_only() behaves correctly instead of just testing for its existence.
Then there are problems with compiling dlls/ws2_32/socket.c related to IPX but I haven't investigated their cause yet.
[1]: http://musl-libc.org
Felix Janda (4): Use <poll.h> instead of <sys/poll.h> Remove unecessary <sys/signal> includes Add missing includes of <poll.h> (POLLIN,...) dnsapi: Replace NETDB_INTERNAL by -1
configure.ac | 2 -- dlls/dinput/joystick_linux.c | 4 ++-- dlls/dinput/joystick_linuxinput.c | 4 ++-- dlls/dnsapi/query.c | 2 +- dlls/iphlpapi/icmp.c | 4 ++-- dlls/kernel32/console.c | 4 ++-- dlls/ntdll/file.c | 5 +---- dlls/ntdll/serial.c | 4 ++-- dlls/ntdll/signal_arm.c | 3 --- dlls/ntdll/signal_arm64.c | 3 --- dlls/ntdll/signal_i386.c | 3 --- dlls/ntdll/signal_powerpc.c | 4 ---- dlls/ntdll/signal_x86_64.c | 3 --- dlls/ntdll/sync.c | 5 +---- dlls/rpcrt4/rpc_transport.c | 4 ++-- dlls/wineoss.drv/midi.c | 5 +---- dlls/winex11.drv/event.c | 5 +---- dlls/wininet/internet.c | 5 +---- dlls/wininet/netconnection.c | 5 +---- dlls/winmm/time.c | 5 +---- dlls/ws2_32/socket.c | 5 +---- include/config.h.in | 6 ------ programs/winedbg/gdbproxy.c | 4 ++-- server/change.c | 3 +++ server/fd.c | 5 +---- server/file.c | 2 +- server/named_pipe.c | 2 +- server/object.h | 4 ++-- server/process.c | 2 +- server/queue.c | 3 +++ server/request.c | 2 +- server/serial.c | 2 +- server/signal.c | 5 +---- server/sock.c | 3 +++ server/thread.c | 2 +- 35 files changed, 42 insertions(+), 87 deletions(-)
This patch changes includes of <sys/poll.h> to <poll.h>, removes the configure test for <sys/poll.h> and makes the whitespace of the includes consistent.
<poll.h> is the header specified by POSIX, whereas <sys/poll.h> is only needed for acient glibc(<2.3). --- configure.ac | 1 - dlls/dinput/joystick_linux.c | 4 ++-- dlls/dinput/joystick_linuxinput.c | 4 ++-- dlls/iphlpapi/icmp.c | 4 ++-- dlls/kernel32/console.c | 4 ++-- dlls/ntdll/file.c | 5 +---- dlls/ntdll/serial.c | 4 ++-- dlls/ntdll/sync.c | 5 +---- dlls/rpcrt4/rpc_transport.c | 4 ++-- dlls/wineoss.drv/midi.c | 5 +---- dlls/winex11.drv/event.c | 5 +---- dlls/wininet/internet.c | 5 +---- dlls/wininet/netconnection.c | 5 +---- dlls/winmm/time.c | 5 +---- dlls/ws2_32/socket.c | 5 +---- include/config.h.in | 3 --- programs/winedbg/gdbproxy.c | 4 ++-- server/fd.c | 5 +---- server/file.c | 2 +- server/named_pipe.c | 2 +- server/object.h | 4 ++-- server/process.c | 2 +- server/request.c | 2 +- server/serial.c | 2 +- server/signal.c | 5 +---- server/thread.c | 2 +- 26 files changed, 32 insertions(+), 66 deletions(-)
diff --git a/configure.ac b/configure.ac index de5aa41..8089957 100644 --- a/configure.ac +++ b/configure.ac @@ -478,7 +478,6 @@ AC_CHECK_HEADERS(\ sys/msg.h \ sys/mtio.h \ sys/param.h \ - sys/poll.h \ sys/prctl.h \ sys/protosw.h \ sys/ptrace.h \ diff --git a/dlls/dinput/joystick_linux.c b/dlls/dinput/joystick_linux.c index ce04986..176d66b 100644 --- a/dlls/dinput/joystick_linux.c +++ b/dlls/dinput/joystick_linux.c @@ -50,8 +50,8 @@ # include <linux/joystick.h> # undef SW_MAX #endif -#ifdef HAVE_SYS_POLL_H -# include <sys/poll.h> +#ifdef HAVE_POLL_H +# include <poll.h> #endif
#include "wine/debug.h" diff --git a/dlls/dinput/joystick_linuxinput.c b/dlls/dinput/joystick_linuxinput.c index 76adabc..f9e1379 100644 --- a/dlls/dinput/joystick_linuxinput.c +++ b/dlls/dinput/joystick_linuxinput.c @@ -46,8 +46,8 @@ # define HAS_PROPER_HEADER # endif #endif -#ifdef HAVE_SYS_POLL_H -# include <sys/poll.h> +#ifdef HAVE_POLL_H +# include <poll.h> #endif
#include "wine/debug.h" diff --git a/dlls/iphlpapi/icmp.c b/dlls/iphlpapi/icmp.c index abd8ddc..0c897b6 100644 --- a/dlls/iphlpapi/icmp.c +++ b/dlls/iphlpapi/icmp.c @@ -59,8 +59,8 @@ #ifdef HAVE_ARPA_INET_H # include <arpa/inet.h> #endif -#ifdef HAVE_SYS_POLL_H -# include <sys/poll.h> +#ifdef HAVE_POLL_H +# include <poll.h> #endif
#define USE_WS_PREFIX diff --git a/dlls/kernel32/console.c b/dlls/kernel32/console.c index 303b638..4dac727 100644 --- a/dlls/kernel32/console.c +++ b/dlls/kernel32/console.c @@ -42,8 +42,8 @@ #ifdef HAVE_TERMIOS_H # include <termios.h> #endif -#ifdef HAVE_SYS_POLL_H -# include <sys/poll.h> +#ifdef HAVE_POLL_H +# include <poll.h> #endif
#define NONAMELESSUNION diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c index d2efcc1..0ebdce8 100644 --- a/dlls/ntdll/file.c +++ b/dlls/ntdll/file.c @@ -49,10 +49,7 @@ # include <sys/filio.h> #endif #ifdef HAVE_POLL_H -#include <poll.h> -#endif -#ifdef HAVE_SYS_POLL_H -#include <sys/poll.h> +# include <poll.h> #endif #ifdef HAVE_SYS_SOCKET_H #include <sys/socket.h> diff --git a/dlls/ntdll/serial.c b/dlls/ntdll/serial.c index b03ac61..2d00c24 100644 --- a/dlls/ntdll/serial.c +++ b/dlls/ntdll/serial.c @@ -47,8 +47,8 @@ #ifdef HAVE_SYS_IOCTL_H #include <sys/ioctl.h> #endif -#ifdef HAVE_SYS_POLL_H -# include <sys/poll.h> +#ifdef HAVE_POLL_H +# include <poll.h> #endif #ifdef HAVE_SYS_MODEM_H # include <sys/modem.h> diff --git a/dlls/ntdll/sync.c b/dlls/ntdll/sync.c index 7c9d5e8..78d02d2 100644 --- a/dlls/ntdll/sync.c +++ b/dlls/ntdll/sync.c @@ -31,10 +31,7 @@ # include <sys/time.h> #endif #ifdef HAVE_POLL_H -#include <poll.h> -#endif -#ifdef HAVE_SYS_POLL_H -# include <sys/poll.h> +# include <poll.h> #endif #ifdef HAVE_UNISTD_H # include <unistd.h> diff --git a/dlls/rpcrt4/rpc_transport.c b/dlls/rpcrt4/rpc_transport.c index c073a95..cdf5f9f 100644 --- a/dlls/rpcrt4/rpc_transport.c +++ b/dlls/rpcrt4/rpc_transport.c @@ -63,8 +63,8 @@ # ifdef HAVE_NETDB_H # include <netdb.h> # endif -# ifdef HAVE_SYS_POLL_H -# include <sys/poll.h> +# ifdef HAVE_POLL_H +# include <poll.h> # endif # ifdef HAVE_SYS_FILIO_H # include <sys/filio.h> diff --git a/dlls/wineoss.drv/midi.c b/dlls/wineoss.drv/midi.c index c359fe0..e014b01 100644 --- a/dlls/wineoss.drv/midi.c +++ b/dlls/wineoss.drv/midi.c @@ -55,10 +55,7 @@ # include <sys/ioctl.h> #endif #ifdef HAVE_POLL_H -#include <poll.h> -#endif -#ifdef HAVE_SYS_POLL_H -#include <sys/poll.h> +# include <poll.h> #endif #include <sys/soundcard.h>
diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c index ea24471..0e64f06 100644 --- a/dlls/winex11.drv/event.c +++ b/dlls/winex11.drv/event.c @@ -22,10 +22,7 @@ #include "config.h"
#ifdef HAVE_POLL_H -#include <poll.h> -#endif -#ifdef HAVE_SYS_POLL_H -#include <sys/poll.h> +# include <poll.h> #endif #include <X11/Xatom.h> #include <X11/keysym.h> diff --git a/dlls/wininet/internet.c b/dlls/wininet/internet.c index 4389c98..8743df8 100644 --- a/dlls/wininet/internet.c +++ b/dlls/wininet/internet.c @@ -41,10 +41,7 @@ # include <sys/socket.h> #endif #ifdef HAVE_POLL_H -#include <poll.h> -#endif -#ifdef HAVE_SYS_POLL_H -# include <sys/poll.h> +# include <poll.h> #endif #ifdef HAVE_SYS_TIME_H # include <sys/time.h> diff --git a/dlls/wininet/netconnection.c b/dlls/wininet/netconnection.c index 074229e..3d75eb7 100644 --- a/dlls/wininet/netconnection.c +++ b/dlls/wininet/netconnection.c @@ -32,10 +32,7 @@
#include <sys/types.h> #ifdef HAVE_POLL_H -#include <poll.h> -#endif -#ifdef HAVE_SYS_POLL_H -# include <sys/poll.h> +# include <poll.h> #endif #ifdef HAVE_SYS_TIME_H # include <sys/time.h> diff --git a/dlls/winmm/time.c b/dlls/winmm/time.c index e055f6b..42a2a2a 100644 --- a/dlls/winmm/time.c +++ b/dlls/winmm/time.c @@ -33,10 +33,7 @@ # include <unistd.h> #endif #ifdef HAVE_POLL_H -#include <poll.h> -#endif -#ifdef HAVE_SYS_POLL_H -#include <sys/poll.h> +# include <poll.h> #endif
#include "windef.h" diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index e31f396..777028b 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -121,10 +121,7 @@ #endif
#ifdef HAVE_POLL_H -#include <poll.h> -#endif -#ifdef HAVE_SYS_POLL_H -# include <sys/poll.h> +# include <poll.h> #endif #ifdef HAVE_SYS_TIME_H # include <sys/time.h> diff --git a/include/config.h.in b/include/config.h.in index 79f8b45..841c4f5 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -966,9 +966,6 @@ /* Define to 1 if you have the <sys/param.h> header file. */ #undef HAVE_SYS_PARAM_H
-/* Define to 1 if you have the <sys/poll.h> header file. */ -#undef HAVE_SYS_POLL_H - /* Define to 1 if you have the <sys/prctl.h> header file. */ #undef HAVE_SYS_PRCTL_H
diff --git a/programs/winedbg/gdbproxy.c b/programs/winedbg/gdbproxy.c index 0865f44..0c8cb7a 100644 --- a/programs/winedbg/gdbproxy.c +++ b/programs/winedbg/gdbproxy.c @@ -34,8 +34,8 @@ #include <stdarg.h> #include <stdio.h> #include <stdlib.h> -#ifdef HAVE_SYS_POLL_H -# include <sys/poll.h> +#ifdef HAVE_POLL_H +# include <poll.h> #endif #ifdef HAVE_SYS_WAIT_H # include <sys/wait.h> diff --git a/server/fd.c b/server/fd.c index 7043d04..049fd0d 100644 --- a/server/fd.c +++ b/server/fd.c @@ -32,10 +32,7 @@ #include <string.h> #include <stdlib.h> #ifdef HAVE_POLL_H -#include <poll.h> -#endif -#ifdef HAVE_SYS_POLL_H -#include <sys/poll.h> +# include <poll.h> #endif #ifdef HAVE_LINUX_MAJOR_H #include <linux/major.h> diff --git a/server/file.c b/server/file.c index cceb8ad..3fc3194 100644 --- a/server/file.c +++ b/server/file.c @@ -37,7 +37,7 @@ #include <utime.h> #endif #ifdef HAVE_POLL_H -#include <poll.h> +# include <poll.h> #endif
#include "ntstatus.h" diff --git a/server/named_pipe.c b/server/named_pipe.c index 4c85104..a41ebac 100644 --- a/server/named_pipe.c +++ b/server/named_pipe.c @@ -39,7 +39,7 @@ #include <time.h> #include <unistd.h> #ifdef HAVE_POLL_H -#include <poll.h> +# include <poll.h> #endif
#include "ntstatus.h" diff --git a/server/object.h b/server/object.h index bb3ff21..b1632e7 100644 --- a/server/object.h +++ b/server/object.h @@ -21,8 +21,8 @@ #ifndef __WINE_SERVER_OBJECT_H #define __WINE_SERVER_OBJECT_H
-#ifdef HAVE_SYS_POLL_H -#include <sys/poll.h> +#ifdef HAVE_POLL_H +# include <poll.h> #endif
#include <sys/time.h> diff --git a/server/process.c b/server/process.c index 7b9a3b2..62fce57 100644 --- a/server/process.c +++ b/server/process.c @@ -34,7 +34,7 @@ #endif #include <unistd.h> #ifdef HAVE_POLL_H -#include <poll.h> +# include <poll.h> #endif
#include "ntstatus.h" diff --git a/server/request.c b/server/request.c index f78026a..e631e71 100644 --- a/server/request.c +++ b/server/request.c @@ -49,7 +49,7 @@ #endif #include <unistd.h> #ifdef HAVE_POLL_H -#include <poll.h> +# include <poll.h> #endif #ifdef __APPLE__ # include <mach/mach_time.h> diff --git a/server/serial.c b/server/serial.c index 880f5e3..15460e7 100644 --- a/server/serial.c +++ b/server/serial.c @@ -43,7 +43,7 @@ #include <sys/ioctl.h> #endif #ifdef HAVE_POLL_H -#include <poll.h> +# include <poll.h> #endif
#include "ntstatus.h" diff --git a/server/signal.c b/server/signal.c index 5e4fe33..21acea4 100644 --- a/server/signal.c +++ b/server/signal.c @@ -24,10 +24,7 @@ #include <stdio.h> #include <sys/time.h> #ifdef HAVE_POLL_H -#include <poll.h> -#endif -#ifdef HAVE_SYS_POLL_H -#include <sys/poll.h> +# include <poll.h> #endif #ifdef HAVE_SYS_RESOURCE_H #include <sys/resource.h> diff --git a/server/thread.c b/server/thread.c index b310e93..75090ef 100644 --- a/server/thread.c +++ b/server/thread.c @@ -33,7 +33,7 @@ #include <unistd.h> #include <time.h> #ifdef HAVE_POLL_H -#include <poll.h> +# include <poll.h> #endif #ifdef HAVE_SCHED_H #include <sched.h>
Hi Felix,
On Sun, Jun 1, 2014 at 1:16 AM, Felix Janda felix.janda@posteo.de wrote:
This patch changes includes of <sys/poll.h> to <poll.h>, removes the configure test for <sys/poll.h> and makes the whitespace of the includes consistent.
Patches should be sent to wine-patches@winehq.org, not wine-devel@. See http://wiki.winehq.org/SubmittingPatches. Also, the maintainer is on vacation, so don't expect a quick response.
Best, --Juan
Juan Lang wrote:
Hi Felix,
On Sun, Jun 1, 2014 at 1:16 AM, Felix Janda felix.janda@posteo.de wrote:
This patch changes includes of <sys/poll.h> to <poll.h>, removes the configure test for <sys/poll.h> and makes the whitespace of the includes consistent.
Patches should be sent to wine-patches@winehq.org, not wine-devel@. See http://wiki.winehq.org/SubmittingPatches. Also, the maintainer is on vacation, so don't expect a quick response.
Thanks for your reply. I was unsure where to send the mails because of the discussion in the cover letter (see [PATCH 0/4]). Should I resend the patches?
Thanks, Felix
On Mon, Jun 2, 2014 at 3:01 PM, Felix Janda felix.janda@posteo.de wrote:
Juan Lang wrote:
Hi Felix,
On Sun, Jun 1, 2014 at 1:16 AM, Felix Janda felix.janda@posteo.de
wrote:
This patch changes includes of <sys/poll.h> to <poll.h>, removes the configure test for <sys/poll.h> and makes the whitespace of the includes consistent.
Patches should be sent to wine-patches@winehq.org, not wine-devel@. See http://wiki.winehq.org/SubmittingPatches. Also, the maintainer is on vacation, so don't expect a quick response.
Thanks for your reply. I was unsure where to send the mails because of the discussion in the cover letter (see [PATCH 0/4]). Should I resend the patches?
Yes, please do. If they disappear into the ether, try again in a couple of weeks. --Juan
--- configure.ac | 1 - dlls/ntdll/signal_arm.c | 3 --- dlls/ntdll/signal_arm64.c | 3 --- dlls/ntdll/signal_i386.c | 3 --- dlls/ntdll/signal_powerpc.c | 4 ---- dlls/ntdll/signal_x86_64.c | 3 --- include/config.h.in | 3 --- 7 files changed, 20 deletions(-)
diff --git a/configure.ac b/configure.ac index 8089957..f2bb616 100644 --- a/configure.ac +++ b/configure.ac @@ -485,7 +485,6 @@ AC_CHECK_HEADERS(\ sys/resource.h \ sys/scsiio.h \ sys/shm.h \ - sys/signal.h \ sys/socket.h \ sys/socketvar.h \ sys/sockio.h \ diff --git a/dlls/ntdll/signal_arm.c b/dlls/ntdll/signal_arm.c index 0eb7ce0..7cc52c8 100644 --- a/dlls/ntdll/signal_arm.c +++ b/dlls/ntdll/signal_arm.c @@ -43,9 +43,6 @@ # include <sys/syscall.h> # endif #endif -#ifdef HAVE_SYS_SIGNAL_H -# include <sys/signal.h> -#endif
#define NONAMELESSUNION #define NONAMELESSSTRUCT diff --git a/dlls/ntdll/signal_arm64.c b/dlls/ntdll/signal_arm64.c index 2b82952..53b8938 100644 --- a/dlls/ntdll/signal_arm64.c +++ b/dlls/ntdll/signal_arm64.c @@ -42,9 +42,6 @@ # include <sys/syscall.h> # endif #endif -#ifdef HAVE_SYS_SIGNAL_H -# include <sys/signal.h> -#endif
#include "ntstatus.h" #define WIN32_NO_STATUS diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c index 5f8b8fd..02a8cd3 100644 --- a/dlls/ntdll/signal_i386.c +++ b/dlls/ntdll/signal_i386.c @@ -48,9 +48,6 @@ # include <sys/vm86.h> #endif
-#ifdef HAVE_SYS_SIGNAL_H -# include <sys/signal.h> -#endif #ifdef HAVE_SYS_SYSCTL_H # include <sys/sysctl.h> #endif diff --git a/dlls/ntdll/signal_powerpc.c b/dlls/ntdll/signal_powerpc.c index a457bdf..9b49c89 100644 --- a/dlls/ntdll/signal_powerpc.c +++ b/dlls/ntdll/signal_powerpc.c @@ -43,10 +43,6 @@ # endif #endif
-#ifdef HAVE_SYS_SIGNAL_H -# include <sys/signal.h> -#endif - #include "ntstatus.h" #define WIN32_NO_STATUS #include "windef.h" diff --git a/dlls/ntdll/signal_x86_64.c b/dlls/ntdll/signal_x86_64.c index c6e9a9b..40a8ae9 100644 --- a/dlls/ntdll/signal_x86_64.c +++ b/dlls/ntdll/signal_x86_64.c @@ -44,9 +44,6 @@ #ifdef HAVE_SYS_PARAM_H # include <sys/param.h> #endif -#ifdef HAVE_SYS_SIGNAL_H -# include <sys/signal.h> -#endif
#define NONAMELESSUNION #define NONAMELESSSTRUCT diff --git a/include/config.h.in b/include/config.h.in index 841c4f5..65bd1e3 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -987,9 +987,6 @@ /* Define to 1 if you have the <sys/shm.h> header file. */ #undef HAVE_SYS_SHM_H
-/* Define to 1 if you have the <sys/signal.h> header file. */ -#undef HAVE_SYS_SIGNAL_H - /* Define to 1 if you have the <sys/socketvar.h> header file. */ #undef HAVE_SYS_SOCKETVAR_H
--- server/change.c | 3 +++ server/queue.c | 3 +++ server/sock.c | 3 +++ 3 files changed, 9 insertions(+)
diff --git a/server/change.c b/server/change.c index f6d56b0..3ac70a4 100644 --- a/server/change.c +++ b/server/change.c @@ -32,6 +32,9 @@ #include <limits.h> #include <dirent.h> #include <errno.h> +#ifdef HAVE_POLL_H +# include <poll.h> +#endif
#include "ntstatus.h" #define WIN32_NO_STATUS diff --git a/server/queue.c b/server/queue.c index 57603e1..601629e 100644 --- a/server/queue.c +++ b/server/queue.c @@ -25,6 +25,9 @@ #include <stdarg.h> #include <stdio.h> #include <stdlib.h> +#ifdef HAVE_POLL_H +# include <poll.h> +#endif
#include "ntstatus.h" #define WIN32_NO_STATUS diff --git a/server/sock.c b/server/sock.c index 5ffb1fe..4adad0f 100644 --- a/server/sock.c +++ b/server/sock.c @@ -30,6 +30,9 @@ #include <string.h> #include <stdlib.h> #include <errno.h> +#ifdef HAVE_POLL_H +# include <poll.h> +#endif #include <sys/time.h> #include <sys/types.h> #ifdef HAVE_SYS_SOCKET_H
Fixes compilation of query.c with musl --- dlls/dnsapi/query.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/dnsapi/query.c b/dlls/dnsapi/query.c index b1d80dd..898e1f0 100644 --- a/dlls/dnsapi/query.c +++ b/dlls/dnsapi/query.c @@ -146,7 +146,7 @@ static DNS_STATUS dns_map_h_errno( int error ) case HOST_NOT_FOUND: return DNS_ERROR_RCODE_NAME_ERROR; case TRY_AGAIN: return DNS_ERROR_RCODE_SERVER_FAILURE; case NO_RECOVERY: return DNS_ERROR_RCODE_REFUSED; - case NETDB_INTERNAL: return DNS_ERROR_RCODE; + case -1: return DNS_ERROR_RCODE; default: FIXME( "unmapped error code: %d\n", error ); return DNS_ERROR_RCODE_NOT_IMPLEMENTED;
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Am 2014-06-01 11:29, schrieb Felix Janda:
The first two patches merely fix warnings because of use of deprecated headers. So they are not strictly necessary. The patches should also update configure but why is configure at all in the git repo?
You don't have to update configure in your patches. Alexandre takes care of this when he commits them.
I am not certain why we have configure in the git repo, but I suspect it's either for convenience or because some external autoconf macros are needed to generate configure that may not be installed on every developer's machine.