[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [libvirt] [PATCH] mac os x: don't compile failing example program on
From: |
Eric Blake |
Subject: |
Re: [libvirt] [PATCH] mac os x: don't compile failing example program on 32 bit mac os x |
Date: |
Tue, 28 Sep 2010 14:01:14 -0600 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100921 Fedora/3.1.4-1.fc13 Mnenhy/0.8.3 Thunderbird/3.1.4 |
On 09/28/2010 10:18 AM, Eric Blake wrote:
gcc -Wall -Wformat -Wmissing-prototypes -Wnested-externs -Wpointer-
arith -Wextra -Wshadow -Wcast-align -Wwrite-strings
-Waggregate-return -Wstrict-prototypes -Winline -Wredundant-decls
-Wno-sign-compare -Wp,- D_FORTIFY_SOURCE=2 -fexceptions
-fasynchronous-unwind-tables -g -O2 - o .libs/event-test
event_test-event-test.o -L/opt/local/lib ../../../
src/.libs/libvirt.dylib -L/usr/lib /usr/lib/libxml2.dylib -licucore -
lm /opt/local/lib/libgnutls.dylib /opt/local/lib/libtasn1.dylib -lz /
opt/local/lib/libgcrypt.dylib /opt/local/lib/libgpg-error.dylib -
lpthread /opt/local/lib/libintl.dylib /opt/local/lib/libiconv.dylib -lc
Aha - I just realized the problem. The Makefile.am fails to link against
the gnulib library that provides rpl_poll, even though the headers are
pulling in the replacement definition.
There _is_ a gnulib issue, though:
The gnulib module poll replaces both the <poll.h> system header and the
poll(2) system call; but when it replaces the system call, it does so
via a define to rpl_poll directly in <config.h> which is an older style,
rather than the modern-day style of replacing things in the gnulib
replacement <poll.h>. Furthermore, modern style favors splitting
replacement headers into separate modules from like-named functions
(that is, we need a new module poll-h if you want a working poll.h
[pollfd, nfds_t, and the various POLL macros] that can be used for
GNULIB_POSIXCHECK conformance and when you don't tickle the portability
limitations of native poll(); and poll [which depends on poll-h] if you
also need the gnulib fixes for the function).
--
Eric Blake address@hidden +1-801-349-2682
Libvirt virtualization library http://libvirt.org