From 3cb17b0fffd74932a2f5a1144a9cecf389fab5ec Mon Sep 17 00:00:00 2001 From: bfernhomberg Date: Fri, 20 Feb 2004 20:53:10 +0000 Subject: [PATCH] Solaris 'compile hell' stuff... --- configure.in | 4 ++-- etc/papd/lp.c | 4 +++- etc/uams/uams_passwd.c | 9 ++++++--- include/atalk/adouble.h | 4 ++-- include/atalk/util.h | 6 +++--- libatalk/dsi/dsi_read.c | 5 ++++- 6 files changed, 20 insertions(+), 12 deletions(-) diff --git a/configure.in b/configure.in index 9074e368..59c7e017 100644 --- a/configure.in +++ b/configure.in @@ -1,4 +1,4 @@ -dnl $Id: configure.in,v 1.179.2.3.2.19 2004-02-14 23:43:47 bfernhomberg Exp $ +dnl $Id: configure.in,v 1.179.2.3.2.20 2004-02-20 20:53:10 bfernhomberg Exp $ dnl configure.in for netatalk AC_INIT(etc/afpd/main.c) @@ -90,7 +90,7 @@ AC_CHECK_HEADER(sys/cdefs.h,, AC_MSG_RESULT([enabling generic cdefs.h from tree]) CFLAGS="-I\$(top_srcdir)/sys/generic $CFLAGS" ) -AC_CHECK_HEADERS(langinfo.h locale.h) +AC_CHECK_HEADERS(langinfo.h locale.h sys/filio.h) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST diff --git a/etc/papd/lp.c b/etc/papd/lp.c index 1cf9ff9c..299b748e 100644 --- a/etc/papd/lp.c +++ b/etc/papd/lp.c @@ -1,5 +1,5 @@ /* - * $Id: lp.c,v 1.14 2002-09-29 23:29:13 sibaz Exp $ + * $Id: lp.c,v 1.14.8.1 2004-02-20 20:53:14 bfernhomberg Exp $ * * Copyright (c) 1990,1994 Regents of The University of Michigan. * All Rights Reserved. See COPYRIGHT. @@ -288,11 +288,13 @@ int lp_init( out, sat ) return( -1 ); } +#ifndef SOLARIS /* flock is unsupported, I doubt this stuff work anyway with newer solaris so ignore for now */ if ( flock( fd, LOCK_EX ) < 0 ) { LOG(log_error, logtype_papd, "lp_init: can't lock .seq" ); spoolerror( out, NULL ); return( -1 ); } +#endif n = 0; if (( len = read( fd, buf, sizeof( buf ))) < 0 ) { diff --git a/etc/uams/uams_passwd.c b/etc/uams/uams_passwd.c index dd0135df..a43a7962 100644 --- a/etc/uams/uams_passwd.c +++ b/etc/uams/uams_passwd.c @@ -1,17 +1,20 @@ /* - * $Id: uams_passwd.c,v 1.19.2.1.2.6 2004-02-14 02:47:15 didg Exp $ + * $Id: uams_passwd.c,v 1.19.2.1.2.7 2004-02-20 20:53:14 bfernhomberg Exp $ * * Copyright (c) 1990,1993 Regents of The University of Michigan. * Copyright (c) 1999 Adrian Sun (asun@u.washington.edu) * All Rights Reserved. See COPYRIGHT. */ -#define _XOPEN_SOURCE 500 /* for crypt() */ - #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ +/* crypt needs _XOPEN_SOURCE 500 at least on BSD, but that breaks Solaris compile */ +#ifndef SOLARIS +#define _XOPEN_SOURCE 500 /* for crypt() */ +#endif + #include #include /* STDC check */ diff --git a/include/atalk/adouble.h b/include/atalk/adouble.h index a9f17bb0..8f137032 100644 --- a/include/atalk/adouble.h +++ b/include/atalk/adouble.h @@ -1,5 +1,5 @@ /* - * $Id: adouble.h,v 1.21.6.11 2004-02-20 20:17:53 didg Exp $ + * $Id: adouble.h,v 1.21.6.12 2004-02-20 20:53:14 bfernhomberg Exp $ * Copyright (c) 1990,1991 Regents of The University of Michigan. * All Rights Reserved. * @@ -46,7 +46,7 @@ #endif #endif -#ifdef HAVE_PREAD +#if defined(HAVE_PREAD) && !defined(SOLARIS) #ifdef _XOPEN_SOURCE #undef _XOPEN_SOURCE #endif diff --git a/include/atalk/util.h b/include/atalk/util.h index 5837942d..3fc9bb05 100644 --- a/include/atalk/util.h +++ b/include/atalk/util.h @@ -1,5 +1,5 @@ /* - * $Id: util.h,v 1.7.10.3 2004-02-14 00:30:52 didg Exp $ + * $Id: util.h,v 1.7.10.4 2004-02-20 20:53:15 bfernhomberg Exp $ */ #ifndef _ATALK_UTIL_H @@ -35,11 +35,11 @@ extern void fault_setup __P((void (*fn)(void *))); #define server_unlock(x) (unlink(x)) #ifndef HAVE_STRLCPY -size_t strlcpy(char *d, const char *s, size_t bufsize); +size_t strlcpy __P((char *, const char *, size_t)); #endif #ifndef HAVE_STRLCAT -size_t strlcat(char *d, const char *s, size_t bufsize); +size_t strlcat __P((char *, const char *, size_t)); #endif #ifndef HAVE_DLFCN_H diff --git a/libatalk/dsi/dsi_read.c b/libatalk/dsi/dsi_read.c index bd04aa7e..2d4c7c13 100644 --- a/libatalk/dsi/dsi_read.c +++ b/libatalk/dsi/dsi_read.c @@ -1,5 +1,5 @@ /* - * $Id: dsi_read.c,v 1.3.14.2 2004-02-10 10:21:50 didg Exp $ + * $Id: dsi_read.c,v 1.3.14.3 2004-02-20 20:53:15 bfernhomberg Exp $ * * Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu) * All rights reserved. See COPYRIGHT. @@ -17,6 +17,9 @@ #include #include #include +#ifdef HAVE_SYS_FILIO_H +#include +#endif #include #include -- 2.39.2