]> xenbits.xensource.com Git - libvirt.git/commitdiff
Portability improvements for Mac OS X.
authorRichard W.M. Jones <rjones@redhat.com>
Wed, 23 Jan 2008 14:54:41 +0000 (14:54 +0000)
committerRichard W.M. Jones <rjones@redhat.com>
Wed, 23 Jan 2008 14:54:41 +0000 (14:54 +0000)
        * configure.in: Use PortableXDR if available.
        * qemud/internal.h: Use "socketcompat.h".
        * qemud/qemud.c: Use <signal.h>.
        * src/sexpr.c: Use <stdlib.h> instead of <malloc.h>.
        * src/socketcompat.h: Include <sys/un.h> for Mac OS X.

ChangeLog
configure.in
qemud/internal.h
qemud/qemud.c
src/sexpr.c
src/socketcompat.h

index 91f06399dd2cd2ed4cea18ebf1eb98f98d5917e1..45bccbfbbc2b8c8364451aa9b372dced72e1f4a0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+Wed Jan 23 14:47:00 BST 2008 Richard W.M. Jones <rjones@redhat.com>
+
+       Portability improvements for Mac OS X.
+       * configure.in: Use PortableXDR if available.
+       * qemud/internal.h: Use "socketcompat.h".
+       * qemud/qemud.c: Use <signal.h>.
+       * src/sexpr.c: Use <stdlib.h> instead of <malloc.h>.
+       * src/socketcompat.h: Include <sys/un.h> for Mac OS X.
+
 Wed Jan 23 14:43:00 BST 2008 Richard W.M. Jones <rjones@redhat.com>
 
        Remove DOS line-endings.
index 6cadb41c63eacf6c4f34afcfda5e2672b9cafb38..449bb914032c935cfd525e9fe1eb71470bbf6726 100644 (file)
@@ -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)
index ee7ff59c9187d1f31af69c61787eff4ac503e0a5..19339a8c0b82de7425ddceb348f6736c71d0454e 100644 (file)
 #ifndef QEMUD_INTERNAL_H__
 #define QEMUD_INTERNAL_H__
 
+#include <config.h>
+
+#include "../src/socketcompat.h"
+
 #include <gnutls/gnutls.h>
 #include <gnutls/x509.h>
 #include "../src/gnutls_1_0_compat.h"
@@ -43,7 +47,6 @@
 #include <rpc/types.h>
 #include <rpc/xdr.h>
 #include "remote_protocol.h"
-#include "../config.h"
 
 #ifdef __GNUC__
 #ifdef HAVE_ANSIDECL_H
index 467e0110722659b9b44bdc492403d614b9bdc62d..7d25b9d6572ee033ef420ec7144130d97f025f0c 100644 (file)
@@ -47,6 +47,7 @@
 #include <assert.h>
 #include <fnmatch.h>
 #include <grp.h>
+#include <signal.h>
 
 #include "libvirt/virterror.h"
 
index b273117dd64e33dd0cf826c297f84b84714d1a58..bbf0791b130b1480899bfee5eec801d5cda3bdea 100644 (file)
@@ -13,7 +13,7 @@
 #include "config.h"
 
 #include <stdio.h>
-#include <malloc.h>
+#include <stdlib.h>
 #include <string.h>
 #include <ctype.h>
 #include <errno.h>
index f9353f171a4527c633460ee4b2ee2baa495acf66..133a1215c29ef6e79de8b9ce436194920ffc33f7 100644 (file)
@@ -28,6 +28,7 @@
 #ifndef HAVE_WINSOCK2_H                /* Unix & Cygwin. */
 
 #include <sys/socket.h>
+#include <sys/un.h>
 #include <net/if.h>
 #include <netinet/in.h>
 #include <netinet/tcp.h>