From: Derrick Brashear Date: Sun, 22 Apr 2001 20:37:33 +0000 (+0000) Subject: linux-bridge-to-deal-with-redhat71-in-pre-autoconf-days-20010422 X-Git-Tag: openafs-stable-1_1_0~185 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=dc4e0286f6548b855eb62b5141c3225f4e080aca;p=packages%2Fo%2Fopenafs.git linux-bridge-to-deal-with-redhat71-in-pre-autoconf-days-20010422 Kinda crappy but it will suffice for now --- diff --git a/src/libafs/Makefile.extradefs b/src/libafs/Makefile.extradefs new file mode 100644 index 000000000..1830f80d6 --- /dev/null +++ b/src/libafs/Makefile.extradefs @@ -0,0 +1,8 @@ +# Copyright 2000, International Business Machines Corporation and others. +# All Rights Reserved. +# +# This software has been released under the terms of the IBM Public +# License. For details, see the LICENSE file in the top-level source +# directory or online at http://www.openafs.org/dl/license10.html + +#Placeholder for extra definitions diff --git a/src/libafs/MakefileProto.LINUX b/src/libafs/MakefileProto.LINUX index 10bfdf87a..fec7620db 100644 --- a/src/libafs/MakefileProto.LINUX +++ b/src/libafs/MakefileProto.LINUX @@ -40,7 +40,7 @@ LD = ld CCFLAGS = -O2 -fomit-frame-pointer \ -fno-strength-reduce -pipe -march=i486 -malign-loops=2 -malign-jumps=2 \ -malign-functions=2 -DEFINES = -D__KERNEL__ -DCPU=586 -DKERNEL -D_KERNEL -DMODULE ${SMP_DEF} +DEFINES = -D__KERNEL__ -DCPU=586 -DKERNEL -D_KERNEL -DMODULE ${SMP_DEF} ${KDEFINES} CCFLAGS = -O2 -fomit-frame-pointer -fno-strength-reduce -pipe -mno-fp-regs -ffixed-8 DEFINES = -D__KERNEL__ -DKERNEL -D_KERNEL -DMODULE ${SMP_DEF} @@ -73,6 +73,9 @@ CFLAGS = $(CCFLAGS) $(DEFINES) $(INCLUDES) KOBJ = MODLOAD MPS = MP SP +# To pick up anything we might have missed +include Makefile.extradefs + # COMPDIRS is called in Makefile.common to do the actual builds. COMPDIRS=linux_compdirs @@ -88,6 +91,9 @@ setup: mkdir -p $${KDIR}; \ ln -fs ../Makefile $${KDIR}/Makefile ; \ ln -fs ../Makefile.common $${KDIR}/Makefile.common; \ + + sh ./redhat.sh ${LINUX_VERS} $${KDIR}/Makefile.extradefs; \ + done \ done diff --git a/src/libafs/redhat.sh b/src/libafs/redhat.sh new file mode 100755 index 000000000..0d35c2a09 --- /dev/null +++ b/src/libafs/redhat.sh @@ -0,0 +1,19 @@ +#!/bin/sh +# This is a bridge script until we take care of tightly linking Linux inode +# internals to AFS vnode internals + +IBYTES="" +SETATTR="" + +grep i_bytes /lib/modules/$1/build/include/linux/fs.h > /dev/null +if [ $? = 0 ]; then + IBYTES="-DSTRUCT_INODE_HAS_I_BYTES=1" +fi +grep "extern int inode_setattr" /lib/modules/$1/build/include/linux/fs.h > /dev/null +if [ $? = 0 ]; then + SETATTR="-DINODE_SETATTR_NOT_VOID=1" +fi + +/bin/rm $2 +echo "KDEFINES = ${IBYTES} ${SETATTR}" > $2 +exit 0