From 9cf2573c8a46309ac00b953f81bc94c5f9c935a7 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 23 Jan 2008 14:54:41 +0000 Subject: [PATCH] Portability improvements for Mac OS X. * configure.in: Use PortableXDR if available. * qemud/internal.h: Use "socketcompat.h". * qemud/qemud.c: Use . * src/sexpr.c: Use instead of . * src/socketcompat.h: Include for Mac OS X. --- ChangeLog | 9 +++++++++ configure.in | 8 ++++++-- qemud/internal.h | 5 ++++- qemud/qemud.c | 1 + src/sexpr.c | 2 +- src/socketcompat.h | 1 + 6 files changed, 22 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 91f06399dd..45bccbfbbc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +Wed Jan 23 14:47:00 BST 2008 Richard W.M. Jones + + Portability improvements for Mac OS X. + * configure.in: Use PortableXDR if available. + * qemud/internal.h: Use "socketcompat.h". + * qemud/qemud.c: Use . + * src/sexpr.c: Use instead of . + * src/socketcompat.h: Include for Mac OS X. + Wed Jan 23 14:43:00 BST 2008 Richard W.M. Jones Remove DOS line-endings. diff --git a/configure.in b/configure.in index 6cadb41c63..449bb91403 100644 --- a/configure.in +++ b/configure.in @@ -65,8 +65,12 @@ AC_CHECK_FUNCS([cfmakeraw regexec uname]) dnl Availability of various common headers (non-fatal if missing). AC_CHECK_HEADERS([pwd.h paths.h sys/syslimits.h sys/utsname.h sys/wait.h winsock2.h]) -dnl Need -lrpc or -lxdr? (Cygwin and MinGW resp. need this) -AC_SEARCH_LIBS(xdrmem_create,[rpc xdr]) +dnl Where are the XDR functions? +dnl If portablexdr is installed, prefer that. +dnl Otherwise try -lrpc (Cygwin) -lxdr (some MinGW) or none (most Unix) +AC_CHECK_LIB([portablexdr],[xdrmem_create],[],[ + AC_SEARCH_LIBS([xdrmem_create],[rpc xdr]) + ]) dnl Do we have rpcgen? AC_PATH_PROG(RPCGEN, rpcgen, no) diff --git a/qemud/internal.h b/qemud/internal.h index ee7ff59c91..19339a8c0b 100644 --- a/qemud/internal.h +++ b/qemud/internal.h @@ -25,6 +25,10 @@ #ifndef QEMUD_INTERNAL_H__ #define QEMUD_INTERNAL_H__ +#include + +#include "../src/socketcompat.h" + #include #include #include "../src/gnutls_1_0_compat.h" @@ -43,7 +47,6 @@ #include #include #include "remote_protocol.h" -#include "../config.h" #ifdef __GNUC__ #ifdef HAVE_ANSIDECL_H diff --git a/qemud/qemud.c b/qemud/qemud.c index 467e011072..7d25b9d657 100644 --- a/qemud/qemud.c +++ b/qemud/qemud.c @@ -47,6 +47,7 @@ #include #include #include +#include #include "libvirt/virterror.h" diff --git a/src/sexpr.c b/src/sexpr.c index b273117dd6..bbf0791b13 100644 --- a/src/sexpr.c +++ b/src/sexpr.c @@ -13,7 +13,7 @@ #include "config.h" #include -#include +#include #include #include #include diff --git a/src/socketcompat.h b/src/socketcompat.h index f9353f171a..133a1215c2 100644 --- a/src/socketcompat.h +++ b/src/socketcompat.h @@ -28,6 +28,7 @@ #ifndef HAVE_WINSOCK2_H /* Unix & Cygwin. */ #include +#include #include #include #include -- GitLab