From db4b41fca9bba653d1377df8d17e6ab9b44a835a Mon Sep 17 00:00:00 2001 From: Chaskiel M Grundman Date: Thu, 20 Sep 2001 21:12:33 +0000 Subject: [PATCH] STABLE12-darwin-optimize-and-fix-dirpath-20010920 apply optimization and dirpath mods (for darwin/macosx with same binaries) to stable also (cherry picked from commit 9175ce36fbd575bf6a9f146a45930c6f8e580584) --- src/config/Makefile.ppc_darwin_13.in | 6 +++--- src/libafs/MakefileProto.DARWIN.in | 8 +++----- src/util/dirpath.c | 5 +++++ src/util/dirpath.hin | 1 + 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/config/Makefile.ppc_darwin_13.in b/src/config/Makefile.ppc_darwin_13.in index be76178b7..2559ee45c 100644 --- a/src/config/Makefile.ppc_darwin_13.in +++ b/src/config/Makefile.ppc_darwin_13.in @@ -5,14 +5,14 @@ AFS_OSTYPE = DARWIN # # # compilation and link editor flags -XCFLAGS=-traditional-cpp +XCFLAGS=-no-precomp #MT_CFLAGS=-D_REENTRANT -DAFS_PTHREAD_ENV ${XCFLAGS} #MT_CC=cc KROOT= KINCLUDES=-I$(KROOT)/System/Library/Frameworks/Kernel.framework/Headers #SHARE_LDFLAGS = -LWP_OPTMZ=-g -OPTMZ=-g +LWP_OPTMZ=-O2 +OPTMZ=-O2 DBG=-g REGEX_OBJ=regex.o diff --git a/src/libafs/MakefileProto.DARWIN.in b/src/libafs/MakefileProto.DARWIN.in index 2140b840c..4d4a94904 100644 --- a/src/libafs/MakefileProto.DARWIN.in +++ b/src/libafs/MakefileProto.DARWIN.in @@ -47,14 +47,12 @@ AFS_OS_NONFSOBJS = osi_vfsops.o # System specific build commands and flags KDEFS= -DBUG = -g +DBUG = DEFINES= -D_KERNEL -DKERNEL -DKERNEL_PRIVATE -DDIAGNOSTIC -DUSE_SELECT -DMACH_USER_API -DMACH_KERNEL -OPTF=${OPT} -OPTF2=${OPT2} -KOPTS=-traditional-cpp -static -fno-common -finline -fno-keep-inline-functions -force_cpusubtype_ALL -msoft-float -mlong-branch +KOPTS=-no-precomp -static -fno-common -finline -fno-keep-inline-functions -force_cpusubtype_ALL -msoft-float -mlong-branch #CFLAGS=-Werror-implicit-function-declaration -I. -I.. ${KINCLUDES} $(DEFINES) $(KDEFS) $(KOPTS) ${DBUG} #CFLAGS=-framework Kernel -I. -I.. ${KINCLUDES} $(DEFINES) $(KDEFS) $(KOPTS) ${DBUG} -CFLAGS=-I. -I.. -I${TOP_SRCDIR}/config ${KINCLUDES} $(DEFINES) $(KDEFS) $(KOPTS) ${DBUG} +CFLAGS=-I. -I.. -I${TOP_SRCDIR}/config ${KINCLUDES} $(DEFINES) $(KDEFS) $(KOPTS) ${DBUG} ${OPTMZ} # Name of directory to hold object files and libraries. diff --git a/src/util/dirpath.c b/src/util/dirpath.c index 1bb27b307..ec8374d65 100644 --- a/src/util/dirpath.c +++ b/src/util/dirpath.c @@ -222,6 +222,11 @@ static void initDirPathArray(void) strcpy(dirPathArray[AFSDIR_CLIENT_VICE_DIRPATH_ID], afsClntDirPath); pathp = dirPathArray[AFSDIR_CLIENT_ETC_DIRPATH_ID]; +#ifdef AFS_DARWIN_ENV + if (access(AFSDIR_ALTERNATE_CLIENT_ETC_DIR, F_OK) == 0) + AFSDIR_CLIENT_DIRPATH(pathp, AFSDIR_ALTERNATE_CLIENT_ETC_DIR); + else +#endif AFSDIR_CLIENT_DIRPATH(pathp, AFSDIR_CLIENT_ETC_DIR); #endif /* AFS_NT40_ENV */ diff --git a/src/util/dirpath.hin b/src/util/dirpath.hin index 3f3e67aaa..a4efdb43d 100644 --- a/src/util/dirpath.hin +++ b/src/util/dirpath.hin @@ -173,6 +173,7 @@ ConstructLocalLogPath(const char *cpath, #define AFSDIR_CANONICAL_CLIENT_VICE_DIRPATH "/usr/vice" #ifdef AFS_DARWIN_ENV #define AFSDIR_ALTERNATE_CLIENT_VICE_DIRPATH "/var/db/openafs" +#define AFSDIR_ALTERNATE_CLIENT_ETC_DIR "/var/db/openafs/etc" #endif #define AFSDIR_CANONICAL_SERVER_BIN_DIRPATH \ -- 2.39.5