From beff42414aeb908b141f116d2b47b2a5baee28ad Mon Sep 17 00:00:00 2001 From: Harald Barth Date: Tue, 7 Dec 2004 16:48:57 +0000 Subject: [PATCH] aix-5-update-20041207 updates for aix 5 --- acinclude.m4 | 4 ++++ src/export/cfgexport.c | 17 ++++++++++------- src/libuafs/MakefileProto.AIX.in | 4 +++- src/lwp/lwp.h | 4 ++++ src/rxkad/rxkad.p.h | 10 ++++++++++ 5 files changed, 31 insertions(+), 8 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index 92674be12..e0d37ab81 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -469,15 +469,19 @@ else ;; power*-ibm-aix4.2*) AFS_SYSNAME="rs_aix42" + enable_pam="no" ;; power*-ibm-aix4.3*) AFS_SYSNAME="rs_aix42" + enable_pam="no" ;; power*-ibm-aix5.1*) AFS_SYSNAME="rs_aix51" + enable_pam="no" ;; power*-ibm-aix5.2*) AFS_SYSNAME="rs_aix52" + enable_pam="no" ;; x86_64-*-linux-gnu) AFS_SYSNAME="amd64_linuxXX" diff --git a/src/export/cfgexport.c b/src/export/cfgexport.c index 4acca1f7f..41a1b713f 100644 --- a/src/export/cfgexport.c +++ b/src/export/cfgexport.c @@ -202,7 +202,9 @@ get_syms(conf, syms) FILE *fp; int xsym_compar(); - fp = fopen(syms, "r"); + if (syms == NULL) + sys_error("syms is NULL"); + fp = fopen(syms, "r"); if (fp == NULL) sys_error(syms); @@ -375,6 +377,7 @@ get_syms(conf, syms) * strp - ^ to ^ to EXPORT string table * szp - ^ to EXPORT string table size */ +#define SYMBUFSIZE 262144 xlate_xtok(xp, kp, strp, szp) register struct syment *xp; register sym_t *kp; @@ -386,13 +389,13 @@ xlate_xtok(xp, kp, strp, szp) static left, offset, sz; if (!export_strings) { - export_strings = malloc(sz = 1024); + export_strings = malloc(sz = SYMBUFSIZE); if (!export_strings) error("no memory for EXPORT string table"); *strp = export_strings; *szp = offset = sizeof(uint); - left = 1024 - offset; + left = SYMBUFSIZE - offset; export_strings += offset; @@ -417,11 +420,11 @@ xlate_xtok(xp, kp, strp, szp) */ len = strlen(xstrings + xp->n_offset) + 1; while (len >= left) { - export_strings = (char *)realloc(*strp, sz += 1024); + export_strings = (char *)realloc(*strp, sz += SYMBUFSIZE); if (!export_strings) error("no memory for EXPORT string table"); *strp = export_strings; - left += 1024; + left += SYMBUFSIZE; prev = ""; /* lazy */ } @@ -452,11 +455,11 @@ xlate_xtok(xp, kp, strp, szp) */ len = strlen(xp->n_nptr) + 1; while (len >= left) { - export_strings = (char *)realloc(*strp, sz += 1024); + export_strings = (char *)realloc(*strp, sz += SYMBUFSIZE); if (!export_strings) error("no memory for EXPORT string table"); *strp = export_strings; - left += 1024; + left += SYMBUFSIZE; prev = ""; /* lazy */ } diff --git a/src/libuafs/MakefileProto.AIX.in b/src/libuafs/MakefileProto.AIX.in index 993c05645..6dfd9c8d8 100644 --- a/src/libuafs/MakefileProto.AIX.in +++ b/src/libuafs/MakefileProto.AIX.in @@ -30,7 +30,9 @@ LIBJUAFS = libjuafs.a LIBAFSWEB = nsafs.a LIBAFSWEBKRB = nsafs.krb.a -OPTF=-O +# To get __file__ (afs_osi_pag.c) you need to specify language level +# C99 to xlc_r like this: +OPTF=-O -qlanglvl=stdc99 WEBOPTS = -I../nsapi -qarch=com -DNETSCAPE_NSAPI -DAIX -DNET_SSL -DXP_UNIX -DMCC_HTTPD include Makefile.common diff --git a/src/lwp/lwp.h b/src/lwp/lwp.h index 72dcfa212..1e62cae93 100644 --- a/src/lwp/lwp.h +++ b/src/lwp/lwp.h @@ -302,9 +302,13 @@ char lwp_debug; /* ON = show LWP debugging trace */ #if defined(AFS_LINUX22_ENV) #define AFS_LWP_MINSTACKSIZE (192 * 1024) #else +#if defined(AFS_AIX52_ENV) +#define AFS_LWP_MINSTACKSIZE (128 * 1024) +#else #define AFS_LWP_MINSTACKSIZE (48 * 1024) #endif #endif +#endif /* Action to take on stack overflow. */ #define LWP_SOQUIET 1 /* do nothing */ diff --git a/src/rxkad/rxkad.p.h b/src/rxkad/rxkad.p.h index 5887d23cf..0caab625d 100644 --- a/src/rxkad/rxkad.p.h +++ b/src/rxkad/rxkad.p.h @@ -16,7 +16,17 @@ /* no ticket good for longer than 30 days */ #define MAXKTCTICKETLIFETIME (30*24*3600) #define MINKTCTICKETLEN 32 + +#if defined(AFS_AIX52_ENV) +#ifdef __XCOFF64__ #define MAXKTCTICKETLEN 12000 /* was 344 */ +#else +#define MAXKTCTICKETLEN 344 +#endif +#else +#define MAXKTCTICKETLEN 12000 /* was 344 */ +#endif + #define MAXKTCNAMELEN 64 /* name & inst should be 256 */ #define MAXKTCREALMLEN 64 /* should be 256 */ #define KTC_TIME_UNCERTAINTY (15*60) /* max skew bet. machines' clocks */ -- 2.39.5