Date: Sat, 6 Dec 1997 21:56:21 +0000 (GMT) From: Terry Lambert <tlambert@primenet.com> To: karl@mcs.net (Karl Denninger) Cc: current@freebsd.org, Jim.Zelenka@cs.cmu.edu Subject: Diffs to support RAIDframe on FreeBSD Message-ID: <199712062156.OAA09278@usr02.primenet.com> In-Reply-To: <19971205163442.52313@mcs.net> from "Karl Denninger" at Dec 5, 97 04:34:42 pm
next in thread | previous in thread | raw e-mail | index | archive | help
> > > Anyone gotten this to build and link on FreeBSD? > > > > URL, please. AltaVista has never heard of it. > > http://www.pdl.cs.cmu.edu/RAIDframe/ This was trivial. Here are the Diffs for FreeBSD. Jim Zelenka: I have added you to the people receiving this so you can integrate them into the RAIDFrame distribution itself. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. =============================================================================== *** SAVE/itomf Tue Nov 5 21:21:05 1996 --- itomf Sat Dec 6 21:46:19 1997 *************** *** 50,55 **** --- 50,57 ---- imake -I./config -I$X11CFGDIR -DUseInstalled -DTOPDIR=. -DSCD_SRCTOP=`pwd` -DRF_ITOMF=1 -DRF_X11CONFIGDIR=$X11CFGDIR -DRF_MAKEDEPEND=$MAKEDEPEND elif [ $SYS = "NetBSD" ]; then imake -I./config -I$X11CFGDIR -DUseInstalled -DTOPDIR=. -DSCD_SRCTOP=`pwd` -DRF_ITOMF=1 -DRF_X11CONFIGDIR=$X11CFGDIR -DRF_MAKEDEPEND=$MAKEDEPEND + elif [ $SYS = "FreeBSD" ]; then + imake -v -I./config -I$X11CFGDIR -DUseInstalled -DTOPDIR=. -DSCD_SRCTOP=`pwd` -DRF_ITOMF=1 -DRF_X11CONFIGDIR=$X11CFGDIR -DRF_MAKEDEPEND=$MAKEDEPEND elif [ $SYS = "IRIX" ]; then imake -I./config -I$X11CFGDIR -DUseInstalled -DTOPDIR=. -DSCD_SRCTOP=`pwd` -DRF_ITOMF=1 -DRF_X11CONFIGDIR=$X11CFGDIR -DRF_MAKEDEPEND=$MAKEDEPEND elif [ $SYS = "OSF1" ]; then *************** *** 63,69 **** elif [ $SYS = "HP-UX" ]; then imake -I./config -I$X11CFGDIR -DUseInstalled -DTOPDIR=. -DSCD_SRCTOP=`pwd` -DRF_ITOMF=1 -DRF_X11CONFIGDIR=$X11CFGDIR -DRF_MAKEDEPEND=$MAKEDEPEND else ! echo "Unknown system type." exit 1 fi make Makefiles --- 65,71 ---- elif [ $SYS = "HP-UX" ]; then imake -I./config -I$X11CFGDIR -DUseInstalled -DTOPDIR=. -DSCD_SRCTOP=`pwd` -DRF_ITOMF=1 -DRF_X11CONFIGDIR=$X11CFGDIR -DRF_MAKEDEPEND=$MAKEDEPEND else ! echo "Unknown system type ($SYS)." exit 1 fi make Makefiles *** SAVE/config/RAIDframe.tmpl Sat Dec 6 21:13:15 1997 --- config/RAIDframe.tmpl Sat Dec 6 21:47:33 1997 *************** *** 36,41 **** --- 36,48 ---- #define RF_MakeSubdirs(_dirs_) MakeSubdirs(_dirs_) #endif /* AIXArchitecture && (RF_OSMajorVersion == 4) */ + #ifdef FreeBSDArchitecture + #ifdef i386Architecture + ARCHDEFINES = -DFREEBSD -DFREEBSD_I386 + #endif /* i386Architecture */ + #define RF_ROLLED_SRCTOP 1 + #endif /* FreeBSDArchitecture */ + #ifdef NetBSDArchitecture #ifdef i386Architecture ARCHDEFINES = -DNETBSD -DNETBSD_I386 *** SAVE/config/RAIDframe_site.def Sat Dec 6 21:13:15 1997 --- config/RAIDframe_site.def Sat Dec 6 21:16:44 1997 *************** *** 60,70 **** ARCHLIBS= #endif /* OSF1 && AlphaArchitecture */ ! #if defined(NetBSDArchitecture) && defined(AlphaArchitecture) CC = gcc CDEBUGFLAGS = -g3 -O2 ARCHLIBS= ! #endif /* NetBSDArchitecture && AlphaArchitecture */ #ifdef AIXArchitecture #if RF_OSMajorVersion == 4 --- 60,70 ---- ARCHLIBS= #endif /* OSF1 && AlphaArchitecture */ ! #if (defined(NetBSDArchitecture) || defined(FreeBSDArchitecture)) && defined(AlphaArchitecture) CC = gcc CDEBUGFLAGS = -g3 -O2 ARCHLIBS= ! #endif /* (NetBSDArchitecture || FreeBSDArchitecture) && AlphaArchitecture */ #ifdef AIXArchitecture #if RF_OSMajorVersion == 4 *** SAVE/lib/rf_copyback.c Sat Dec 6 21:22:18 1997 --- lib/rf_copyback.c Sat Dec 6 21:24:28 1997 *************** *** 145,150 **** --- 145,153 ---- #include "rf_types.h" #include <sys/time.h> #ifndef LINUX + #ifdef FREEBSD + #include <sys/param.h> /* MAXPHYS*/ + #endif /* FREEBSD*/ #include <sys/buf.h> #endif /* !LINUX */ #include "rf_raid.h" *** SAVE/lib/rf_types.h Sat Dec 6 21:26:08 1997 --- lib/rf_types.h Sat Dec 6 21:28:11 1997 *************** *** 328,334 **** #define RF_LONGSHIFT 2 #endif /* sun */ ! #if defined(NETBSD_I386) || defined(LINUX_I386) #define RF_IS_BIG_ENDIAN 0 typedef char RF_int8; typedef unsigned char RF_uint8; --- 328,334 ---- #define RF_LONGSHIFT 2 #endif /* sun */ ! #if defined(FREEBSD_I386) || defined(NETBSD_I386) || defined(LINUX_I386) #define RF_IS_BIG_ENDIAN 0 typedef char RF_int8; typedef unsigned char RF_uint8; *************** *** 339,345 **** typedef long long RF_int64; typedef unsigned long long RF_uint64; #define RF_LONGSHIFT 2 ! #endif /* NETBSD_I386 || LINUX_I386 */ #if defined(mips) && !defined(SGI) #define RF_IS_BIG_ENDIAN 0 --- 339,345 ---- typedef long long RF_int64; typedef unsigned long long RF_uint64; #define RF_LONGSHIFT 2 ! #endif /* FREEBSD_I386 || NETBSD_I386 || LINUX_I386 */ #if defined(mips) && !defined(SGI) #define RF_IS_BIG_ENDIAN 0 *** SAVE/lib/rf_sys.c Sat Dec 6 21:26:08 1997 --- lib/rf_sys.c Sat Dec 6 21:27:25 1997 *************** *** 39,47 **** #include <unistd.h> #endif /* !KERNEL */ #include <sys/param.h> ! #if !defined(sun) && !defined(NETBSD) && !defined(LINUX) && (!defined(MACH) || defined(__osf__)) #include <sys/sysinfo.h> ! #endif /* !sun !NETBSD && !LINUX && (!MACH || __osf__) */ #include <sys/time.h> #ifdef __osf__ #include <machine/rpb.h> --- 39,47 ---- #include <unistd.h> #endif /* !KERNEL */ #include <sys/param.h> ! #if !defined(sun) && !defined(FREEBSD) && !defined(NETBSD) && !defined(LINUX) && (!defined(MACH) || defined(__osf__)) #include <sys/sysinfo.h> ! #endif /* !sun !FREEBSD !NETBSD && !LINUX && (!MACH || __osf__) */ #include <sys/time.h> #ifdef __osf__ #include <machine/rpb.h> *** SAVE/lib/rf_etimer.h Sat Dec 6 21:26:34 1997 --- lib/rf_etimer.h Sat Dec 6 21:28:43 1997 *************** *** 254,260 **** /* * XXX investigate better timing for these */ ! #if defined(hpux) || defined(sun) || defined(NETBSD_I386) || defined(ultrix) || defined(LINUX_I386) || defined(IRIX) || (defined(MACH) && !defined(__osf__)) #include <sys/time.h> #define RF_USEC_PER_SEC 1000000 --- 254,260 ---- /* * XXX investigate better timing for these */ ! #if defined(hpux) || defined(sun) || defined(FREEBSD_I386) || defined(NETBSD_I386) || defined(ultrix) || defined(LINUX_I386) || defined(IRIX) || (defined(MACH) && !defined(__osf__)) #include <sys/time.h> #define RF_USEC_PER_SEC 1000000 *************** *** 288,293 **** #define RF_ETIMER_VAL_US(_t_) (((_t_).elapsed.tv_sec*RF_USEC_PER_SEC)+(_t_).elapsed.tv_usec) #define RF_ETIMER_VAL_MS(_t_) (((_t_).elapsed.tv_sec*RF_MSEC_PER_SEC)+((_t_).elapsed.tv_usec/1000)) ! #endif /* hpux || sun || NETBSD_I386 || ultrix || LINUX_I386 || IRIX || (MACH && !__osf__) */ #endif /* !_RF__RF_TIMER_H_ */ --- 288,293 ---- #define RF_ETIMER_VAL_US(_t_) (((_t_).elapsed.tv_sec*RF_USEC_PER_SEC)+(_t_).elapsed.tv_usec) #define RF_ETIMER_VAL_MS(_t_) (((_t_).elapsed.tv_sec*RF_MSEC_PER_SEC)+((_t_).elapsed.tv_usec/1000)) ! #endif /* hpux || sun || FREEBSD_I386 || NETBSD_I386 || ultrix || LINUX_I386 || IRIX || (MACH && !__osf__) */ #endif /* !_RF__RF_TIMER_H_ */ *** SAVE/lib/rf_general.h Sat Dec 6 21:38:19 1997 --- lib/rf_general.h Sat Dec 6 21:38:31 1997 *************** *** 213,218 **** --- 213,225 ---- #endif /* !NBPG */ #endif /* sun */ + #ifdef FREEBSD + #include <sys/param.h> + #ifndef NBPG + #define NBPG PAGE_SIZE + #endif /* !NBPG*/ + #endif /* FREEBSD*/ + #ifdef IRIX #include <sys/tfp.h> #define NBPG _PAGESZ *** SAVE/lib/rf_reconstruct.c Sat Dec 6 21:39:56 1997 --- lib/rf_reconstruct.c Sat Dec 6 21:41:18 1997 *************** *** 213,218 **** --- 213,221 ---- #include "rf_types.h" #include <sys/time.h> #ifndef LINUX + #ifdef FREEBSD + #include <sys/param.h> /* MAXPHYS*/ + #endif /* FREEBSD*/ #include <sys/buf.h> #endif /* !LINUX */ #include <sys/errno.h> ===============================================================================
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199712062156.OAA09278>