From a763cd43a16078a93592669946a67c65311df766 Mon Sep 17 00:00:00 2001 From: mike Date: Wed, 30 Jan 2013 15:16:16 +0000 Subject: [PATCH] Changes to support building against the LSB - check for inflateCopy. Also, update --enable-dbus help to reflect the current default (now show --disable-dbus). git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@10842 7a7537e8-13f0-0310-91df-b6672ffda945 --- config-scripts/cups-common.m4 | 5 +++-- config.h.in | 1 + cups/http.c | 7 +++++++ cups/request.c | 5 ++++- vcnet/config.h | 1 + xcode/config.h | 1 + 6 files changed, 17 insertions(+), 3 deletions(-) diff --git a/config-scripts/cups-common.m4 b/config-scripts/cups-common.m4 index fe51c2b994..6c6a0d0cd7 100644 --- a/config-scripts/cups-common.m4 +++ b/config-scripts/cups-common.m4 @@ -3,7 +3,7 @@ dnl "$Id$" dnl dnl Common configuration stuff for CUPS. dnl -dnl Copyright 2007-2012 by Apple Inc. +dnl Copyright 2007-2013 by Apple Inc. dnl Copyright 1997-2007 by Easy Software Products, all rights reserved. dnl dnl These coded instructions, statements, and computer programs are the @@ -264,6 +264,7 @@ AC_CHECK_HEADER(zlib.h, AC_DEFINE(HAVE_LIBZ) LIBZ="-lz" LIBS="$LIBS -lz" + AC_CHECK_LIB(z, inflateCopy, AC_DEFINE(HAVE_INFLATECOPY)) if test "x$GZIP" != z; then INSTALL_GZIP="-z" fi)) @@ -305,7 +306,7 @@ else DBUSDIR="" fi -AC_ARG_ENABLE(dbus, [ --enable-dbus build with DBUS support]) +AC_ARG_ENABLE(dbus, [ --disable-dbus build without DBUS support]) AC_ARG_WITH(dbusdir, [ --with-dbusdir set DBUS configuration directory ], DBUSDIR="$withval") diff --git a/config.h.in b/config.h.in index cbe612b7c3..1408ca9db6 100644 --- a/config.h.in +++ b/config.h.in @@ -135,6 +135,7 @@ */ #undef HAVE_LIBZ +#undef HAVE_INFLATECOPY /* diff --git a/cups/http.c b/cups/http.c index efd6d807ee..3c7fc99f62 100644 --- a/cups/http.c +++ b/cups/http.c @@ -1962,6 +1962,7 @@ httpPeek(http_t *http, /* I - Connection to server */ #ifdef HAVE_LIBZ if (http->coding) { +# ifdef HAVE_INFLATECOPY int zerr; /* Decompressor error */ z_stream stream; /* Copy of decompressor stream */ @@ -2023,6 +2024,12 @@ httpPeek(http_t *http, /* I - Connection to server */ } bytes = length - http->stream.avail_out; + +# else + DEBUG_puts("2httpPeek: No inflateCopy on this platform, httpPeek does not " + "work with compressed streams."); + return (-1); +# endif /* HAVE_INFLATECOPY */ } else #endif /* HAVE_LIBZ */ diff --git a/cups/request.c b/cups/request.c index 191a536fcc..8fcb619716 100644 --- a/cups/request.c +++ b/cups/request.c @@ -3,7 +3,7 @@ * * IPP utilities for CUPS. * - * Copyright 2007-2012 by Apple Inc. + * Copyright 2007-2013 by Apple Inc. * Copyright 1997-2007 by Easy Software Products. * * These coded instructions, statements, and computer programs are the @@ -46,6 +46,9 @@ #ifndef O_BINARY # define O_BINARY 0 #endif /* O_BINARY */ +#ifndef MSG_DONTWAIT +# define MSG_DONTWAIT 0 +#endif /* !MSG_DONTWAIT */ /* diff --git a/vcnet/config.h b/vcnet/config.h index 80d7f57074..537cf4c9eb 100644 --- a/vcnet/config.h +++ b/vcnet/config.h @@ -201,6 +201,7 @@ */ #define HAVE_LIBZ 1 +#define HAVE_INFLATECOPY 1 /* diff --git a/xcode/config.h b/xcode/config.h index f86b269495..86fc301f6b 100644 --- a/xcode/config.h +++ b/xcode/config.h @@ -136,6 +136,7 @@ */ #define HAVE_LIBZ 1 +#define HAVE_INFLATECOPY 1 /* -- 2.47.2