From 5dd82b20cf15d2badcead9d218237d87325c7f69 Mon Sep 17 00:00:00 2001 From: srittau Date: Thu, 17 Jan 2002 07:11:12 +0000 Subject: [PATCH] More Solaris cleanups for 64bit compatibility. --- configure.in | 3 ++- sys/solaris/Makefile.am | 2 +- .../{Makefile.kernel => Makefile.kernel.in} | 27 +++++++++++-------- sys/solaris/if.c | 12 +++++++++ sys/solaris/ioc.c | 11 ++++++++ sys/solaris/sock.c | 11 ++++++++ 6 files changed, 53 insertions(+), 13 deletions(-) rename sys/solaris/{Makefile.kernel => Makefile.kernel.in} (93%) diff --git a/configure.in b/configure.in index 526ca8a2..40f9c0fb 100644 --- a/configure.in +++ b/configure.in @@ -1,4 +1,4 @@ -dnl $Id: configure.in,v 1.150 2002-01-17 05:59:25 srittau Exp $ +dnl $Id: configure.in,v 1.151 2002-01-17 07:11:12 srittau Exp $ dnl configure.in for netatalk AC_INIT(bin/adv1tov2/adv1tov2.c) @@ -694,6 +694,7 @@ AC_OUTPUT([Makefile sys/netbsd/Makefile sys/netbsd/netatalk/Makefile sys/solaris/Makefile + sys/solaris/Makefile.kernel sys/sunos/Makefile sys/ultrix/Makefile ], diff --git a/sys/solaris/Makefile.am b/sys/solaris/Makefile.am index cec4e8ce..97dd2f6a 100644 --- a/sys/solaris/Makefile.am +++ b/sys/solaris/Makefile.am @@ -1,5 +1,5 @@ EXTRA_DIST = \ - Makefile.kernel \ + Makefile.kernel.in \ aarp.c \ ddp.c \ ddp.conf \ diff --git a/sys/solaris/Makefile.kernel b/sys/solaris/Makefile.kernel.in similarity index 93% rename from sys/solaris/Makefile.kernel rename to sys/solaris/Makefile.kernel.in index 611afd4b..fd8a777c 100644 --- a/sys/solaris/Makefile.kernel +++ b/sys/solaris/Makefile.kernel.in @@ -1,5 +1,8 @@ # Solaris specific defines, passed to subdirectories. # To use Sun CC, uncomment the CC and KFLAGS variables. +# +# $Id: Makefile.kernel.in,v 1.1 2002-01-17 07:11:13 srittau Exp $ + # uncomment for 64-bit sparc kernel #SPARC64=true @@ -8,17 +11,20 @@ # for solaris 2.5.1 USE_CRYPTLIB=no -# use gcc (gcc-2.95 on 64-bit sparc) -CC= gcc -LD= ld -KCFLAGS= -D_KERNEL -Wall -Wstrict-prototypes ${KGCCFLAGS} # -mcpu=ultrasparc -OPTOPTS= -O -CSHAREDFLAGS= -fPIC -LDSHARED= ${CC} -LDSHAREDFLAGS= -shared +INSTALL = @INSTALL@ + +CC = @CC@ +LD = @LD@ + +# use gcc +KCFLAGS = -D_KERNEL -Wall -Wstrict-prototypes ${KGCCFLAGS} # -mcpu=ultrasparc +OPTOPTS = -O +CSHAREDFLAGS = -fPIC +LDSHARED = ${CC} +LDSHAREDFLAGS = -shared +# LDSHAREDFLAGS = -shared -64 # use Sun CC (for a 64-bit kernel, uncomment " -xarch=v9 -xregs=no%appl ") -#CC= cc #KCFLAGS= -D_KERNEL # -xarch=v9 -xregs=no%appl #OPTOPTS= -fast -xO5 -xstrconst #CSHAREDFLAGS= -KPIC @@ -31,9 +37,8 @@ LIBSHARED= -ldl # -D_ISOC9X_SOURCE is handled by OSVERSION. basically, it's not needed # with 2.5.1. # add -DHAVE_IFNAMEINDEX if you're using solaris 8. -DEFS= -DNO_STRUCT_TM_GMTOFF -D__svr4__ -DSOLARIS -I../../sys/generic \ +DEFS= -DNO_STRUCT_TM_GMTOFF -DHAVE_IFNAMEINDEX -D__svr4__ -DSOLARIS -I../../sys/generic \ -I.. ${OSDEFS} ${MACHINEDEFS} -INSTALL= /usr/ucb/install AFPLIBS= ADDLIBS= -lsocket -lnsl diff --git a/sys/solaris/if.c b/sys/solaris/if.c index 810e7485..922c6023 100644 --- a/sys/solaris/if.c +++ b/sys/solaris/if.c @@ -1,3 +1,10 @@ +/* $Id: if.c,v 1.2 2002-01-17 07:11:13 srittau Exp $ + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif /* HAVE_CONFIG_H */ + #include #include #include @@ -11,7 +18,12 @@ #include #include #include + +#ifdef STDC_HEADERS +#include +#else #include +#endif #include #include diff --git a/sys/solaris/ioc.c b/sys/solaris/ioc.c index 936336fe..84b15861 100644 --- a/sys/solaris/ioc.c +++ b/sys/solaris/ioc.c @@ -1,8 +1,19 @@ +/* $Id: ioc.c,v 1.2 2002-01-17 07:11:13 srittau Exp $ + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif /* HAVE_CONFIG_H */ + #include #include #include +#ifdef STDC_HEADERS +#include +#else #include +#endif #include "ioc.h" diff --git a/sys/solaris/sock.c b/sys/solaris/sock.c index 2c197993..0a3fb799 100644 --- a/sys/solaris/sock.c +++ b/sys/solaris/sock.c @@ -1,3 +1,10 @@ +/* $Id: sock.c,v 1.2 2002-01-17 07:11:13 srittau Exp $ + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif /* HAVE_CONFIG_H */ + #include #include #include @@ -8,7 +15,11 @@ #include #include +#ifdef STDC_HEADERS +#include +#else #include +#endif #include -- 2.39.2