]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
MacOS 10.6 support update
authorDerrick Brashear <shadow@dementia.org>
Wed, 15 Jul 2009 18:57:56 +0000 (14:57 -0400)
committerDerrick Brashear <shadow|account-1000005@unknown>
Fri, 28 Aug 2009 04:49:47 +0000 (21:49 -0700)
Make things build on MacOS 10.6 again. Don't break 10.5 build.
Fix an error in the MacOS port which was left from previous head.

Reviewed-on: http://gerrit.openafs.org/96
Verified-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 1d1ae6195bd03c4348a57914cf892e06b507d855)
Reviewed-on: http://gerrit.openafs.org/355
Tested-by: Derrick Brashear <shadow@dementia.org>
18 files changed:
acinclude.m4
src/afsd/afsd.c
src/cf/osconf.m4
src/config/afs_sysnames.h
src/config/param.x86_darwin_100.h
src/des/conf-darwin.h
src/des/make_p.c
src/des/misc.c
src/gtx/curseswindows.c
src/libafs/MakefileProto.DARWIN.in
src/lwp/Makefile.in
src/lwp/process.amd64.s
src/pam/afs_auth.c
src/pam/afs_password.c
src/pam/afs_setcred.c
src/ptserver/Makefile.in
src/usd/usd_file.c
src/util/pthread_glock.c

index e0f51da931e0814cc93db171932e7678a8136ba1..f3a90eafe1a65efe0b840f684fdc95348b92a520 100644 (file)
@@ -550,6 +550,9 @@ else
                i386-apple-darwin9.*)
                        AFS_SYSNAME="x86_darwin_90"
                        ;;
+               i?86-apple-darwin10.*)
+                       AFS_SYSNAME="x86_darwin_100"
+                       ;;
                sparc-sun-solaris2.5*)
                        AFS_SYSNAME="sun4x_55"
                        enable_login="yes"
index d4454f667161ba52d119ee3e2d181985ed731709..b469efc3aa5b822846fd0404cb933a3f5f35d108 100644 (file)
@@ -162,12 +162,13 @@ void set_staticaddrs(void);
 #include <sys/ioctl.h>
 #endif
 #include <mach/mach.h>
+#ifndef AFS_DARWIN100_ENV
 /* Symbols from the DiskArbitration framework */
 kern_return_t DiskArbStart(mach_port_t *);
 kern_return_t DiskArbDiskAppearedWithMountpointPing_auto(char *, unsigned int,
                                                         char *);
 #define DISK_ARB_NETWORK_DISK_FLAG 8
-
+#endif
 #include <mach/mach_port.h>
 #include <mach/mach_interface.h>
 #include <mach/mach_init.h>
@@ -2564,6 +2565,7 @@ HandleMTab()
 #endif /* AFS_SUN5_ENV */
 #endif /* unreasonable systems */
 #ifdef AFS_DARWIN_ENV
+#ifndef AFS_DARWIN100_ENV
     mach_port_t diskarb_port;
     kern_return_t status;
 
@@ -2576,6 +2578,7 @@ HandleMTab()
     }
 
     return status;
+#endif
 #endif /* AFS_DARWIN_ENV */
     return 0;
 }
index 361c0b5abcb5bfe34600aca3f6813c22217d5dda..96b81e5fb5958e754853b0613e374caa4dfc78c0 100644 (file)
@@ -548,6 +548,24 @@ case $AFS_SYSNAME in
                RANLIB="ranlib -c"
                ;;
 
+       *_darwin_100)
+               AFSD_LDFLAGS="-F/System/Library/PrivateFrameworks -framework DiskArbitration -framework SystemConfiguration -framework IOKit -framework CoreFoundation"
+               LEX="lex -l"
+               MT_CFLAGS='-DAFS_PTHREAD_ENV -D_REENTRANT ${XCFLAGS} ${ARCHFLAGS}'
+               KROOT=
+               KINCLUDES='-I$(KROOT)/System/Library/Frameworks/Kernel.framework/Headers'
+               LD="cc"
+               KERN_OPTMZ="-Os"
+               LWP_OPTMZ="-Os"
+               OPTMZ="-Os"
+               REGEX_OBJ="regex.o"
+               TXLIBS="-lncurses"
+               EXTRA_VLIBOBJS="fstab.o"
+               SHLIB_LINKER="${MT_CC} -dynamiclib"
+               SHLIB_SUFFIX="dylib"
+               RANLIB="ranlib -c"
+               ;;
+
        ppc_linux*)
                KERN_OPTMZ=-O2
                LEX="flex -l"
index 5ccbd2897117fa3349381008419b200423b6da66..9468922431dc918a243d92eec24e7c4607ab4d57 100644 (file)
 #define SYS_NAME_ID_x86_darwin_80        509
 #define SYS_NAME_ID_ppc_darwin_90        510
 #define SYS_NAME_ID_x86_darwin_90        511
+#define SYS_NAME_ID_ppc_darwin_100       512
+#define SYS_NAME_ID_ppc64_darwin_100     513
+#define SYS_NAME_ID_x86_darwin_100       514
+#define SYS_NAME_ID_amd64_darwin_100     515
 
 #define SYS_NAME_ID_next_mach20                 601
 #define SYS_NAME_ID_next_mach30                 602
index 49cdd44ba994269c9e1f68609bb12a8bbffe5b6c..de93901399f516500df4305217c4edb1f90a08b0 100644 (file)
@@ -10,7 +10,7 @@
 #define AFS_64BIT_IOPS_ENV     1
 #if defined(__ppc__)
 #define AFS_PPC_ENV            1
-#elif defined(__i386__)
+#elif defined(__i386__) || defined(__amd64__)
 #define AFS_X86_ENV            1
 #else
 #error Unsupported architecture
 #define SYS_NAME               "ppc_darwin_100"
 #define SYS_NAME_ID            SYS_NAME_ID_ppc_darwin_100
 #define AFSBIG_ENDIAN          1
-#elif defined(__i386__)
+#elif defined(__ppc64__)
+#define sys_ppc_darwin_12      1
+#define sys_ppc_darwin_13      1
+#define sys_ppc_darwin_14      1
+#define sys_ppc_darwin_60      1
+#define sys_ppc_darwin_70      1
+#define sys_ppc_darwin_80      1
+#define sys_ppc_darwin_90      1
+#define sys_ppc_darwin_100     1
+#define sys_ppc64_darwin_100   1
+#define SYS_NAME               "ppc64_darwin_100"
+#define SYS_NAME_ID            SYS_NAME_ID_ppc64_darwin_100
+#define AFSBIG_ENDIAN          1
+#elif defined(__i386__) 
 #define sys_x86_darwin_12      1
 #define sys_x86_darwin_13      1
 #define sys_x86_darwin_14      1
 #define SYS_NAME               "x86_darwin_100"
 #define SYS_NAME_ID            SYS_NAME_ID_x86_darwin_100
 #define AFSLITTLE_ENDIAN       1
+#elif defined(__amd64__) 
+#define sys_x86_darwin_12      1
+#define sys_x86_darwin_13      1
+#define sys_x86_darwin_14      1
+#define sys_x86_darwin_60      1
+#define sys_x86_darwin_70      1
+#define sys_x86_darwin_80      1
+#define sys_x86_darwin_90      1
+#define sys_x86_darwin_100     1
+#define sys_amd64_darwin_100   1
+#define SYS_NAME               "amd64_darwin_100"
+#define SYS_NAME_ID            SYS_NAME_ID_amd64_darwin_100
+#define AFSLITTLE_ENDIAN       1
 #else
 #error Unsupported architecture
 #endif
 #define AFS_64BIT_ENV           1      /* Defines afs_int32 as int, not long. */
 #if defined(__ppc__)
 #define AFS_PPC_ENV            1
-#elif defined(__i386__)
+#elif defined(__i386__) || defined(__amd64__)
 #define AFS_X86_ENV            1
 #else
 #error Unsupported architecture
 #define SYS_NAME               "x86_darwin_100"
 #define SYS_NAME_ID            SYS_NAME_ID_x86_darwin_100
 #define AFSLITTLE_ENDIAN       1
+#elif defined(__amd64__)
+#define sys_x86_darwin_12      1
+#define sys_x86_darwin_13      1
+#define sys_x86_darwin_14      1
+#define sys_x86_darwin_60      1
+#define sys_x86_darwin_70      1
+#define sys_x86_darwin_80      1
+#define sys_x86_darwin_100     1
+#define sys_amd64_darwin_100   1
+#define SYS_NAME               "amd64_darwin_100"
+#define SYS_NAME_ID            SYS_NAME_ID_amd64_darwin_100
+#define AFSLITTLE_ENDIAN       1
 #else
 #error Unsupported architecture
 #endif
index 2bf8e1f9820723114f17f968c609dde067b136de..f686e4660ee94c5347058c0b419dc8f8b5178d65 100644 (file)
@@ -1,9 +1,9 @@
 #define BITS32
 #define BIG
 #undef BSDUNIX
-#if defined(__ppc__)
+#if defined(__ppc__) || defined(__ppc64__)
 #define MSBFIRST
-#elif defined(__i386__)
+#elif defined(__i386__) || defined(__amd64__)
 #define LSBFIRST
 #else
 #error "MSBFIRST or LSBFIRST undefined"
index c4dd119efdbaadc302ab611627c5a2bc6b6791b1..1e61e483ac3ec11e52479c12ba8e5039d3f193b7 100644 (file)
@@ -38,12 +38,12 @@ gen(FILE * stream)
     fprintf(stream, "    P_temp_p = (unsigned char *) &P_temp;\n");
 
 #ifdef AFS_DARWIN80_ENV
-    fprintf(stream, "#if defined(__i386__)\n");
+    fprintf(stream, "#if defined(__i386__) || defined(__amd64__)\n");
     fprintf(stream, "    R2 = P_prime[0][*P_temp_p++];\n");
     fprintf(stream, "    R2 |= P_prime[1][*P_temp_p++];\n");
     fprintf(stream, "    R2 |= P_prime[2][*P_temp_p++];\n");
     fprintf(stream, "    R2 |= P_prime[3][*P_temp_p];\n");
-    fprintf(stream, "#elif defined(__ppc__)\n");
+    fprintf(stream, "#elif defined(__ppc__) || defined(__ppc64__)\n");
     fprintf(stream, "    R2 = P_prime[3][*P_temp_p++];\n");
     fprintf(stream, "    R2 |= P_prime[2][*P_temp_p++];\n");
     fprintf(stream, "    R2 |= P_prime[1][*P_temp_p++];\n");
index 6a16de3cdc1b23f988289b17e80d2ed3382e0c5e..7d0e129c056909f8fc203ad6f8106e784998f709 100644 (file)
@@ -270,8 +270,8 @@ swap_long_bytes_bit_number(afs_uint32 x)
 
 #if !defined(KERNEL) && defined(AFS_DARWIN80_ENV)
 char *_darwin_whichstr[] = {
-    "#if defined(__ppc__)\n",
-    "#elif defined(__i386__)\n",
+    "#if defined(__ppc__) || defined(__ppc64__)\n",
+    "#elif defined(__i386__) || defined(__amd64__)\n",
     "#else\n#error architecture unsupported\n#endif\n"
 };
 int _darwin_which = 1;
index 5ba79a9c0a9a80f63f5ac8a0a908fc4d5636aef0..365477b433d57e48df370c8a30728996fbc7fa64 100644 (file)
@@ -808,7 +808,7 @@ gator_cursesgwin_getdimensions(gwp, aparms)
 #if defined(AFS_DARWIN_ENV) && !defined(AFS_DARWIN60_ENV)
     aparms->maxx = cwp->wp->maxx;
     aparms->maxy = cwp->wp->maxy;
-#elif defined(AFS_NBSD_ENV)
+#elif defined(AFS_NBSD_ENV) || defined(AFS_DARWIN100_ENV)
     aparms->maxx = getmaxx(cwp->wp);
     aparms->maxy = getmaxy(cwp->wp);
 #else
index 4533298c756b2fc0b1d2dbb1f61f51279869faeb..12f008f1a686d2ee5b7191135a7f0b7486b1fc22 100644 (file)
@@ -33,49 +33,29 @@ AFS_OS_NONFSOBJS = osi_vfsops.o
 KDEFS=
 DBUG = 
 DEFINES= -D_KERNEL -DKERNEL -DKERNEL_PRIVATE -DDIAGNOSTIC -DUSE_SELECT -DMACH_USER_API -DMACH_KERNEL
+KINCLUDES=-I${KROOT}/System/Library/Frameworks/Kernel.framework/Headers
+
 <ppc_darwin_80 x86_darwin_80>
 KOPTS_DBUG=-g
-<ppc_darwin_90 x86_darwin_90>
+<ppc_darwin_90 x86_darwin_90 x86_darwin_100>
 KOPTS_DBUG=-ggdb
-<ppc_darwin_80 x86_darwin_80 ppc_darwin_90 x86_darwin_90>
+<ppc_darwin_80 x86_darwin_80 ppc_darwin_90 x86_darwin_90 x86_darwin_100>
 KOPTS_ppc=-static -nostdinc -nostdlib -fno-builtin -finline -fno-keep-inline-functions -msoft-float -mlong-branch -fsigned-bitfields -arch ppc -Dppc -DPPC -D__PPC__ -DPAGE_SIZE_FIXED -mcpu=750 -mmultiple -fschedule-insns -force_cpusubtype_ALL
 KOPTS_x86=-static -nostdinc -nostdlib -fno-builtin -finline -fno-keep-inline-functions -msoft-float -mlong-branch -fsigned-bitfields -arch i386 -Di386 -DI386 -D__I386__ -DPAGE_SIZE_FIXED -march=i686 -mpreferred-stack-boundary=2 -falign-functions=4
-ARCH_ppc=$(shell echo "${ARCHFLAGS}" | grep -q -w ppc && echo yes)
-ARCH_x86=$(shell echo "${ARCHFLAGS}" | grep -q -w i386 && echo yes)
-ifeq ($(ARCH_ppc),yes)
-ifeq ($(ARCH_x86),yes)
-MODLD=$(CC) -static $(KOPTS_DBUG) -nostdlib -arch ppc -arch i386
+KOPTS_amd64=-static -nostdinc -nostdlib -fno-builtin -finline -fno-keep-inline-functions -msoft-float -mlong-branch -fsigned-bitfields -arch x86_64 -Damd64 -DAMD64 -D__AMD64__ -DPAGE_SIZE_FIXED -march=x86-64 -mpreferred-stack-boundary=4 -falign-functions=4
+ARCH_ppc=$(shell echo "${ARCHFLAGS}" | grep -q -w ppc && echo yes || echo ${ARCHFLAGS} | egrep -q -w -v 'ppc|i386|x86_64' && arch | grep -q -w ppc && echo yes)
+ARCH_x86=$(shell echo "${ARCHFLAGS}" | grep -q -w i386 && echo yes || echo ${ARCHFLAGS} | egrep -q -w -v 'ppc|i386|x86_64' && arch | grep -q -w i386 && echo yes)
+ARCH_amd64=$(shell echo "${ARCHFLAGS}" | grep -q -w x86_64 && echo yes || echo ${ARCHFLAGS} | egrep -q -w -v 'ppc|i386|x86_64' && arch | grep -q -w x86_64 && echo yes)
+OBJ_ppc=$(shell echo "${ARCH_ppc}" | grep -q -w yes && echo "$@.ppc")
+OBJ_x86=$(shell echo "${ARCH_x86}" | grep -q -w yes && echo "$@.x86")
+OBJ_amd64=$(shell echo "${ARCH_amd64}" | grep -q -w yes && echo "$@.amd64")
+MODLD=$(CC) -static $(KOPTS_DBUG) -nostdlib $(ARCHFLAGS)
+
 CFLAGS_ppc=${KINCLUDES} -I. -I.. -I${TOP_OBJDIR}/src/config $(DEFINES) $(KDEFS) $(KOPTS_ppc) $(KOPTS_DBUG)
 CFLAGS_x86=${KINCLUDES} -I. -I.. -I${TOP_OBJDIR}/src/config $(DEFINES) $(KDEFS) $(KOPTS_x86) $(KOPTS_DBUG)
-else
-MODLD=$(CC) -static $(KOPTS_DBUG) -nostdlib -arch ppc
-KOPTS=$(KOPTS_ppc)
-CFLAGS=${KINCLUDES} -I. -I.. -I${TOP_OBJDIR}/src/config $(DEFINES) $(KDEFS) $(KOPTS)
-endif
-else
-ifeq ($(ARCH_x86),yes)
-MODLD=$(CC) -static $(KOPTS_DBUG) -nostdlib -arch i386
-KOPTS=$(KOPTS_x86)
-else
-_ARCH=$(shell arch)
-MODLD=$(CC) -static $(KOPTS_DBUG) -nostdlib -arch $(_ARCH)
-KOPTS=$(KOPTS_$(shell echo $(_ARCH) | sed 's/i386/x86/'))
-endif
-CFLAGS=${KINCLUDES} -I. -I.. -I${TOP_OBJDIR}/src/config $(DEFINES) $(KDEFS) $(KOPTS)
-endif
-<all -ppc_darwin_80 -x86_darwin_80 -ppc_darwin_90 -x86_darwin_90>
-MODLD=$(LD)
-CFLAGS=${KINCLUDES} -I. -I.. -I${TOP_OBJDIR}/src/config $(DEFINES) $(KDEFS) $(KOPTS)
-<ppc_darwin_70>
-KOPTS=-static -fno-common -finline -fno-keep-inline-functions -force_cpusubtype_ALL -msoft-float -mlong-branch 
-<ppc_darwin_60>
-KOPTS=-no-cpp-precomp -static -fno-common -finline -fno-keep-inline-functions -force_cpusubtype_ALL -msoft-float -mlong-branch 
-<ppc_darwin_14 ppc_darwin_13 ppc_darwin_12>
-KOPTS=-no-precomp -static -fno-common -finline -fno-keep-inline-functions -force_cpusubtype_ALL -msoft-float -mlong-branch 
-<all>
-KINCLUDES=-I${KROOT}/System/Library/Frameworks/Kernel.framework/Headers
-
+CFLAGS_amd64=${KINCLUDES} -I. -I.. -I${TOP_OBJDIR}/src/config $(DEFINES) $(KDEFS) $(KOPTS_amd64) $(KOPTS_DBUG)
 
+<all>
 # Name of directory to hold object files and libraries.
 KOBJ = MODLOAD
 
@@ -86,26 +66,41 @@ DESTDIRS = single_destdir
 
 include Makefile.common
 
-<ppc_darwin_80 x86_darwin_80 ppc_darwin_90 x86_darwin_90>
-ifeq ($(ARCH_ppc),yes)
-ifeq ($(ARCH_x86),yes)
+<ppc_darwin_80 x86_darwin_80 ppc_darwin_90 x86_darwin_90 x86_darwin_100>
 # override suffix rule; unfortunately, this causes a warning message
 .c.o:
-       $(CC) $(COMMON_INCLUDE) $(KERN_DBG) $(CFLAGS_ppc) $(CFLAGS-$@) -o $(patsubst %.o,%.ppc.o,$@) -c $<
-       $(CC) $(COMMON_INCLUDE) $(KERN_DBG) $(CFLAGS_x86) $(CFLAGS-$@) -o $(patsubst %.o,%.x86.o,$@) -c $<
-       lipo -create $(patsubst %.o,%.ppc.o,$@) $(patsubst %.o,%.x86.o,$@) -output $@
-CRULE_NOOPT= \
-       $(CC) $(COMMON_INCLUDE) $(KERN_DBG) $(CFLAGS_ppc) $(CFLAGS-$@) -o $(patsubst %.o,%.ppc.o,$@) -c $? && \
-       $(CC) $(COMMON_INCLUDE) $(KERN_DBG) $(CFLAGS_x86) $(CFLAGS-$@) -o $(patsubst %.o,%.x86.o,$@) -c $? && \
-       lipo -create $(patsubst %.o,%.ppc.o,$@) $(patsubst %.o,%.x86.o,$@) -output $@
-CRULE_OPT= \
-       $(CC) $(COMMON_INCLUDE) $(KERN_DBG) $(KERN_OPTMZ) $(CFLAGS_ppc) $(CFLAGS-$@) -o $(patsubst %.o,%.ppc.o,$@) -c $? && \
-       $(CC) $(COMMON_INCLUDE) $(KERN_DBG) $(KERN_OPTMZ) $(CFLAGS_x86) $(CFLAGS-$@) -o $(patsubst %.o,%.x86.o,$@) -c $? && \
-       lipo -create $(patsubst %.o,%.ppc.o,$@) $(patsubst %.o,%.x86.o,$@) -output $@
+ifeq ($(ARCH_ppc),yes)
+       $(CC) $(COMMON_INCLUDE) $(KERN_DBG) $(CFLAGS_ppc) $(CFLAGS-$@) -o $(patsubst %.o,%.o.ppc,$@) -c $<
 endif
+ifeq ($(ARCH_x86),yes)
+       $(CC) $(COMMON_INCLUDE) $(KERN_DBG) $(CFLAGS_x86) $(CFLAGS-$@) -o $(patsubst %.o,%.o.x86,$@) -c $<
 endif
-<all>
+ifeq ($(ARCH_amd64),yes)
+       $(CC) $(COMMON_INCLUDE) $(KERN_DBG) $(CFLAGS_amd64) $(CFLAGS-$@) -o $(patsubst %.o,%.o.amd64,$@) -c $<
+endif
+       lipo -create ${OBJ_ppc} ${OBJ_x86} ${OBJ_amd64} -output $@;
+
+CRULE_NOOPT_ppc=$(CC) $(COMMON_INCLUDE) $(KERN_DBG) $(CFLAGS_ppc) $(CFLAGS-$@) -o $(patsubst %.o,%.o.ppc,$@) -c $?
+CRULE_NOOPT_x86=$(CC) $(COMMON_INCLUDE) $(KERN_DBG) $(CFLAGS_x86) $(CFLAGS-$@) -o $(patsubst %.o,%.o.x86,$@) -c $?
+CRULE_NOOPT_amd64=$(CC) $(COMMON_INCLUDE) $(KERN_DBG) $(CFLAGS_amd64) $(CFLAGS-$@) -o $(patsubst %.o,%.o.amd64,$@) -c $?
+CRULE_NOOPT=$(shell echo "${ARCH_ppc}" | grep -q -w yes && echo "${CRULE_NOOPT_ppc};"; echo "${ARCH_x86}" | grep -q -w yes && echo "${CRULE_NOOPT_x86};"; echo "${ARCH_amd64}" | grep -q -w x86_64 && echo "${CRULE_NOOPT_amd64};"; echo "lipo -create ${OBJ_ppc} ${OBJ_x86} ${OBJ_amd64}-output $@")
+
+CRULE_OPT_ppc=$(CC) $(COMMON_INCLUDE) $(KERN_DBG) $(KERN_OPTMZ) $(CFLAGS_ppc) $(CFLAGS-$@) -o $(patsubst %.o,%.o.ppc,$@) -c $? 
+CRULE_OPT_x86=$(CC) $(COMMON_INCLUDE) $(KERN_DBG) $(KERN_OPTMZ) $(CFLAGS_x86) $(CFLAGS-$@) -o $(patsubst %.o,%.o.x86,$@) -c $? 
+CRULE_OPT_amd64=$(CC) $(COMMON_INCLUDE) $(KERN_DBG) $(KERN_OPTMZ) $(CFLAGS_amd64) $(CFLAGS-$@) -o $(patsubst %.o,%.o.amd64,$@) -c $? 
+CRULE_OPT=$(shell echo "${ARCH_ppc}" | grep -q -w yes && echo "${CRULE_OPT_ppc};"; echo "${ARCH_x86}" | grep -q -w yes && echo "${CRULE_OPT_x86};"; echo "${ARCH_amd64}" | grep -q -w x86_64 && echo "${CRULE_OPT_amd64};"; echo "lipo -create ${OBJ_ppc} ${OBJ_x86} ${OBJ_amd64}-output $@")
 
+<all -ppc_darwin_80 -x86_darwin_80 -ppc_darwin_90 -x86_darwin_90 -x86_darwin_100>
+MODLD=$(LD)
+CFLAGS=${KINCLUDES} -I. -I.. -I${TOP_OBJDIR}/src/config $(DEFINES) $(KDEFS) $(KOPTS)
+<ppc_darwin_70>
+KOPTS=-static -fno-common -finline -fno-keep-inline-functions -force_cpusubtype_ALL -msoft-float -mlong-branch 
+<ppc_darwin_60>
+KOPTS=-no-cpp-precomp -static -fno-common -finline -fno-keep-inline-functions -force_cpusubtype_ALL -msoft-float -mlong-branch 
+<ppc_darwin_14 ppc_darwin_13 ppc_darwin_12>
+KOPTS=-no-precomp -static -fno-common -finline -fno-keep-inline-functions -force_cpusubtype_ALL -msoft-float -mlong-branch 
+
+<all>
 setup:
        -mkdir $(KOBJ)
        -$(RM) $(KOBJ)/Makefile $(KOBJ)/Makefile.common $(KOBJ)/config
@@ -145,12 +140,12 @@ dest_libafs: $(LIBAFSNONFS) ;
 
 ${LIBAFS}: $(AFSAOBJS) $(AFSNFSOBJS)
        $(MODLD) -r -o ${LIBAFS} ${AFSAOBJS} ${AFSNFSOBJS} -lcc_kext
-<ppc_darwin_90 x86_darwin_90>
+<ppc_darwin_90 x86_darwin_90 x86_darwin_100>
        dsymutil -o ${LIBAFS}.dSYM ${LIBAFS}
 <all>
 
 ${LIBAFSNONFS}:  $(AFSAOBJS) $(AFSNONFSOBJS)
        $(MODLD) -r -o ${LIBAFSNONFS} ${AFSAOBJS} ${AFSNONFSOBJS} -lcc_kext
-<ppc_darwin_90 x86_darwin_90>
+<ppc_darwin_90 x86_darwin_90 x86_darwin_100>
        dsymutil -o ${LIBAFSNONFS}.dSYM ${LIBAFSNONFS}
 <all>
index 2fd7d63ee80d41977d3370781e9adc4270f8fc1d..76fca8486221f4165342db01c93ffd62b1bf051b 100644 (file)
@@ -53,9 +53,11 @@ process.o    : process.s process.i386.s process.c
                ${AS} -ahlns process.ss -o process.o >process.lst; \
                $(RM) process.ss ;; \
        *_darwin* ) \
-               ppc=`echo "${ARCHFLAGS}" | grep -q -w ppc && echo yes` ; \
-               i386=`echo "${ARCHFLAGS}" | grep -q -w i386 && echo yes` ; \
-               if [ -z "$${ppc}" -a -z "$${i386}" ] ; then \
+               $(RM) -f process.o ; \
+               ppc=`echo "${ARCHFLAGS}" | grep -q -w ppc && echo process.ppc.o` ; \
+               i386=`echo "${ARCHFLAGS}" | grep -q -w i386 && echo process.i386.o` ; \
+               amd64=`echo "${ARCHFLAGS}" | grep -q -w x86_64 && echo process.amd64.o` ; \
+               if [ -z "$${ppc}" -a -z "$${i386}" -a -z "$${amd64}" ] ; then \
                        if [ `arch` = ppc ] ; then \
                                ppc=yes ; \
                        else \
@@ -63,19 +65,25 @@ process.o   : process.s process.i386.s process.c
                        fi ; \
                fi ; \
                if [ -n "$${ppc}" ] ; then \
-                       $(CC) ${LWP_DBG} ${LWP_OPTMZ} -c -arch ppc -I${TOP_INCDIR} ${srcdir}/process.s -o process.ppc.o ; \
-                       if [ -z "$${i386}" ] ; then \
-                               ${MV} process.ppc.o process.o ; \
+                       $(CC) ${LWP_DBG} ${LWP_OPTMZ} -c -arch ppc -I${TOP_INCDIR} ${srcdir}/process.s -o "$${ppc}" ; \
+                       if [ -z "$${i386}" -a -z "$${amd64}" ] ; then \
+                               ${MV} "$${ppc}" process.o ; \
                        fi ; \
                fi ; \
                if [ -n "$${i386}" ] ; then \
-                       $(CC) -x assembler-with-cpp -c -arch i386 -I${TOP_INCDIR} -I${srcdir} ${srcdir}/process.i386.s -o process.i386.o ; \
-                       if [ -z "$${ppc}" ] ; then \
-                               ${MV} process.i386.o process.o ; \
+                       $(CC) -x assembler-with-cpp -c -arch i386 -I${TOP_INCDIR} -I${srcdir} ${srcdir}/process.i386.s -o "$${i386}" ; \
+                       if [ -z "$${ppc}" -a -z "$${amd64}" ] ; then \
+                               ${MV} "$${i386}" process.o ; \
                        fi ; \
                fi ; \
-               if [ -n "$${ppc}" -a -n "$${i386}" ] ; then \
-                       lipo -create process.ppc.o process.i386.o -output process.o ;\
+               if [ -n "$${amd64}" ] ; then \
+                       $(CC) -x assembler-with-cpp -c -arch x86_64 -I${TOP_INCDIR} -I${srcdir} ${srcdir}/process.amd64.s -o "$${amd64}" ; \
+                       if [ -z "$${ppc}" -a -z "$${i386}" ] ; then \
+                               ${MV} "$${amd64}" process.o ; \
+                       fi ; \
+               fi ; \
+               if [ ! -f process.o ] ; then \
+                       lipo -create $${amd64} $${i386} $${ppc} -output process.o ;\
                fi ;; \
        i386_*bsd*) \
                cp ${srcdir}/process.i386.s process.S ; \
index 48dd25fd03149260e37f3ecd3e9e011ff37c4c5f..4b1ef964392ac7edee7aaf03bc60cb557533d717 100644 (file)
@@ -83,7 +83,7 @@ ENTRY(savecontext)
        movq    %rsi, area1(%rbp)       /* i multiples of 24, so 32 it is) */
        movq    %rdx, newsp(%rbp)       /* and copy them there. */
 
-       movq    PRE_Block@GOTPCREL(%rip), %rax
+       movq    _C_LABEL(PRE_Block)@GOTPCREL(%rip), %rax
        movl    $1,(%rax)               /* Do not allow any interrupts */
 
        pushq   %rsp                    /* Push all registers onto the stack */
@@ -149,7 +149,7 @@ ENTRY(returnto)
        popq    %rax
        popq    %rsp                    /* See savecontext */
 
-       movq    PRE_Block@GOTPCREL(%rip), %rax
+       movq    _C_LABEL(PRE_Block)@GOTPCREL(%rip), %rax
        movl    $0,(%rax)       
        addq    $32, %rsp               /* We did rsp-32 above, correct that */
        popq    %rbp
index 7725bc6e917c62d70b208f19aed0341c3433d73f..8b9d6ae46a61d123ff7ac2153b4eb1227b661021 100644 (file)
@@ -175,8 +175,8 @@ pam_sm_authenticate(pam_handle_t * pamh, int flags, int argc,
     /* enhanced: use "ignore_uid <number>" to specify the largest uid
      * which should be ignored by this module
      */
-#if    defined(AFS_HPUX_ENV)
-#if     defined(AFS_HPUX110_ENV)
+#if    defined(AFS_HPUX_ENV) || defined(AFS_DARWIN100_ENV)
+#if     defined(AFS_HPUX110_ENV) || defined(AFS_DARWIN100_ENV)
     i = getpwnam_r(user, &unix_pwd, upwd_buf, sizeof(upwd_buf), &upwd);
 #else /* AFS_HPUX110_ENV */
     i = getpwnam_r(user, &unix_pwd, upwd_buf, sizeof(upwd_buf));
index 81e59d95772942973647c4453da82ba447c45823..a6a67da2f45af52eff70b8c0f109b2751c029178 100644 (file)
@@ -119,8 +119,8 @@ pam_sm_chauthtok(pam_handle_t * pamh, int flags, int argc, const char **argv)
      * and its uid==0, and "ignore_root" was given in pam.conf,
      * ignore the user.
      */
-#if    defined(AFS_HPUX_ENV)
-#if     defined(AFS_HPUX110_ENV)
+#if    defined(AFS_HPUX_ENV) || defined(AFS_DARWIN100_ENV)
+#if     defined(AFS_HPUX110_ENV) || defined(AFS_DARWIN100_ENV)
     i = getpwnam_r(user, &unix_pwd, upwd_buf, sizeof(upwd_buf), &upwd);
 #else /* AFS_HPUX110_ENV */
     i = getpwnam_r(user, &unix_pwd, upwd_buf, sizeof(upwd_buf));
index 3a2f39fc058d14ac51377013b3e190a98fe21619..52e0310524fe6a55042c62e0ee15937c81a2527c 100644 (file)
@@ -155,8 +155,8 @@ pam_sm_setcred(pam_handle_t * pamh, int flags, int argc, const char **argv)
     /* enhanced: use "ignore_uid <number>" to specify the largest uid
      * which should be ignored by this module
      */
-#if    defined(AFS_HPUX_ENV)
-#if     defined(AFS_HPUX110_ENV)
+#if    defined(AFS_HPUX_ENV) || defined(AFS_DARWIN100_ENV)
+#if     defined(AFS_HPUX110_ENV) || defined(AFS_DARWIN100_ENV)
     i = getpwnam_r(user, &unix_pwd, upwd_buf, sizeof(upwd_buf), &upwd);
 #else /* AFS_HPUX110_ENV */
     i = getpwnam_r(user, &unix_pwd, upwd_buf, sizeof(upwd_buf));
index 4f9935e3b7687f37817982d490b51a4e4c7971a0..dee0528c2809229a4a2cc48497be451edbd93eb5 100644 (file)
@@ -34,7 +34,6 @@ LIBS=${TOP_LIBDIR}/libubik.a \
        ${TOP_LIBDIR}/libdes.a \
        ${TOP_LIBDIR}/libcmd.a \
        ${TOP_LIBDIR}/libcom_err.a \
-       ${TOP_LIBDIR}/util.a \
        ${TOP_LIBDIR}/libsys.a \
        ${TOP_LIBDIR}/libafsutil.a
 
index a13881864ff2a3bb206cdc547113cdaddfa05dda..bfb01b599ec4a1a0b4f6d21c12289b93c530bfc4 100644 (file)
@@ -26,7 +26,9 @@
 #if defined(AFS_DUX40_ENV) || defined(AFS_OBSD_ENV) || defined(AFS_NBSD_ENV)
 #include <sys/ioctl.h>
 #endif
+#ifndef AFS_DARWIN100_ENV
 #include <sys/mtio.h>
+#endif
 #endif /* AFS_AIX_ENV */
 
 #include <string.h>
@@ -209,6 +211,9 @@ usd_FileIoctl(usd_handle_t usd, int req, void *arg)
 
     case USD_IOCTL_TAPEOPERATION:
        {
+#ifdef AFS_DARWIN100_ENV
+           code = EOPNOTSUPP;
+#else
            usd_tapeop_t *tapeOpp = (usd_tapeop_t *) arg;
 #if defined(AFS_AIX_ENV)
            struct stop os_tapeop;
@@ -255,7 +260,7 @@ usd_FileIoctl(usd_handle_t usd, int req, void *arg)
 
            code = ioctl(fd, MTIOCTOP, &os_tapeop);
 #endif /* AFS_AIX_ENV */
-
+#endif
            if (code == -1) {
                code = errno;
            } else {
index e41b3bfc811639e2140c94d2af696986dc2eecfb..3ab164c6c3deddb407975ddf650b545478b9d05a 100644 (file)
@@ -14,6 +14,7 @@
 #if defined(AFS_NT40_ENV) && defined(AFS_PTHREAD_ENV)
 #define AFS_GRMUTEX_DECLSPEC __declspec(dllexport)
 #endif
+#ifdef AFS_PTHREAD_ENV
 #include <afs/pthread_glock.h>
 #include <string.h>
 
@@ -83,3 +84,4 @@ pthread_recursive_mutex_unlock(pthread_recursive_mutex_t * mut)
     }
     return rc;
 }
+#endif