From 3aa14478bfcff9aedeedf986e09c6274b6c5ced3 Mon Sep 17 00:00:00 2001 From: Tom Keiser Date: Wed, 1 Feb 2006 16:20:07 +0000 Subject: [PATCH] aix-prototyping-fixes-20060201 FIXES 26102 fix some prototypes and enable prototype enforcement for aix --- src/bozo/bnode.c | 4 +--- src/cf/osconf.m4 | 8 ++++---- src/venus/up.c | 19 +++++++++++-------- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/src/bozo/bnode.c b/src/bozo/bnode.c index a4ba07e48..952e59231 100644 --- a/src/bozo/bnode.c +++ b/src/bozo/bnode.c @@ -738,12 +738,10 @@ hdl_notifier(struct bnode_proc *tp) #if defined(AFS_HPUX_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_SGI51_ENV) ec = setsid(); -#else -#ifdef AFS_LINUX20_ENV +#elif defined(AFS_LINUX20_ENV) || defined(AFS_AIX_ENV) ec = setpgrp(); #else ec = setpgrp(0, 0); -#endif #endif fout = popen(tb->notifier, "w"); if (fout == NULL) { diff --git a/src/cf/osconf.m4 b/src/cf/osconf.m4 index 76ec11772..6e2a18c93 100644 --- a/src/cf/osconf.m4 +++ b/src/cf/osconf.m4 @@ -488,7 +488,7 @@ case $AFS_SYSNAME in MT_LIBS="-lpthreads" SHLIB_SUFFIX="o" TXLIBS="-lcurses" - XCFLAGS="-K -D_NO_PROTO -D_NONSTD_TYPES -D_MBI=void" + XCFLAGS="-K -D_NONSTD_TYPES -D_MBI=void" XLIBS="${LIB_AFSDB} -ldl" SHLIB_LINKER="${MT_CC} -bM:SRE -berok" AIX64="#" @@ -504,7 +504,7 @@ case $AFS_SYSNAME in MT_LIBS="-lpthreads" SHLIB_SUFFIX="o" TXLIBS="-lcurses" - XCFLAGS="-K -D_NO_PROTO -D_NONSTD_TYPES -D_MBI=void" + XCFLAGS="-K -D_NONSTD_TYPES -D_MBI=void" XLIBS="${LIB_AFSDB} -ldl" SHLIB_LINKER="${MT_CC} -bM:SRE -berok" AIX64="" @@ -519,7 +519,7 @@ case $AFS_SYSNAME in MT_LIBS="-lpthreads" SHLIB_SUFFIX="o" TXLIBS="-lcurses" - XCFLAGS="-K -D_NO_PROTO -D_NONSTD_TYPES -D_MBI=void" + XCFLAGS="-K -D_NONSTD_TYPES -D_MBI=void" XLIBS="${LIB_AFSDB} -ldl" SHLIB_LINKER="${MT_CC} -bM:SRE -berok" AIX64="" @@ -534,7 +534,7 @@ case $AFS_SYSNAME in MT_LIBS="-lpthreads" SHLIB_SUFFIX="o" TXLIBS="-lcurses" - XCFLAGS="-K -D_NO_PROTO -D_NONSTD_TYPES -D_MBI=void" + XCFLAGS="-K -D_NONSTD_TYPES -D_MBI=void" XLIBS="${LIB_AFSDB} -ldl" SHLIB_LINKER="${MT_CC} -bM:SRE -berok" AIX64="" diff --git a/src/venus/up.c b/src/venus/up.c index 2f0520e2e..5ffc92fc4 100644 --- a/src/venus/up.c +++ b/src/venus/up.c @@ -83,8 +83,11 @@ struct OldAcl { char data[1]; }; -void ScanArgs(int, char *[]); -int Copy(char *, char *, short, int); +static void ScanArgs(int argc, char *argv[]); +static short MakeParent(char *file, afs_int32 owner); +static int Copy(char *file1, char *file2, short recursive, int level); +static int isMountPoint(char *name, struct ViceIoctl *blob); + /* ************************************************************ */ /* */ @@ -118,14 +121,14 @@ main(int argc, char *argv[]) /* now read each line of the CopyList */ if (Copy(file1, file2, !oneLevel, 0)) - exit(1); /* some type of failure */ + return(1); /* some type of failure */ - exit(0); + return(0); } #define USAGE "usage: up [-v1frxm] from to\n" -void +static void ScanArgs(int argc, char *argv[]) { /* skip program name */ @@ -186,7 +189,7 @@ ScanArgs(int argc, char *argv[]) * 1 if it exists, 0 otherwise. Note: the owner argument * is a hack. All directories made will have this owner. */ -short +static short MakeParent(char *file, afs_int32 owner) { char parent[MAXPATHLEN]; @@ -225,7 +228,7 @@ MakeParent(char *file, afs_int32 owner) * This does the bulk of the work of the program. Handle one file, * possibly copying subfiles if this is a directory */ -int +static int Copy(char *file1, char *file2, short recursive, int level) { struct stat s1, s2; /*Stat blocks */ @@ -712,7 +715,7 @@ Copy(char *file1, char *file2, short recursive, int level) } /*Copy */ -int +static int isMountPoint(char *name, struct ViceIoctl *blob) { afs_int32 code; -- 2.39.5