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.
This commit is contained in:
Richard W.M. Jones 2008-01-23 14:54:41 +00:00
parent 569200b6d4
commit 9cf2573c8a
6 changed files with 22 additions and 4 deletions

View File

@ -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.

View 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)

View File

@ -25,6 +25,10 @@
#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

View File

@ -47,6 +47,7 @@
#include <assert.h>
#include <fnmatch.h>
#include <grp.h>
#include <signal.h>
#include "libvirt/virterror.h"

View 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>

View 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>