Files /home/bms/x/y/papi-1.0_beta.orig/.acinclude.m4.swp and ./.acinclude.m4.swp differ diff -uNr /home/bms/x/y/papi-1.0_beta.orig/acinclude.m4 ./acinclude.m4 --- /home/bms/x/y/papi-1.0_beta.orig/acinclude.m4 2005-09-21 17:59:13.000000000 +0100 +++ ./acinclude.m4 2010-02-06 20:06:09.000000000 +0000 @@ -41,3 +41,19 @@ fi AM_CONDITIONAL(HAVE_CUPS, [ test x$CUPS_PREFIX != x ]) ]) + +dnl +dnl Check if we should build examples. +dnl +AC_DEFUN([AC_CHECK_EXAMPLES], [ +AC_ARG_ENABLE(examples, [ --enable-examples build with examples [default=no]], enable_examples=yes, enable_examples=no) +AM_CONDITIONAL(ENABLE_EXAMPLES, [ test x$enable_examples != xno ]) +]) + +dnl +dnl Check if we should BSD/SYSV lpr commands. +dnl +AC_DEFUN([AC_CHECK_BSD_SYSV_COMMANDS], [ +AC_ARG_ENABLE(bsd-sysv-commands, [ --enable-bsd-sysv-commands build with BSD/SYSV commands [default=no]], enable_bsd_sysv_commands=yes, enable_bsd_sysv_commands=no) +AM_CONDITIONAL(ENABLE_BSD_SYSV_COMMANDS, [ test x$enable_bsd_sysv_commands != xno ]) +]) diff -uNr /home/bms/x/y/papi-1.0_beta.orig/configure.in ./configure.in --- /home/bms/x/y/papi-1.0_beta.orig/configure.in 2006-03-12 06:15:33.000000000 +0000 +++ ./configure.in 2010-02-06 20:05:07.000000000 +0000 @@ -115,6 +115,12 @@ AC_MSG_RESULT([Default IPP server: $DEFAULT_IPP_SERVER]) AC_SUBST(DEFAULT_IPP_SERVER) +dnl»····check if we should build and install examples. +AC_CHECK_EXAMPLES + +dnl»····check if we should build and install BSD/SYSV lpr commands. +AC_CHECK_BSD_SYSV_COMMANDS + dnl which linker flags do we use for inclusion of mapfiles. os=`uname -s` AM_CONDITIONAL(LINUX, [ test x$os = xLinux ] ) diff -uNr /home/bms/x/y/papi-1.0_beta.orig/docs/man/Makefile.am ./docs/man/Makefile.am --- /home/bms/x/y/papi-1.0_beta.orig/docs/man/Makefile.am 2006-03-12 06:30:42.000000000 +0000 +++ ./docs/man/Makefile.am 2010-02-06 20:18:41.000000000 +0000 @@ -5,16 +5,21 @@ # $Id: Makefile.am,v 1.5 2006/03/12 06:30:42 njacobs Exp $ # -man_MANS_in = lpq.1b.in lpr.1b.in lprm.1b.in lpc.1b.in +man_MANS_in = +if ENABLE_BSD_SYSV_COMMANDS +man_MANS_in += lpq.1b.in lpr.1b.in lprm.1b.in lpc.1b.in man_MANS_in += lpstat.1.in lp.1.in cancel.1.in enable.1.in disable.1.in man_MANS_in += lpmove.1m.in accept.1m.in reject.1m.in +endif man_MANS_in += psm-ipp.5.in man_MANS=$(man_MANS_in:%.in=%) +if ENABLE_BSD_SYSV_COMMANDS man_MANS += lpq.1b lpr.1b lprm.1b lpc.1b man_MANS += lpstat.1 lp.1 cancel.1 enable.1 disable.1 man_MANS += lpmove.1m accept.1m reject.1m +endif man_MANS += psm-ipp.5 SUFFIXES = .in diff -uNr /home/bms/x/y/papi-1.0_beta.orig/source/Makefile.am ./source/Makefile.am --- /home/bms/x/y/papi-1.0_beta.orig/source/Makefile.am 2005-09-21 18:13:17.000000000 +0100 +++ ./source/Makefile.am 2010-02-06 20:05:59.000000000 +0000 @@ -13,6 +13,14 @@ CUPS_MODULE= libpapi-cups endif +if ENABLE_EXAMPLES +EXAMPLES= examples +endif + +if ENABLE_BSD_SYSV_COMMANDS +BSD_SYSV_COMMANDS= bsd-sysv-commands +endif + AUTOMAKE_OPTIONS=foreign SUBDIRS= libpapi-common \ libpapi-dynamic \ @@ -21,6 +29,6 @@ libpapi-ipp \ $(CUPS_MODULE) \ libipp-listener \ - bsd-sysv-commands \ + $(BSD_SYSV_COMANDS) \ $(APACHE_MODULE) \ - examples + $(EXAMPLES) diff -uNr /home/bms/x/y/papi-1.0_beta.orig/source/bsd-sysv-commands/common.c ./source/bsd-sysv-commands/common.c --- /home/bms/x/y/papi-1.0_beta.orig/source/bsd-sysv-commands/common.c 2006-02-15 21:24:20.000000000 +0000 +++ ./source/bsd-sysv-commands/common.c 2010-01-31 13:40:22.000000000 +0000 @@ -8,7 +8,9 @@ #include #include #include +#ifdef HAVE_ALLOCA_H #include +#endif #include #include #include diff -uNr /home/bms/x/y/papi-1.0_beta.orig/source/bsd-sysv-commands/in.lpd.c ./source/bsd-sysv-commands/in.lpd.c --- /home/bms/x/y/papi-1.0_beta.orig/source/bsd-sysv-commands/in.lpd.c 2006-01-28 07:02:04.000000000 +0000 +++ ./source/bsd-sysv-commands/in.lpd.c 2010-01-31 13:58:00.000000000 +0000 @@ -6,6 +6,7 @@ #pragma ident "$Id: in.lpd.c,v 1.3 2006/01/28 07:02:04 njacobs Exp $" #include +#include #include #include #include diff -uNr /home/bms/x/y/papi-1.0_beta.orig/source/bsd-sysv-commands/lp.c ./source/bsd-sysv-commands/lp.c --- /home/bms/x/y/papi-1.0_beta.orig/source/bsd-sysv-commands/lp.c 2006-02-25 01:08:06.000000000 +0000 +++ ./source/bsd-sysv-commands/lp.c 2010-01-31 13:57:30.000000000 +0000 @@ -223,7 +223,7 @@ printer = DEFAULT_DEST; if (modify == -1) { - char *document_format = "application/octet-stream"; + const char *document_format = "application/octet-stream"; #ifdef MAGIC_MIME if (optind != ac) { @@ -238,6 +238,7 @@ #endif papiAttributeListAddInteger(&list, PAPI_ATTR_EXCL, "copies", 1); + /* XXX CONST arg */ papiAttributeListAddString(&list, PAPI_ATTR_EXCL, "document-format", document_format); papiAttributeListAddString(&list, PAPI_ATTR_EXCL, diff -uNr /home/bms/x/y/papi-1.0_beta.orig/source/bsd-sysv-commands/lpr.c ./source/bsd-sysv-commands/lpr.c --- /home/bms/x/y/papi-1.0_beta.orig/source/bsd-sysv-commands/lpr.c 2006-02-01 23:52:42.000000000 +0000 +++ ./source/bsd-sysv-commands/lpr.c 2010-01-31 13:57:05.000000000 +0000 @@ -51,7 +51,7 @@ int validate = 0; int remove = 0; int copy = 1; /* default is to copy the data */ - char *document_format = "application/octet-stream"; + const char *document_format = "application/octet-stream"; int c; (void) setlocale(LC_ALL, ""); @@ -196,6 +196,7 @@ #endif papiAttributeListAddInteger(&list, PAPI_ATTR_EXCL, "copies", 1); + /* XXX CONST arg */ papiAttributeListAddString(&list, PAPI_ATTR_EXCL, "document-format", document_format); papiAttributeListAddString(&list, PAPI_ATTR_EXCL, diff -uNr /home/bms/x/y/papi-1.0_beta.orig/source/examples/printer-query.c ./source/examples/printer-query.c --- /home/bms/x/y/papi-1.0_beta.orig/source/examples/printer-query.c 2005-10-31 18:53:11.000000000 +0000 +++ ./source/examples/printer-query.c 2010-01-31 13:50:47.000000000 +0000 @@ -16,7 +16,9 @@ #include #include #include +#ifdef HAVE_ALLOCA_H #include +#endif #include static void diff -uNr /home/bms/x/y/papi-1.0_beta.orig/source/libipp-core/ipp_types.c ./source/libipp-core/ipp_types.c --- /home/bms/x/y/papi-1.0_beta.orig/source/libipp-core/ipp_types.c 2005-02-26 06:58:41.000000000 +0000 +++ ./source/libipp-core/ipp_types.c 2010-01-31 13:19:34.000000000 +0000 @@ -11,7 +11,14 @@ #include #include #include +#ifdef HAVE_VALUES_H #include +#endif +#include + +#ifndef MAXINT +#define MAXINT INT_MAX +#endif #ifndef MININT #define MININT (-MAXINT - 1) diff -uNr /home/bms/x/y/papi-1.0_beta.orig/source/libipp-core/read.c ./source/libipp-core/read.c --- /home/bms/x/y/papi-1.0_beta.orig/source/libipp-core/read.c 2006-01-28 07:02:04.000000000 +0000 +++ ./source/libipp-core/read.c 2010-01-31 13:20:03.000000000 +0000 @@ -7,7 +7,9 @@ #include #include +#ifdef HAVE_ALLOCA_H #include +#endif #include #include #include diff -uNr /home/bms/x/y/papi-1.0_beta.orig/source/libipp-listener/common.c ./source/libipp-listener/common.c --- /home/bms/x/y/papi-1.0_beta.orig/source/libipp-listener/common.c 2006-02-26 07:40:38.000000000 +0000 +++ ./source/libipp-listener/common.c 2010-01-31 13:55:43.000000000 +0000 @@ -74,7 +74,7 @@ } else { *printer = job; if ((job = strrchr(*printer, '/')) != NULL) { - *job = NULL; + *job = '\0'; *id = atoi(++job); } } @@ -230,7 +230,7 @@ name = strtok(buf, " \t\n"); - for (i = 0; ((passed == 1) && (name[i] != NULL)); i++) + for (i = 0; ((passed == 1) && (name[i] != '\0')); i++) if (isalpha(name[i]) != 0) name[i] = tolower(name[i]); else if ((name[i] == '_') || (name[i] == '-')) diff -uNr /home/bms/x/y/papi-1.0_beta.orig/source/libpapi-common/attribute.c ./source/libpapi-common/attribute.c --- /home/bms/x/y/papi-1.0_beta.orig/source/libpapi-common/attribute.c 2006-02-25 06:06:36.000000000 +0000 +++ ./source/libpapi-common/attribute.c 2010-01-31 13:10:28.000000000 +0000 @@ -11,7 +11,9 @@ #include #include #include +#ifdef HAVE_ALLOCA_H #include +#endif #include static void papiAttributeFree(papi_attribute_t *attribute); diff -uNr /home/bms/x/y/papi-1.0_beta.orig/source/libpapi-common/config.h.in ./source/libpapi-common/config.h.in --- /home/bms/x/y/papi-1.0_beta.orig/source/libpapi-common/config.h.in 2006-03-12 06:17:13.000000000 +0000 +++ ./source/libpapi-common/config.h.in 2010-02-06 20:05:40.000000000 +0000 @@ -84,6 +84,10 @@ /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#undef LT_OBJDIR + /* Name of package */ #undef PACKAGE diff -uNr /home/bms/x/y/papi-1.0_beta.orig/source/libpapi-common/config.h.in~ ./source/libpapi-common/config.h.in~ --- /home/bms/x/y/papi-1.0_beta.orig/source/libpapi-common/config.h.in~ 1970-01-01 01:00:00.000000000 +0100 +++ ./source/libpapi-common/config.h.in~ 2010-02-06 20:05:12.000000000 +0000 @@ -0,0 +1,103 @@ +/* source/libpapi-common/config.h.in. Generated from configure.in by autoheader. */ + +/* Define to 1 if you have the `dlopen' function. */ +#undef HAVE_DLOPEN + +/* Define to 1 if you have the `dlsym' function. */ +#undef HAVE_DLSYM + +/* Define to 1 if you have the `fprintf' function. */ +#undef HAVE_FPRINTF + +/* define if you have getipnodbyname */ +#undef HAVE_GETIPNODEBYNAME + +/* Define to 1 if you have the `getpassphrase' function. */ +#undef HAVE_GETPASSPHRASE + +/* Define to 1 if you have the `gettext' function. */ +#undef HAVE_GETTEXT + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if you have the `is_system_labeled' function. */ +#undef HAVE_IS_SYSTEM_LABELED + +/* Define to 1 if you have the `localtime' function. */ +#undef HAVE_LOCALTIME + +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_PRIV_H + +/* define if you have rresvport_af */ +#undef HAVE_RRESVPORT_AF + +/* Define to 1 if you have the `snprintf' function. */ +#undef HAVE_SNPRINTF + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDARG_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the `strcmp' function. */ +#undef HAVE_STRCMP + +/* Define to 1 if you have the `strdup' function. */ +#undef HAVE_STRDUP + +/* Define to 1 if you have the `strerror' function. */ +#undef HAVE_STRERROR + +/* Define to 1 if you have the `strftime' function. */ +#undef HAVE_STRFTIME + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if you have the `strlcat' function. */ +#undef HAVE_STRLCAT + +/* Define to 1 if you have the `strlcpy' function. */ +#undef HAVE_STRLCPY + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Define to empty if `const' does not conform to ANSI C. */ +#undef const diff -uNr /home/bms/x/y/papi-1.0_beta.orig/source/libpapi-common/library.c ./source/libpapi-common/library.c --- /home/bms/x/y/papi-1.0_beta.orig/source/libpapi-common/library.c 2005-10-31 18:56:45.000000000 +0000 +++ ./source/libpapi-common/library.c 2010-01-31 13:10:49.000000000 +0000 @@ -11,7 +11,9 @@ #include #include #include +#ifdef HAVE_ALLOCA_H #include +#endif #include #include diff -uNr /home/bms/x/y/papi-1.0_beta.orig/source/libpapi-common/uri.c ./source/libpapi-common/uri.c --- /home/bms/x/y/papi-1.0_beta.orig/source/libpapi-common/uri.c 2005-09-21 20:04:53.000000000 +0100 +++ ./source/libpapi-common/uri.c 2010-01-31 13:08:57.000000000 +0000 @@ -16,7 +16,7 @@ #include "uri.h" static char * -strndup(char *string, size_t length) +xstrndup(char *string, size_t length) { char *result = NULL; @@ -57,7 +57,7 @@ if ((*uri = u = calloc(1, sizeof (*u))) == NULL) return (-1); - u->scheme = strndup(string, ptr - string); + u->scheme = xstrndup(string, ptr - string); if ((ptr[1] == '/') && (ptr[2] == '/')) { /* @@ -71,14 +71,14 @@ if ((path = end = strchr(string, '/')) == NULL) for (end = string; *end != '\0'; end++); - u->host_part = strndup(string, end - string); + u->host_part = xstrndup(string, end - string); for (host = string; host < end; host ++) if (*host == '@') { /* string to host is the user part */ - u->user_part = strndup(string, host-string); + u->user_part = xstrndup(string, host-string); /* host+1 to end is the host part */ - u->host_part = strndup(host + 1, + u->host_part = xstrndup(host + 1, end - (host+1)); user = string; host++; @@ -90,11 +90,11 @@ for (password = user; (password < host - 1); password++) if (*password == ':') { - u->password = strndup(password + 1, + u->password = xstrndup(password + 1, host - password - 2); break; } - u->user = strndup(user, password - user); + u->user = xstrndup(user, password - user); } else host = string; @@ -106,10 +106,10 @@ break; if (port < path) { - u->port = strndup(port + 1, path - port - 1); + u->port = xstrndup(port + 1, path - port - 1); } - u->host = strndup(host, port - host); + u->host = xstrndup(host, port - host); } if (path != NULL) { @@ -129,12 +129,12 @@ fragment = strrchr(name, '#'); if ((fragment != NULL) && (*fragment != '\0')) { - u->fragment = strndup(fragment + 1, + u->fragment = xstrndup(fragment + 1, end - fragment - 1); end = fragment; } - u->path = strndup(path, end - path); + u->path = xstrndup(path, end - path); } } } else { /* scheme:scheme_part */ diff -uNr /home/bms/x/y/papi-1.0_beta.orig/source/libpapi-cups/Makefile.am ./source/libpapi-cups/Makefile.am --- /home/bms/x/y/papi-1.0_beta.orig/source/libpapi-cups/Makefile.am 2005-10-31 18:56:45.000000000 +0000 +++ ./source/libpapi-cups/Makefile.am 2010-02-06 19:22:15.000000000 +0000 @@ -8,7 +8,7 @@ lib_LTLIBRARIES = psm-cups.la -psm_cups_la_LIBADD = -ldl -L@CUPS_PREFIX@/lib -lcups +psm_cups_la_LIBADD = -L@CUPS_PREFIX@/lib -lcups psm_cups_la_LDFLAGS = -module -avoid-version psm_cupsincludedir = $(includedir) diff -uNr /home/bms/x/y/papi-1.0_beta.orig/source/libpapi-dynamic/Makefile.am ./source/libpapi-dynamic/Makefile.am --- /home/bms/x/y/papi-1.0_beta.orig/source/libpapi-dynamic/Makefile.am 2006-03-12 06:15:09.000000000 +0000 +++ ./source/libpapi-dynamic/Makefile.am 2010-02-06 19:22:30.000000000 +0000 @@ -8,7 +8,7 @@ lib_LTLIBRARIES = libpapi.la -libpapi_la_LIBADD = ../libpapi-common/libpapi-common.la -ldl +libpapi_la_LIBADD = ../libpapi-common/libpapi-common.la libpapi_la_LDFLAGS = @MAPFLAGS@ libpapiincludedir = $(includedir) @@ -23,7 +23,6 @@ libpapi_la_SOURCES += nss/nss-emulation.c nss/nss-files.c nss/nss-printcap.c \ nss/nss-nis.c AM_CPPFLAGS += -I./nss -DNSS_EMULATION -libpapi_la_LIBADD += -lnsl libpapi_la_LDFLAGS += @MAPFLAGS@-emulation endif diff -uNr /home/bms/x/y/papi-1.0_beta.orig/source/libpapi-dynamic/nss/nss-emulation.h ./source/libpapi-dynamic/nss/nss-emulation.h --- /home/bms/x/y/papi-1.0_beta.orig/source/libpapi-dynamic/nss/nss-emulation.h 2005-02-26 06:58:42.000000000 +0000 +++ ./source/libpapi-dynamic/nss/nss-emulation.h 2010-01-31 13:14:18.000000000 +0000 @@ -18,6 +18,10 @@ NSS_RETURN } nss_status_t; +/* FreeBSD doesn't define YPERR_SUCCESS */ +#ifndef YPERR_SUCCESS +#define YPERR_SUCCESS 0 +#endif /* YPERR_SUCCESS */ /* Convert YP error number to NSS error number. */ static nss_status_t yperr2nss_tab[] = diff -uNr /home/bms/x/y/papi-1.0_beta.orig/source/libpapi-dynamic/psm.c ./source/libpapi-dynamic/psm.c --- /home/bms/x/y/papi-1.0_beta.orig/source/libpapi-dynamic/psm.c 2006-02-23 19:35:34.000000000 +0000 +++ ./source/libpapi-dynamic/psm.c 2010-01-31 13:52:45.000000000 +0000 @@ -60,7 +60,7 @@ void * psm_sym(service_t *svc, char *name) { - char *error = "invalid input"; + const char *error = "invalid input"; void *func = NULL; if ((svc != NULL) && (svc->so_handle != NULL) && (name != NULL)) { diff -uNr /home/bms/x/y/papi-1.0_beta.orig/source/libpapi-dynamic/service.c ./source/libpapi-dynamic/service.c --- /home/bms/x/y/papi-1.0_beta.orig/source/libpapi-dynamic/service.c 2006-02-23 19:35:34.000000000 +0000 +++ ./source/libpapi-dynamic/service.c 2010-01-31 13:11:35.000000000 +0000 @@ -11,7 +11,9 @@ #include #include #include +#ifdef HAVE_ALLOCA_H #include +#endif #include #include diff -uNr /home/bms/x/y/papi-1.0_beta.orig/source/libpapi-ipp/http-core/md5passwd.c ./source/libpapi-ipp/http-core/md5passwd.c --- /home/bms/x/y/papi-1.0_beta.orig/source/libpapi-ipp/http-core/md5passwd.c 2005-08-29 06:07:20.000000000 +0100 +++ ./source/libpapi-ipp/http-core/md5passwd.c 2010-01-31 13:54:46.000000000 +0000 @@ -35,6 +35,8 @@ * Include necessary headers... */ +#include + #include "http.h" #include "string.h" diff -uNr /home/bms/x/y/papi-1.0_beta.orig/source/libpapi-ipp/service.c ./source/libpapi-ipp/service.c --- /home/bms/x/y/papi-1.0_beta.orig/source/libpapi-ipp/service.c 2006-01-28 07:02:05.000000000 +0000 +++ ./source/libpapi-ipp/service.c 2010-01-31 13:39:58.000000000 +0000 @@ -11,7 +11,9 @@ #include #include #include +#ifdef HAVE_ALLOCA_H #include +#endif #include #include diff -uNr /home/bms/x/y/papi-1.0_beta.orig/source/libpapi-lpd/job.c ./source/libpapi-lpd/job.c --- /home/bms/x/y/papi-1.0_beta.orig/source/libpapi-lpd/job.c 2005-10-31 18:56:45.000000000 +0000 +++ ./source/libpapi-lpd/job.c 2010-01-31 13:31:14.000000000 +0000 @@ -7,7 +7,7 @@ #include #include -#include +#include #include #include #include diff -uNr /home/bms/x/y/papi-1.0_beta.orig/source/libpapi-lpd/library.c ./source/libpapi-lpd/library.c --- /home/bms/x/y/papi-1.0_beta.orig/source/libpapi-lpd/library.c 2005-10-31 18:56:45.000000000 +0000 +++ ./source/libpapi-lpd/library.c 2010-01-31 13:24:20.000000000 +0000 @@ -9,7 +9,9 @@ #include #include #include +#ifdef HAVE_ALLOCA_H #include +#endif #include #include diff -uNr /home/bms/x/y/papi-1.0_beta.orig/source/libpapi-lpd/lpd-cancel.c ./source/libpapi-lpd/lpd-cancel.c --- /home/bms/x/y/papi-1.0_beta.orig/source/libpapi-lpd/lpd-cancel.c 2005-02-26 06:58:42.000000000 +0000 +++ ./source/libpapi-lpd/lpd-cancel.c 2010-01-31 13:32:34.000000000 +0000 @@ -32,7 +32,7 @@ memset(buf, 0, sizeof (buf)); if (fdgets(buf, sizeof (buf), fd) != NULL) { - if (buf[0] == NULL) + if (buf[0] == '\0') status = PAPI_NOT_FOUND; else if (strstr(buf, "permission denied") != NULL) status = PAPI_NOT_AUTHORIZED; diff -uNr /home/bms/x/y/papi-1.0_beta.orig/source/libpapi-lpd/lpd-job.c ./source/libpapi-lpd/lpd-job.c --- /home/bms/x/y/papi-1.0_beta.orig/source/libpapi-lpd/lpd-job.c 2005-02-26 06:58:42.000000000 +0000 +++ ./source/libpapi-lpd/lpd-job.c 2010-01-31 13:31:51.000000000 +0000 @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include #include diff -uNr /home/bms/x/y/papi-1.0_beta.orig/source/libpapi-lpd/lpd-misc.c ./source/libpapi-lpd/lpd-misc.c --- /home/bms/x/y/papi-1.0_beta.orig/source/libpapi-lpd/lpd-misc.c 2005-09-21 20:22:10.000000000 +0100 +++ ./source/libpapi-lpd/lpd-misc.c 2010-01-31 13:34:16.000000000 +0000 @@ -16,8 +16,15 @@ #include #include #include +#ifdef HAVE_WAIT_H #include +#endif +/*#ifdef HAVE_SYS_WAIT_H*/ +#include +/*#endif*/ +#ifdef HAVE_STROPTS_H #include +#endif #include #include @@ -28,7 +35,7 @@ char tmp; int count = 0; - memset(buf, NULL, len); + memset(buf, 0, len); while ((count < len) && (read(fd, &tmp, 1) > 0)) if ((buf[count++] = tmp) == '\n') break; diff -uNr /home/bms/x/y/papi-1.0_beta.orig/source/libpapi-lpd/lpd-port.c ./source/libpapi-lpd/lpd-port.c --- /home/bms/x/y/papi-1.0_beta.orig/source/libpapi-lpd/lpd-port.c 2005-09-21 20:22:22.000000000 +0100 +++ ./source/libpapi-lpd/lpd-port.c 2010-01-31 13:29:02.000000000 +0000 @@ -22,22 +22,35 @@ #include #include #include +#ifdef HAVE_VALUES_H #include +#endif +#ifdef HAVE_STROPTS_H #include /* for sendfd */ +#endif #include /* for sendmsg stuff */ #include +#ifdef HAVE_SYS_SENDFILE_H #include +#endif #include +#ifdef HAVE_ALLOCA_H #include +#endif #ifdef HAVE_PRIV_H #include #endif #include +#include #ifndef JOB_ID_FILE #define JOB_ID_FILE "/var/run/rfc-1179.seq" #endif /* JOB_ID_FILE */ +#ifndef MAXINT +#define MAXINT INT_MAX +#endif + static int sendfd(int sockfd, int fd) { @@ -109,7 +122,7 @@ } /* linux style NULL usage */ - (void) memset((char *)&sin, (int)NULL, sizeof (sin)); + (void) memset((char *)&sin, (int)0, sizeof (sin)); #if defined(HAVE_GETIPNODEBYNAME) && defined(HAVE_RRESVPORT_AF) if ((hp = getipnodebyname(uri->host, AF_INET6, AI_DEFAULT, @@ -381,8 +394,14 @@ if (fd != -1) { /* write the data */ +#ifdef __FreeBSD__ + if (sendfile(sock, fd, off, st.st_size, NULL, NULL, 0) != + st.st_size) + return (-1); +#else if (sendfile(sock, fd, &off, st.st_size) != st.st_size) return (-1); +#endif close(fd); /* request ack/nack after the data transfer */ @@ -502,7 +521,7 @@ errno = err; return (-1); } - if (strcmp(name, "standard input") != NULL) + if (strcmp(name, "standard input") != 0) sent_files++; } diff -uNr /home/bms/x/y/papi-1.0_beta.orig/source/libpapi-lpd/lpd-query.c ./source/libpapi-lpd/lpd-query.c --- /home/bms/x/y/papi-1.0_beta.orig/source/libpapi-lpd/lpd-query.c 2005-10-01 06:49:10.000000000 +0100 +++ ./source/libpapi-lpd/lpd-query.c 2010-01-31 13:33:04.000000000 +0000 @@ -82,7 +82,7 @@ do { q--; } while (isdigit(*q) != 0); /* seperate the name and size */ - *q = NULL; + *q = '\0'; q++; size = atoi(q); diff -uNr /home/bms/x/y/papi-1.0_beta.orig/source/libpapi-lpd/service.c ./source/libpapi-lpd/service.c --- /home/bms/x/y/papi-1.0_beta.orig/source/libpapi-lpd/service.c 2005-10-31 18:56:45.000000000 +0000 +++ ./source/libpapi-lpd/service.c 2010-01-31 13:21:20.000000000 +0000 @@ -9,7 +9,9 @@ #include #include #include +#ifdef HAVE_ALLOCA_H #include +#endif #include #include Files /home/bms/x/y/papi-1.0_beta.orig/source/mod_ipp/.mod_ipp.c.swp and ./source/mod_ipp/.mod_ipp.c.swp differ diff -uNr /home/bms/x/y/papi-1.0_beta.orig/source/mod_ipp/mod_ipp.c ./source/mod_ipp/mod_ipp.c --- /home/bms/x/y/papi-1.0_beta.orig/source/mod_ipp/mod_ipp.c 2006-02-14 06:36:49.000000000 +0000 +++ ./source/mod_ipp/mod_ipp.c 2010-01-31 13:49:30.000000000 +0000 @@ -14,9 +14,13 @@ #include #include #include +#ifdef HAVE_VALUES_H #include +#endif #include +#ifdef HAVE_ALLOCA_H #include +#endif #include "httpd.h" #include "http_config.h" @@ -170,7 +174,7 @@ va_end(args); #ifdef APACHE2 - ap_log_rerror(file, line, level, NULL, r, message); + ap_log_rerror(file, line, level, 0, r, message); #else ap_log_rerror(file, line, level, r, message); #endif @@ -264,6 +268,7 @@ config->default_svc); } +#if defined(sun) /* * For Trusted Solaris, pass the fd number of the socket connection * to the backend so the it can be forwarded to the backend print @@ -272,6 +277,7 @@ */ (void) papiAttributeListAddInteger(&request, PAPI_ATTR_EXCL, "peer-socket", ap_bfileno(r->connection->client, B_RD)); +#endif /* process the request */ status = ipp_process_request(request, &response, read_data, r);