From bfd956832e62cbca10d2f885f360232a2556face Mon Sep 17 00:00:00 2001 From: Niklas Edmundsson Date: Wed, 3 Sep 2008 19:27:02 +0000 Subject: [PATCH] DEVEL15-aix61-initial-support-20080903 LICENSE IPL10 FIXES 113638 aix 6.1 support (cherry picked from commit 539535cf679d6e70f34b80b74c127efae1f0bba2) --- Makefile.in | 2 +- README | 21 +++- acinclude.m4 | 4 + src/afsd/rc.afs.rs_aix | 10 +- src/cf/osconf.m4 | 21 ++++ src/config/afs_sysnames.h | 1 + src/config/param.rs_aix61.h | 181 +++++++++++++++++++++++++++++++ src/export/Makefile.in | 186 +++++++++++++------------------- src/export/cfgexport.c | 8 +- src/libafs/MakefileProto.AIX.in | 2 + src/sys/Makefile.in | 4 +- 11 files changed, 316 insertions(+), 124 deletions(-) create mode 100644 src/config/param.rs_aix61.h diff --git a/Makefile.in b/Makefile.in index 655f2f6c91..dc8050d331 100644 --- a/Makefile.in +++ b/Makefile.in @@ -343,7 +343,7 @@ bozo: cmd comerr audit auth kauth volser vfsck: vol set -x; \ case ${SYS_NAME} in \ - sgi_* | *linux* | rs_aix42 | *_darwin* | ia64_hpux* | *fbsd* | *_obsd* | *_nbsd* | sun*_4* | rs_aix5* ) \ + sgi_* | *linux* | rs_aix* | *_darwin* | ia64_hpux* | *fbsd* | *_obsd* | *_nbsd* | sun*_4* ) \ echo skip vfsck for ${SYS_NAME} ;; \ * ) \ ${COMPILE_PART1} vfsck ${COMPILE_PART2} ;; \ diff --git a/README b/README index dee4635075..392edd8ad4 100644 --- a/README +++ b/README @@ -60,7 +60,7 @@ A Configuring ppc_darwin_70, ppc_darwin_80, ppc_darwin_90 ppc_linux22, ppc_linux24, ppc_linux26 ppc_nbsd16, ppc_nbsd20 - rs_aix42, rs_aix51, rs_aix52, rs_aix53 + rs_aix42, rs_aix51, rs_aix52, rs_aix53, rs_aix61 s390_linux22, s390_linux24, s390_linux26 s390x_linux24, s390x_linux26 sgi_62, sgi_63, sgi_64, sgi_65 (file server not tested) @@ -248,7 +248,24 @@ G FreeBSD Notes You can't run arla and OpenAFS at the same time. -H Other configure options +H AIX notes + + Make sure that your default build environment is 32bit, ie. + the OBJECT_MODE environment variable is either unset or set to "32". + + Verify this before doing configure and make. For example, assuming ksh/bash: + export OBJECT_MODE=32 + + To build aklog (in order to be able to get tokens from your KRB5 ticket) + you have to supply --with-krb5 to configure, the following example is for + building on AIX 6.1 with the IBM Kerberos5 (krb5.client.rte and + krb5.toolkit.adt on the Expansion Pack): + + ./configure --with-afs-sysname=rs_aix61 --enable-transarc-paths \ + --enable-supergroups \ + --with-krb5 KRB5CFLAGS=-I/usr/include KRB5LIBS=-lkrb5 + +I Other configure options AFS has a ton of other optional features that must be enabled using configure options. Here is a summary: diff --git a/acinclude.m4 b/acinclude.m4 index dc8cd412b3..dec9d025ed 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -668,6 +668,10 @@ else AFS_SYSNAME="rs_aix53" enable_pam="no" ;; + power*-ibm-aix6.1*) + AFS_SYSNAME="rs_aix61" + enable_pam="no" + ;; x86_64-*-linux-gnu) AFS_SYSNAME="amd64_linuxXX" enable_pam="no" diff --git a/src/afsd/rc.afs.rs_aix b/src/afsd/rc.afs.rs_aix index 1fd8ba4c6b..29fa3b5e4f 100644 --- a/src/afsd/rc.afs.rs_aix +++ b/src/afsd/rc.afs.rs_aix @@ -49,21 +49,17 @@ fi # find out whether we have 32 or 64 bit kernel kernel=32 -if [ -x /bin/w64 ]; then - /bin/w64 >/dev/null 2>&1 - if [ $? -eq 0 ]; then - kernel=64 - fi +if [ -x /usr/sbin/bootinfo ]; then + kernel=`/usr/sbin/bootinfo -K` fi # Load AFS into the kernel +echo "$0: Loading $kernel bit kernel AFS modules" cd /usr/vice/etc/dkload if [ $kernel -eq 32 ]; then - echo "32-bit kernel found" ./cfgexport -a export.ext${ExportExt} && ./cfgafs -a afs.ext.32 else - echo "64-bit kernel assumed" ./cfgexport64 -a export64.ext${ExportExt} && ./cfgafs64 -a afs.ext.64 fi if [ $? -ne 0 ]; then diff --git a/src/cf/osconf.m4 b/src/cf/osconf.m4 index f9b9b18f61..4ed7a63204 100644 --- a/src/cf/osconf.m4 +++ b/src/cf/osconf.m4 @@ -568,6 +568,7 @@ case $AFS_SYSNAME in XCFLAGS="-K -D_NONSTD_TYPES -D_MBI=void" XLIBS="${LIB_AFSDB} -ldl" SHLIB_LINKER="${MT_CC} -bM:SRE -berok" + AIX32="" AIX64="#" ;; @@ -584,6 +585,7 @@ case $AFS_SYSNAME in XCFLAGS="-K -D_NONSTD_TYPES -D_MBI=void" XLIBS="${LIB_AFSDB} -ldl" SHLIB_LINKER="${MT_CC} -bM:SRE -berok" + AIX32="" AIX64="" ;; @@ -599,6 +601,7 @@ case $AFS_SYSNAME in XCFLAGS="-K -D_NONSTD_TYPES -D_MBI=void" XLIBS="${LIB_AFSDB} -ldl" SHLIB_LINKER="${MT_CC} -bM:SRE -berok" + AIX32="" AIX64="" ;; @@ -614,6 +617,23 @@ case $AFS_SYSNAME in XCFLAGS="-K -D_NONSTD_TYPES -D_MBI=void" XLIBS="${LIB_AFSDB} -ldl" SHLIB_LINKER="${MT_CC} -bM:SRE -berok" + AIX32="" + AIX64="" + ;; + + rs_aix61) + DBG="-g" + LEX="lex" + LIBSYS_AIX_EXP="afsl.exp" + MT_CC="xlc_r" + MT_CFLAGS='-DAFS_PTHREAD_ENV ${XCFLAGS}' + MT_LIBS="-lpthreads" + SHLIB_SUFFIX="o" + TXLIBS="-lcurses" + XCFLAGS="-K -D_NONSTD_TYPES -D_MBI=void" + XLIBS="${LIB_AFSDB} -ldl" + SHLIB_LINKER="${MT_CC} -bM:SRE -berok" + AIX32="#" AIX64="" ;; @@ -1122,6 +1142,7 @@ AC_SUBST(CCXPG2) AC_SUBST(CCOBJ) AC_SUBST(AFSD_LIBS) AC_SUBST(AFSD_LDFLAGS) +AC_SUBST(AIX32) AC_SUBST(AIX64) AC_SUBST(AR) AC_SUBST(AS) diff --git a/src/config/afs_sysnames.h b/src/config/afs_sysnames.h index 31be8e9a99..1fdcfaca0d 100644 --- a/src/config/afs_sysnames.h +++ b/src/config/afs_sysnames.h @@ -73,6 +73,7 @@ #define SYS_NAME_ID_rs_aix43 705 #define SYS_NAME_ID_rs_aix52 706 #define SYS_NAME_ID_rs_aix53 707 +#define SYS_NAME_ID_rs_aix61 708 #define SYS_NAME_ID_sun3_411 906 #define SYS_NAME_ID_sun3x_411 912 diff --git a/src/config/param.rs_aix61.h b/src/config/param.rs_aix61.h new file mode 100644 index 0000000000..f0236ce1af --- /dev/null +++ b/src/config/param.rs_aix61.h @@ -0,0 +1,181 @@ +#ifndef UKERNEL +/* This section for kernel libafs compiles only */ + +/* + * 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 + */ + +#ifndef AFS_PARAM_H +#define AFS_PARAM_H + +#define AFS_AIX_ENV 1 +#define AFS_AIX32_ENV 1 +#define AFS_AIX41_ENV 1 +#define AFS_AIX42_ENV 1 +#define AFS_AIX51_ENV 1 +#define AFS_AIX52_ENV 1 +#define AFS_AIX53_ENV 1 +#define AFS_AIX61_ENV 1 + +#define AFS_64BIT_ENV 1 +#define AFS_64BIT_CLIENT 1 +#define AFS_NAMEI_ENV 1 +#ifdef AFS_NAMEI_ENV +#define AFS_64BIT_IOPS_ENV 1 +#endif + +#define AFS_HAVE_FLOCK_SYSID 1 + +#include + +/* Global lock in AFS part of client. */ +#define AFS_GLOBAL_SUNLOCK 1 +#define AFS_GCPAGS 1 /* if nonzero, garbage collect PAGs */ + +/* File system entry (used if vmount.h doesn't define MNT_AFS */ +#define AFS_MOUNT_AFS 4 +#define AFS_SYSCALL 31 + +/* Machine / Operating system information */ +#define SYS_NAME "rs_aix61" +#define SYS_NAME_ID SYS_NAME_ID_rs_aix61 +#define AFSBIG_ENDIAN 1 +#define RIOS 1 /* POWERseries 6000. (sj/pc) */ +#define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */ +#define AFS_USE_GETTIMEOFDAY 1 /* use gettimeofday to implement rx clock */ +#define AFS_HAVE_STATVFS 1 /* System supports statvfs */ + +#ifndef _POWER +#define _POWER 1 /* _POWERseries! */ +#endif +#ifndef COMPAT_43 +#define COMPAT_43 +#endif + +#define KERNEL_HAVE_UERROR 1 +#define KERNEL_HAVE_PIN 1 + +/* Extra kernel definitions (from kdefs file) */ +#ifdef _KERNEL +#define AFS_SHORTGID 1 +#define AFS_UIOFMODE 1 +#define afsio_iov uio_iov +#define afsio_iovcnt uio_iovcnt +#define afsio_offset uio_offset +#define afsio_seg uio_segflg +#define afsio_fmode uio_fmode +#define afsio_resid uio_resid +#define AFS_UIOSYS UIO_SYSSPACE +#define AFS_UIOUSER UIO_USERSPACE +#define AFS_CLBYTES CLBYTES +#define AFS_MINCHANGE 2 +#define osi_GetTime(x) do {curtime(x); (x)->tv_usec = (x)->tv_usec/1000;} while (0) +#define osi_GTime(x) time /* something for the silly time(0)?? */ +#define AFS_KALLOC kmem_alloc +#define AFS_KFREE kmem_free +#define VATTR_NULL(V) memset((void*)V, -1, sizeof(*(V))) +#define va_nodeid va_serialno +#endif /* !_KERNEL */ +#define AFS_DIRENT +#endif /* AFS_PARAM_H */ + +#else /* !defined(UKERNEL) */ + +/* This section for user space compiles only */ + +/* + * 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 + */ + +#ifndef AFS_PARAM_H +#define AFS_PARAM_H + +#define AFS_64BIT_ENV 1 +#define AFS_64BIT_CLIENT 1 +#define AFS_NAMEI_ENV 1 +#ifdef AFS_NAMEI_ENV +#define AFS_64BIT_IOPS_ENV 1 +#endif +#define BITMAP_LATER 1 +#define FAST_RESTART 1 + +#define AFS_VFS_ENV 1 +/* Used only in vfsck code; is it needed any more???? */ +#define RXK_LISTENER_ENV 1 +#define AFS_USERSPACE_IP_ADDR 1 +#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */ + +#ifdef KERNEL + +#define UKERNEL 1 /* user space kernel */ +#define AFS_ENV 1 +#define AFS_USR_AIX_ENV 1 +#define AFS_USR_AIX41_ENV 1 +#define AFS_USR_AIX42_ENV 1 +#define AFS_USR_AIX51_ENV 1 + +#else /* KERNEL */ + +#define AFS_AIX_ENV 1 +#define AFS_AIX32_ENV 1 +#define AFS_AIX41_ENV 1 +#define AFS_AIX42_ENV 1 +#define AFS_AIX51_ENV 1 + +#define AFS_HAVE_FLOCK_SYSID 1 + +#endif /* KERNEL */ + +#include + + /*#define AFS_GLOBAL_SUNLOCK 1 *//* For global locking */ + +#define AFS_3DISPARES 1 /* Utilize the 3 available disk inode 'spares' */ +#define AFS_SYSCALL 105 + +/* File system entry (used if mount.h doesn't define MOUNT_AFS */ +#define AFS_MOUNT_AFS 4 + +/* Machine / Operating system information */ +#define sys_rs_aix51 1 +#define SYS_NAME "rs_aix51" +#define SYS_NAME_ID SYS_NAME_ID_rs_aix51 +#define AFSBIG_ENDIAN 1 +#define AFS_HAVE_FFS 1 /* Use system's ffs. */ +#define AFS_HAVE_STATVFS 0 /* System doesn't support statvfs */ + +/* Extra kernel definitions (from kdefs file) */ +#ifdef KERNEL +#define AFS_UIOFMODE 1 /* Only in afs/afs_vnodeops.c (afs_ustrategy) */ +#define AFS_SYSVLOCK 1 /* sys v locking supported */ +/*#define AFS_USEBUFFERS 1*/ +#define afsio_iov uio_iov +#define afsio_iovcnt uio_iovcnt +#define afsio_offset uio_offset +#define afsio_seg uio_segflg +#define afsio_fmode uio_fmode +#define afsio_resid uio_resid +#define AFS_UIOSYS 1 +#define AFS_UIOUSER UIO_USERSPACE +#define AFS_CLBYTES MCLBYTES +#define AFS_MINCHANGE 2 +#define VATTR_NULL usr_vattr_null +#endif /* KERNEL */ +#define AFS_DIRENT +#ifndef CMSERVERPREF +#define CMSERVERPREF +#endif + +#endif /* AFS_PARAM_H */ + +#endif /* !defined(UKERNEL) */ diff --git a/src/export/Makefile.in b/src/export/Makefile.in index d35450e1cf..c949a081ba 100644 --- a/src/export/Makefile.in +++ b/src/export/Makefile.in @@ -7,42 +7,53 @@ srcdir=@srcdir@ include @TOP_OBJDIR@/src/config/Makefile.config +include ../config/Makefile.version EXPORTS = -bexport:export.exp IMPORTS = /lib/kernex.exp /lib/syscalls.exp ${srcdir}/extras.exp KOBJ = export.o symtab.o -include ../config/Makefile.version +EXPORTS32 = @AIX32@export.exp export.ext.nonfs export.ext cfgexport cfgafs +EXPORTS64 = @AIX64@export64.exp export64.ext.nonfs export64.ext cfgexport64 cfgafs64 +TOPEXP32 = @AIX32@${TOP_LIBDIR}/export.exp +TOPEXP64 = @AIX64@${TOP_LIBDIR}/export64.exp -all: ${TOP_LIBDIR}/export.exp ${TOP_LIBDIR}/export64.exp ${TOP_LIBDIR}/extras.exp cfgexport cfgafs - ${INSTALL} ${srcdir}/export.h ${KERNELDIR} - ${INSTALL} export.exp ${KERNELDIR} - ${INSTALL} export64.exp ${KERNELDIR} - ${INSTALL} ${srcdir}/export.h ${UKERNELDIR} - ${INSTALL} export64.exp ${UKERNELDIR} - ${INSTALL} export.exp ${UKERNELDIR} +all: $(TOPEXP32) $(TOPEXP64) ${TOP_LIBDIR}/extras.exp + ${INSTALL} -d ${KERNELDIR} + ${INSTALL} -d ${UKERNELDIR} + ${INSTALL_DATA} ${srcdir}/export.h ${KERNELDIR}/export.h + @AIX32@${INSTALL_DATA} export.exp ${KERNELDIR}/export.exp + @AIX64@${INSTALL_DATA} export64.exp ${KERNELDIR}/export64.exp + ${INSTALL_DATA} ${srcdir}/export.h ${UKERNELDIR}/export.h + @AIX32@${INSTALL_DATA} export.exp ${UKERNELDIR}/export.exp + @AIX64@${INSTALL_DATA} export64.exp ${UKERNELDIR}/export64.exp + +${TOP_LIBDIR}/export.exp: export.exp + ${INSTALL_DATA} $? $@ + +${TOP_LIBDIR}/export64.exp: export64.exp + ${INSTALL_DATA} $? $@ + +${TOP_LIBDIR}/extras.exp: ${srcdir}/extras.exp + ${INSTALL_DATA} $? $@ noversion system: install -install: ${DESTDIR}${afskerneldir}/export.ext \ - ${DESTDIR}${afskerneldir}/export.ext.nonfs \ - ${DESTDIR}${afskerneldir}/export64.ext.nonfs \ - ${DESTDIR}${libdir}/afs/export.exp \ - ${DESTDIR}${libdir}/afs/export64.exp \ - ${DESTDIR}${libdir}/afs/extras.exp \ - ${DESTDIR}${afskerneldir}/cfgexport \ - ${DESTDIR}${afskerneldir}/cfgafs \ - ${DESTDIR}${afskerneldir}/export64.ext \ - ${DESTDIR}${afskerneldir}/cfgexport64 \ - ${DESTDIR}${afskerneldir}/cfgafs64 - export.exp: ${srcdir}/export4.exp ${srcdir}/export5.exp case ${SYS_NAME} in \ rs_aix4* ) \ cp -p ${srcdir}/export4.exp export.exp ; \ - cp -p ${srcdir}/export4-64.exp export64.exp ;; \ rs_aix5* ) \ cp -p ${srcdir}/export5.exp export.exp ; \ + esac + +export64.exp: ${srcdir}/export4-64.exp ${srcdir}/export5-64.exp + case ${SYS_NAME} in \ + rs_aix4* ) \ + cp -p ${srcdir}/export4-64.exp export64.exp ;; \ + rs_aix5* ) \ + cp -p ${srcdir}/export5-64.exp export64.exp ;; \ + rs_aix6* ) \ cp -p ${srcdir}/export5-64.exp export64.exp ;; \ esac @@ -69,6 +80,9 @@ symtab.o symtab64.o: ${srcdir}/symtab.c ${CC} ${CFLAGS} -q64 -D__XCOFF64__ -DAFS_64BIT_KERNEL -DAFS_AIX51_ENV -c ${srcdir}/symtab.c ; \ mv symtab.o symtab64.o ; \ ${CC} ${CFLAGS} -DAFS_AIX51_ENV -c ${srcdir}/symtab.c ;; \ + rs_aix6* ) \ + ${CC} ${CFLAGS} -q64 -D__XCOFF64__ -DAFS_64BIT_KERNEL -DAFS_AIX51_ENV -c ${srcdir}/symtab.c ; \ + mv symtab.o symtab64.o ;; \ esac export.o export64.o: ${srcdir}/export.c @@ -79,18 +93,25 @@ export.o export64.o: ${srcdir}/export.c ${CC} ${CFLAGS} -q64 -D__XCOFF64__ -DAFS_64BIT_KERNEL -DAFS_AIX51_ENV -c ${srcdir}/export.c ; \ mv export.o export64.o ; \ ${CC} ${CFLAGS} -DAFS_AIX51_ENV -c ${srcdir}/export.c ;; \ + rs_aix6* ) \ + ${CC} ${CFLAGS} -q64 -D__XCOFF64__ -DAFS_64BIT_KERNEL -DAFS_AIX51_ENV -c ${srcdir}/export.c ; \ + mv export.o export64.o ;; \ esac - + export.nonfs.o export64.nonfs.o: ${srcdir}/export.c case ${SYS_NAME} in \ rs_aix4* ) \ - ${CC} ${INCS} -DAFS_NONFSTRANS -c ${srcdir}/export.c ;; \ + ${CC} ${INCS} -DAFS_NONFSTRANS -c ${srcdir}/export.c ; \ + mv export.o export.nonfs.o ;; \ rs_aix5* ) \ ${CC} -q64 ${INCS} -D__XCOFF64__ -DAFS_64BIT_KERNEL -DAFS_NONFSTRANS -DAFS_AIX51_ENV -c ${srcdir}/export.c ; \ mv export.o export64.nonfs.o ; \ - ${CC} ${INCS} -DAFS_NONFSTRANS -DAFS_AIX51_ENV -c ${srcdir}/export.c ;; \ + ${CC} ${INCS} -DAFS_NONFSTRANS -DAFS_AIX51_ENV -c ${srcdir}/export.c ; \ + mv export.o export.nonfs.o ;; \ + rs_aix6* ) \ + ${CC} -q64 ${INCS} -D__XCOFF64__ -DAFS_64BIT_KERNEL -DAFS_NONFSTRANS -DAFS_AIX51_ENV -c ${srcdir}/export.c ; \ + mv export.o export64.nonfs.o ;; \ esac - -mv export.o export.nonfs.o cfgexport: cfgexport.o ${CC} -g ${INCS} -o cfgexport cfgexport.o @@ -119,91 +140,34 @@ clean: $(RM) -f cfgafs cfgafs64 $(RM) -f *.ext *.ext.nonfs -${DEST}/root.client/usr/vice/etc/dkload/export.ext: export.ext - ${INSTALL} $? $@ +install: $(EXPORTS32) $(EXPORTS64) + ${INSTALL} -d ${DESTDIR}${afskerneldir} + ${INSTALL} -d ${DESTDIR}${libdir}/afs + ${INSTALL_DATA} ${srcdir}/extras.exp ${DESTDIR}${libdir}/afs/extras.exp + @AIX32@${INSTALL_DATA} export.exp ${DESTDIR}${libdir}/afs/export.exp + @AIX32@${INSTALL_DATA} export.ext ${DESTDIR}${afskerneldir}/export.ext + @AIX32@${INSTALL_DATA} export.ext.nonfs ${DESTDIR}${afskerneldir}/export.ext.nonfs + @AIX32@${INSTALL_DATA} cfgexport ${DESTDIR}${afskerneldir}/cfgexport + @AIX32@${INSTALL_DATA} cfgafs ${DESTDIR}${afskerneldir}/cfgafs + @AIX64@${INSTALL_DATA} export64.exp ${DESTDIR}${libdir}/afs/export64.exp + @AIX64@${INSTALL_DATA} export64.ext ${DESTDIR}${afskerneldir}/export64.ext + @AIX64@${INSTALL_DATA} export64.ext.nonfs ${DESTDIR}${afskerneldir}/export64.ext.nonfs + @AIX64@${INSTALL_DATA} cfgexport64 ${DESTDIR}${afskerneldir}/cfgexport64 + @AIX64@${INSTALL_DATA} cfgafs64 ${DESTDIR}${afskerneldir}/cfgafs64 -${DEST}/root.client/usr/vice/etc/dkload/export64.ext: @AIX64@export64.ext -@AIX64@ ${INSTALL} $? $@ +dest: $(EXPORTS32) $(EXPORTS64) + ${INSTALL} -d ${DEST}/root.client/usr/vice/etc/dkload + ${INSTALL} -d ${DEST}/lib/afs + ${INSTALL_DATA} ${srcdir}/extras.exp ${DEST}/lib/afs/extras.exp + @AIX32@${INSTALL_DATA} export.exp ${DEST}/lib/afs/export.exp + @AIX32@${INSTALL} export.ext ${DEST}/root.client/usr/vice/etc/dkload/export.ext + @AIX32@${INSTALL} export.ext.nonfs ${DEST}/root.client/usr/vice/etc/dkload/export.ext.nonfs + @AIX32@${INSTALL} cfgexport ${DEST}/root.client/usr/vice/etc/dkload/cfgexport + @AIX32@${INSTALL} cfgafs ${DEST}/root.client/usr/vice/etc/dkload/cfgafs + @AIX64@${INSTALL_DATA} export64.exp ${DEST}/lib/afs/export64.exp + @AIX64@${INSTALL} export64.ext ${DEST}/root.client/usr/vice/etc/dkload/export64.ext + @AIX64@${INSTALL} export64.ext.nonfs ${DEST}/root.client/usr/vice/etc/dkload/export64.ext.nonfs + @AIX64@${INSTALL} cfgexport64 ${DEST}/root.client/usr/vice/etc/dkload/cfgexport64 + @AIX64@${INSTALL} cfgafs64 ${DEST}/root.client/usr/vice/etc/dkload/cfgafs64 -${DEST}/root.client/usr/vice/etc/dkload/export.ext.nonfs: export.ext.nonfs - ${INSTALL} $? $@ - -${DEST}/root.client/usr/vice/etc/dkload/export64.ext.nonfs: @AIX64@export64.ext.nonfs -@AIX64@ ${INSTALL} $? $@ - -${DESTDIR}${afskerneldir}/export.ext: export.ext - ${INSTALL} $? $@ - -${DESTDIR}${afskerneldir}/export64.ext: @AIX64@export64.ext -@AIX64@ ${INSTALL} $? $@ - -${DESTDIR}${afskerneldir}/export.ext.nonfs: export.ext.nonfs - ${INSTALL} $? $@ - -${DESTDIR}${afskerneldir}/export64.ext.nonfs: @AIX64@export64.ext.nonfs -@AIX64@ ${INSTALL} $? $@ - -${DEST}/lib/afs/export.exp: export.exp - ${INSTALL} $? $@ - -${DEST}/lib/afs/export64.exp: export64.exp - ${INSTALL} $? $@ - -${DESTDIR}${libdir}/afs/export.exp: export.exp - ${INSTALL} $? $@ - -${DESTDIR}${libdir}/afs/export64.exp: export64.exp - ${INSTALL} $? $@ - -${TOP_LIBDIR}/export.exp: export.exp - ${INSTALL} $? $@ - -${TOP_LIBDIR}/export64.exp: export64.exp - ${INSTALL} $? $@ - -${DEST}/lib/afs/extras.exp: ${srcdir}/extras.exp - ${INSTALL} $? $@ - -${DESTDIR}${libdir}/afs/extras.exp: ${srcdir}/extras.exp - ${INSTALL} $? $@ - - -${TOP_LIBDIR}/extras.exp: ${srcdir}/extras.exp - ${INSTALL} $? $@ - - -${DEST}/root.client/usr/vice/etc/dkload/cfgexport: cfgexport - ${INSTALL} $? $@ - -${DEST}/root.client/usr/vice/etc/dkload/cfgexport64: @AIX64@cfgexport64 -@AIX64@ ${INSTALL} $? $@ - -${DEST}/root.client/usr/vice/etc/dkload/cfgafs: cfgafs - ${INSTALL} $? $@ - -${DEST}/root.client/usr/vice/etc/dkload/cfgafs64: @AIX64@cfgafs64 -@AIX64@ ${INSTALL} $? $@ - -${DESTDIR}${afskerneldir}/cfgexport: cfgexport - ${INSTALL} $? $@ - -${DESTDIR}${afskerneldir}/cfgexport64: @AIX64@cfgexport64 -@AIX64@ ${INSTALL} $? $@ - -${DESTDIR}${afskerneldir}/cfgafs: cfgafs - ${INSTALL} $? $@ - -${DESTDIR}${afskerneldir}/cfgafs64: @AIX64@cfgafs64 -@AIX64@ ${INSTALL} $? $@ - -dest: ${DEST}/root.client/usr/vice/etc/dkload/export.ext \ - ${DEST}/root.client/usr/vice/etc/dkload/export.ext.nonfs \ - ${DEST}/root.client/usr/vice/etc/dkload/export64.ext.nonfs \ - ${DEST}/lib/afs/export.exp \ - ${DEST}/lib/afs/export64.exp \ - ${DEST}/lib/afs/extras.exp \ - ${DEST}/root.client/usr/vice/etc/dkload/cfgexport \ - ${DEST}/root.client/usr/vice/etc/dkload/cfgafs \ - ${DEST}/root.client/usr/vice/etc/dkload/export64.ext \ - ${DEST}/root.client/usr/vice/etc/dkload/cfgexport64 \ - ${DEST}/root.client/usr/vice/etc/dkload/cfgafs64 +include ../config/Makefile.version diff --git a/src/export/cfgexport.c b/src/export/cfgexport.c index 41a1b713fb..65a90c8334 100644 --- a/src/export/cfgexport.c +++ b/src/export/cfgexport.c @@ -377,7 +377,7 @@ get_syms(conf, syms) * strp - ^ to ^ to EXPORT string table * szp - ^ to EXPORT string table size */ -#define SYMBUFSIZE 262144 +#define SYMBUFSIZE 1048576 xlate_xtok(xp, kp, strp, szp) register struct syment *xp; register sym_t *kp; @@ -420,12 +420,18 @@ xlate_xtok(xp, kp, strp, szp) */ len = strlen(xstrings + xp->n_offset) + 1; while (len >= left) { + fprintf(stderr, "cfgexport: Out of memory. Increase SYMBUFSIZE and recompile\n"); + exit(1); +#if 0 + /* Something is broken with this code, after being here + cfgexport segfaults */ export_strings = (char *)realloc(*strp, sz += SYMBUFSIZE); if (!export_strings) error("no memory for EXPORT string table"); *strp = export_strings; left += SYMBUFSIZE; prev = ""; /* lazy */ +#endif } strcpy(prev = *strp + offset, xstrings + xp->n_offset); diff --git a/src/libafs/MakefileProto.AIX.in b/src/libafs/MakefileProto.AIX.in index 66129fc3a2..56820818b6 100644 --- a/src/libafs/MakefileProto.AIX.in +++ b/src/libafs/MakefileProto.AIX.in @@ -76,6 +76,8 @@ DESTDIRS = aix_destdirs KMODS=32 KMODS=32 64 + +KMODS=64 include Makefile.common diff --git a/src/sys/Makefile.in b/src/sys/Makefile.in index 12b7206bc4..b8bb1b4cbd 100644 --- a/src/sys/Makefile.in +++ b/src/sys/Makefile.in @@ -215,7 +215,7 @@ ${TOP_LIBDIR}/${LIBAFSSETPAG_DARWIN}: ${LIBAFSSETPAG_DARWIN} afs.exp: ${srcdir}/afs4.exp ${srcdir}/afs5.exp @set -x; case ${SYS_NAME} in \ - rs_aix5* ) \ + rs_aix[56]* ) \ cp -p ${srcdir}/afs5.exp afs.exp ;; \ rs_aix* ) \ cp -p ${srcdir}/afs4.exp afs.exp ;; \ @@ -225,7 +225,7 @@ afs.exp: ${srcdir}/afs4.exp ${srcdir}/afs5.exp afsl.exp: ${srcdir}/afsl4.exp ${srcdir}/afsl5.exp @set -x; case ${SYS_NAME} in \ - rs_aix5* ) \ + rs_aix[56]* ) \ cp -p ${srcdir}/afsl5.exp afsl.exp ;; \ rs_aix* ) \ cp -p ${srcdir}/afsl4.exp afsl.exp ;; \