Hi! Attached patch makes libxl compile on NetBSD. <sys/signal.h> is needed to get definition for SIGPIPE and SIG_IGN. Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> -- ---to satisfy European Law for business letters: Advanced Micro Devices GmbH Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen Geschaeftsfuehrer: Andrew Bowd, Thomas M. McCoy, Giuliano Meroni Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Christoph Egger writes ("[Xen-devel] [PATCH] libxl: build fix"):> Attached patch makes libxl compile on NetBSD. > <sys/signal.h> is needed to get definition for SIGPIPE and SIG_IGN.<sys/signal.h> is not a standard header file. It should be <signal.h>. Adding #include <signal.h> would be correct. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Tuesday 13 April 2010 13:21:31 Ian Jackson wrote:> Christoph Egger writes ("[Xen-devel] [PATCH] libxl: build fix"): > > Attached patch makes libxl compile on NetBSD. > > <sys/signal.h> is needed to get definition for SIGPIPE and SIG_IGN. > > <sys/signal.h> is not a standard header file. It should be <signal.h>. > > Adding > #include <signal.h> > would be correct.On NetBSD, the SIG* defines are in <sys/signal.h> which is just included by <signal.h> On NetBSD, both works. But you''re right, the portable fix is the prefered one. Christoph -- ---to satisfy European Law for business letters: Advanced Micro Devices GmbH Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen Geschaeftsfuehrer: Andrew Bowd, Thomas M. McCoy, Giuliano Meroni Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Christoph Egger writes ("Re: [Xen-devel] [PATCH] libxl: build fix"):> On NetBSD, the SIG* defines are in <sys/signal.h> which is just > included by <signal.h> > On NetBSD, both works.The correct way to discover what the right #include is is not to go on a wild goose chase through headers. It is to read appropriate documentation, such as SuSv3: http://www.opengroup.org/onlinepubs/009695399/basedefs/signal.h.html Every function or symbol that''s in SuS has next to its description a statement of what header file(s) are needed.> But you''re right, the portable fix is the prefered one.It''s not just "portable", it is not broken. The NetBSD developers would be quite entitled to make <sys/signal.h> go away, or not contain these definitions any more. I doubt they promise not to. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Tuesday 13 April 2010 17:04:00 Ian Jackson wrote:> Christoph Egger writes ("Re: [Xen-devel] [PATCH] libxl: build fix"): > > On NetBSD, the SIG* defines are in <sys/signal.h> which is just > > included by <signal.h> > > On NetBSD, both works. > > The correct way to discover what the right #include is is not to go on > a wild goose chase through headers. It is to read appropriate > documentation, such as SuSv3: > http://www.opengroup.org/onlinepubs/009695399/basedefs/signal.h.html > Every function or symbol that''s in SuS has next to its description a > statement of what header file(s) are needed.Yes, you are right. It''s my fault. It should have read the manpage. It states this clearly, too. Christoph -- ---to satisfy European Law for business letters: Advanced Micro Devices GmbH Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen Geschaeftsfuehrer: Andrew Bowd, Thomas M. McCoy, Giuliano Meroni Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel