]> git.saurik.com Git - apt.git/commitdiff
OpenBSD fixes
authorArch Librarian <arch@canonical.com>
Mon, 20 Sep 2004 16:55:32 +0000 (16:55 +0000)
committerArch Librarian <arch@canonical.com>
Mon, 20 Sep 2004 16:55:32 +0000 (16:55 +0000)
Author: jgg
Date: 1999-12-11 02:11:10 GMT
OpenBSD fixes

buildlib/config.h.in
buildlib/environment.mak.in
buildlib/staticlibrary.mak
buildlib/statvfs.h.in
configure.in
methods/rfc2553emu.cc

index f882ca25d8e83102865024b1f6523df98deb5ee8..689549e6532aedd5956ecb6d9d7d7e4409b3c94c 100644 (file)
 /* Define if we have the X11 windowing system. */
 #undef HAVE_X11
 
+/* Define if we have sys/vfs.h */
+#undef HAVE_VFS_H
+
+/* Define if we have sys/mount.h */
+#undef HAVE_MOUNT_H
+
 /* Define if we have enabled pthread support */
 #undef HAVE_PTHREAD
 
index e7545bac87dbfbc3c1bad121e9cb3883e30f920a..12aaa7cba9925dc6d70b17fe173da5bc0476d390 100644 (file)
@@ -14,6 +14,8 @@ LFLAGS+= @LDFLAGS@
 LEFLAGS+= 
 XLIBS:= @X_LIBS@ @X_PRE_LIBS@ @X11LIB@ @X_EXTRA_LIBS@
 SOCKETLIBS:= @SOCKETLIBS@
+AR:=@AR@
+RANLIB:=@RANLIB@
 
 # Dep generation - this only works for gnu stuff
 INLINEDEPFLAG = -MD
index 998ca5bf2e57f3cb8e488ffec6c9e9318324c554..0835fe8a073b0062c41dc49addddcbc7946d477f 100644 (file)
@@ -39,6 +39,9 @@ $($(LOCAL)-LIB): $($(LOCAL)-HEADERS) $($(LOCAL)-OBJS)
        echo Building library $@
        -rm $@ > /dev/null 2>&1
        $(AR) cq $@ $(filter %.o,$^)
+ifneq ($(words $(RANLIB)),0)
+       $(RANLIB) $@
+endif
 
 # Compilation rules
 vpath %.cc $(SUBDIRS)
index 86b8c52cdb0b4073c098c24e2138e7d54c527b0b..d0ec238ad570c92a94da923dd1ccb123728d32c8 100644 (file)
@@ -1,4 +1,13 @@
 /* Compatibility for systems with out Single Unix Spec statvfs */
+#include <config.h>
+
+#ifdef HAVE_VFS_H
 #include <sys/vfs.h>
+#endif
+
+#ifdef HAVE_MOUNT_H
+#include <sys/param.h>
+#include <sys/mount.h>
+#endif
 
 #define statvfs statfs
index c0ecdaa05b449b8e5f94d9a09805b27406e2eb30..366d70375196375bcd7b9e4ac080056de8c20de0 100644 (file)
@@ -31,7 +31,9 @@ AC_CHECK_TOOL_PREFIX  dnl recheck, in case the initial guess was wrong
 
 dnl Check for other programs
 AC_PROG_CXX
-#AC_LANG_CPLUSPLUS
+AC_PROG_CPP
+AC_PROG_RANLIB
+AC_CHECK_TOOL(AR,ar,"ar")
 
 dnl Checks for sockets
 SAVE_LIBS="$LIBS"
@@ -98,6 +100,13 @@ dnl Single Unix Spec statvfs
 AC_CHECK_FUNC(statvfs,[HAVE_STATVFS=yes])
 AC_SUBST(HAVE_STATVFS)
 
+dnl Arg, linux and bsd put their statfs function in different places
+if test x"$HAVE_STATVFS" != x"yes"; then
+   AC_EGREP_HEADER(statfs,sys/vfs.h,[AC_DEFINE(HAVE_VFS_H)],[
+   AC_EGREP_HEADER(statfs,sys/mount.h,[AC_DEFINE(HAVE_MOUNT_H)],[AC_MSG_ERROR(failed: Need statvfs)])
+   ])
+fi
+
 dnl Check the sizes etc. of the architecture
 changequote(,)
 if archline="`grep \"^$archset\" $srcdir/buildlib/sizetable | cut -f 2- -d ' '`";then
index 90443f835f080ca72fe2efd86dbd480cbd4a58fe..05d9f0c3250a56f57d6b09167834a8ba131b9f3c 100644 (file)
@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
-// $Id: rfc2553emu.cc,v 1.5 1999/12/10 08:53:43 jgg Exp $
+// $Id: rfc2553emu.cc,v 1.6 1999/12/11 02:11:10 jgg Exp $
 /* ######################################################################
 
    RFC 2553 Emulation - Provides emulation for RFC 2553 getaddrinfo,
@@ -17,6 +17,7 @@
 #include "rfc2553emu.h"
 #include <stdlib.h>
 #include <arpa/inet.h>
+#include <netinet/in.h>
 #include <string.h>
 #include <stdio.h>