From: Simon Wilkinson Date: Wed, 29 Jul 2009 15:58:03 +0000 (+0100) Subject: Make rxgen emit prototype for ExecuteRequest X-Git-Tag: openafs-devel-1_5_61~12 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=967abaf29b29866174fecc22df85fb4a19ab5833;p=packages%2Fo%2Fopenafs.git Make rxgen emit prototype for ExecuteRequest Make rxgen provide a prototype in its header file for _ExecuteRequest, and remove all of the adhoc prototypes from the tree. Reviewed-on: http://gerrit.openafs.org/247 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear --- diff --git a/src/WINNT/afsd/afsd.h b/src/WINNT/afsd/afsd.h index 0e0332ba1..9970867a1 100644 --- a/src/WINNT/afsd/afsd.h +++ b/src/WINNT/afsd/afsd.h @@ -28,6 +28,8 @@ BOOL APIENTRY About(HWND, unsigned int, unsigned int, long); #include #include #include +#define FSINT_COMMON_XG + #include #include "cm_config.h" diff --git a/src/WINNT/afsd/afsd_init.c b/src/WINNT/afsd/afsd_init.c index bcf3302b9..f0c0a19c6 100644 --- a/src/WINNT/afsd/afsd_init.c +++ b/src/WINNT/afsd/afsd_init.c @@ -28,8 +28,10 @@ #endif #include #include +#include #include #include +#include #include "smb.h" #include "cm_rpc.h" @@ -40,9 +42,6 @@ #include #endif -extern int RXAFSCB_ExecuteRequest(struct rx_call *z_call); -extern int RXSTATS_ExecuteRequest(struct rx_call *z_call); - extern afs_uint32 cryptall; extern afs_uint32 cm_anonvldb; extern int cm_enableServerLocks; diff --git a/src/afs/afs_init.c b/src/afs/afs_init.c index dc25f2684..f823f16ba 100644 --- a/src/afs/afs_init.c +++ b/src/afs/afs_init.c @@ -21,6 +21,10 @@ #include "afs/sysincludes.h" /* Standard vendor system headers */ #include "afsincludes.h" /* Afs-based standard headers */ #include "afs/afs_stats.h" /* afs statistics */ +#include "rx/rxstat.h" + +#define FSINT_COMMON_XG +#include "afs/afscbint.h" /* Exported variables */ struct osi_dev cacheDev; /*Cache device */ diff --git a/src/afs/afs_prototypes.h b/src/afs/afs_prototypes.h index ec5b23359..3559de579 100644 --- a/src/afs/afs_prototypes.h +++ b/src/afs/afs_prototypes.h @@ -1322,15 +1322,6 @@ extern void afs_ntohuuid(afsUUID * uuidp); extern afs_int32 afs_uuid_create(afsUUID * uuid); extern u_short afs_uuid_hash(afsUUID * uuid); - -/* MISC PROTOTYPES - THESE SHOULD NOT BE HERE */ -/* MOVE THEM TO APPROPRIATE LOCATIONS */ -extern afs_int32 RXAFSCB_ExecuteRequest(struct rx_call *acall); -extern afs_int32 RXSTATS_ExecuteRequest(struct rx_call *acall); -extern afs_int32 PAGCB_ExecuteRequest(struct rx_call *acall); - - - #if defined(AFS_SUN5_ENV) || defined(AFS_LINUX20_ENV) || defined(AFS_AIX_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV) || defined(AFS_HPUX_ENV) || defined(AFS_SGI62_ENV) || defined(AFS_OSF_ENV) #include "osi_prototypes.h" #endif diff --git a/src/bozo/bosprototypes.h b/src/bozo/bosprototypes.h index 15abe3c5b..5314c0cc8 100644 --- a/src/bozo/bosprototypes.h +++ b/src/bozo/bosprototypes.h @@ -37,10 +37,6 @@ int bnode_NewProc(struct bnode *abnode, char *aexecString, char *coreName, int bnode_StopProc(struct bnode_proc *aproc, int asignal); int bnode_Deactivate(struct bnode *abnode); -/* bosint.ss.c */ -struct rx_call; -int BOZO_ExecuteRequest(register struct rx_call *z_call); - /* bosserver.c */ void bozo_Log(char *format, ... ); int bozo_ReBozo(void); diff --git a/src/bozo/bosserver.c b/src/bozo/bosserver.c index 20d1a0397..99f657944 100644 --- a/src/bozo/bosserver.c +++ b/src/bozo/bosserver.c @@ -39,7 +39,6 @@ #include "bosprototypes.h" #include #include -#include #include #include #include diff --git a/src/bucoord/ttest.c b/src/bucoord/ttest.c index 21f1d0f7f..5a71d264e 100644 --- a/src/bucoord/ttest.c +++ b/src/bucoord/ttest.c @@ -20,8 +20,6 @@ #include "bc.h" -extern TC_ExecuteRequest(); - /* dump information */ static afs_int32 transID = 1000; /* dump or restore transaction id */ static afs_int32 bytesDumped = 0; diff --git a/src/budb/budb_internal.h b/src/budb/budb_internal.h index 670576652..450010f41 100644 --- a/src/budb/budb_internal.h +++ b/src/budb/budb_internal.h @@ -10,9 +10,6 @@ #ifndef _BUDB_PROTOTYPES_H #define _BUDB_PROTOTYPES_H -/* budb.ss.c */ -int BUDB_ExecuteRequest(register struct rx_call *z_call); - /* db_alloc.c */ afs_int32 InitDBalloc(void); afs_int32 AllocStructure(struct ubik_trans *ut, char type, dbadr related, diff --git a/src/butc/tcmain.c b/src/butc/tcmain.c index c2f12f0b8..1b485368a 100644 --- a/src/butc/tcmain.c +++ b/src/butc/tcmain.c @@ -66,7 +66,6 @@ #define CFG_PREFIX "CFG" struct ubik_client *cstruct; -extern void TC_ExecuteRequest(struct rx_call *); FILE *logIO, *ErrorlogIO, *centralLogIO, *lastLogIO; char lFile[AFSDIR_PATH_MAX]; char logFile[256]; diff --git a/src/fsprobe/fsprobe.c b/src/fsprobe/fsprobe.c index 016a5bd25..2c85ee7bc 100644 --- a/src/fsprobe/fsprobe.c +++ b/src/fsprobe/fsprobe.c @@ -25,21 +25,11 @@ #include #include #include - -#define LWP_STACK_SIZE (16 * 1024) -/* - * Routines we need that don't have explicit include file definitions. - */ -extern int RXAFSCB_ExecuteRequest(struct rx_call *); /*AFS callback dispatcher */ +#define FSINT_COMMON_XG +#include -/* - * Help out the linker by explicitly importing the callback routines. - */ -extern afs_int32 SRXAFSCB_CallBack(struct rx_call *, AFSCBFids *, AFSCBs *); -extern afs_int32 SRXAFSCB_InitCallBackState2(struct rx_call *, - struct interfaceAddr *); -extern afs_int32 SRXAFSCB_Probe(struct rx_call *); +#define LWP_STACK_SIZE (16 * 1024) /* * Exported variables. diff --git a/src/kauth/kaserver.c b/src/kauth/kaserver.c index 8c0b282de..460620230 100644 --- a/src/kauth/kaserver.c +++ b/src/kauth/kaserver.c @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include @@ -168,10 +169,6 @@ main(int argc, char *argv[]) struct rx_securityClass *scm[3]; extern int rx_stackSize; - extern int KAA_ExecuteRequest(struct rx_call *); - extern int KAT_ExecuteRequest(struct rx_call *); - extern int KAM_ExecuteRequest(struct rx_call *); - extern int RXSTATS_ExecuteRequest(struct rx_call *); #ifdef AFS_AIX32_ENV /* diff --git a/src/libadmin/test/client.c b/src/libadmin/test/client.c index 55597f389..3d2cf619e 100644 --- a/src/libadmin/test/client.c +++ b/src/libadmin/test/client.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #define FSINT_COMMON_XG #include diff --git a/src/ptserver/ptprototypes.h b/src/ptserver/ptprototypes.h index 12eff060d..4e0a4cae1 100644 --- a/src/ptserver/ptprototypes.h +++ b/src/ptserver/ptprototypes.h @@ -10,11 +10,6 @@ #ifndef _PTPROTOTYPES_H_ #define _PTPROTOTYPES_H_ - - -/* ptint.ss.c */ -extern int PR_ExecuteRequest (struct rx_call *z_call); - /* utils.c */ #if defined(SUPERGROUPS) extern afs_int32 IsAMemberOfSG(struct ubik_trans *at, afs_int32 aid, diff --git a/src/ptserver/ptserver.c b/src/ptserver/ptserver.c index 5ea4d6ac9..4b046e908 100644 --- a/src/ptserver/ptserver.c +++ b/src/ptserver/ptserver.c @@ -210,7 +210,6 @@ main(int argc, char **argv) char hostname[64]; struct rx_service *tservice; struct rx_securityClass *sc[3]; - extern int RXSTATS_ExecuteRequest(struct rx_call *); #if 0 struct ktc_encryptionKey tkey; #endif diff --git a/src/rx/bulk.example/bulk_server.c b/src/rx/bulk.example/bulk_server.c index f4bc65c20..21e283b2a 100644 --- a/src/rx/bulk.example/bulk_server.c +++ b/src/rx/bulk.example/bulk_server.c @@ -22,7 +22,6 @@ #define N_SECURITY_OBJECTS 1 -extern int BULK_ExecuteRequest(register struct rx_call *z_call); void Quit(char *msg); int diff --git a/src/rx/bulktest/bulk_server.c b/src/rx/bulktest/bulk_server.c index 505a1fd7e..2bdedbf6c 100644 --- a/src/rx/bulktest/bulk_server.c +++ b/src/rx/bulktest/bulk_server.c @@ -23,7 +23,6 @@ #define N_SECURITY_OBJECTS 1 -extern BULK_ExecuteRequest(); InterruptSignal() { diff --git a/src/rx/multi.example/sample_server.c b/src/rx/multi.example/sample_server.c index 28be0db42..c13161327 100644 --- a/src/rx/multi.example/sample_server.c +++ b/src/rx/multi.example/sample_server.c @@ -20,7 +20,6 @@ #define N_SECURITY_OBJECTS 1 -extern TEST__ExecuteRequest(); main() { diff --git a/src/rx/simple.example/sample_server.c b/src/rx/simple.example/sample_server.c index 3342394cd..dbc7c7846 100644 --- a/src/rx/simple.example/sample_server.c +++ b/src/rx/simple.example/sample_server.c @@ -18,8 +18,6 @@ #define N_SECURITY_OBJECTS 1 -extern TEST_ExecuteRequest(); - main() { struct rx_securityClass *(securityObjects[N_SECURITY_OBJECTS]); diff --git a/src/rxgen/rpc_main.c b/src/rxgen/rpc_main.c index 783ee21f3..fd48fb715 100644 --- a/src/rxgen/rpc_main.c +++ b/src/rxgen/rpc_main.c @@ -529,6 +529,8 @@ h_output(char *infile, char *define, int extend, char *outfile, int append) while ((def = get_definition())) { print_datadef(def); } + printf("Printing ex_req\n"); + h_Proc_CodeGeneration(); h_opcode_stats(); hflag = 0; f_print(fout, "#endif /* _RXGEN_%s_ */\n", uppercase(fullname)); diff --git a/src/rxgen/rpc_parse.c b/src/rxgen/rpc_parse.c index 330aec1eb..d4c24da1f 100644 --- a/src/rxgen/rpc_parse.c +++ b/src/rxgen/rpc_parse.c @@ -2154,6 +2154,38 @@ er_TailofOldStyleProc_setup(void) f_print(fout, "\treturn z_result;\n}\n"); } +static void +h_ProcMainBody_setup(void) +{ + f_print(fout,"\nextern int %s%sExecuteRequest(struct rx_call *);\n", + prefix, PackagePrefix[PackageIndex]); +} + +static void +h_HeadofOldStyleProc_setup(void) +{ + f_print(fout,"\nextern int %s%sExecuteRequest(struct rx_call *);\n", + prefix, + (combinepackages ? MasterPrefix : PackagePrefix[PackageIndex])); +} + +void +h_Proc_CodeGeneration(void) +{ + int temp; + + temp = PackageIndex; + if (!combinepackages) + PackageIndex = 0; + for (; PackageIndex <= temp; PackageIndex++) { + if (combinepackages || opcode_holes_exist()) { + h_HeadofOldStyleProc_setup(); + } else { + h_ProcMainBody_setup(); + } + } + PackageIndex = temp; +} void h_opcode_stats(void) diff --git a/src/rxgen/rpc_util.h b/src/rxgen/rpc_util.h index 3722421f4..46731a61d 100644 --- a/src/rxgen/rpc_util.h +++ b/src/rxgen/rpc_util.h @@ -141,6 +141,7 @@ extern int function_list_index; extern definition *get_definition(void); extern void er_Proc_CodeGeneration(void); +extern void h_Proc_CodeGeneration(void); extern void h_opcode_stats(void); extern void generate_multi_macros(definition * defp); extern int IsRxgenToken(token * tokp); diff --git a/src/rxkad/test/stress_s.c b/src/rxkad/test/stress_s.c index 673f773c1..45902a08d 100644 --- a/src/rxkad/test/stress_s.c +++ b/src/rxkad/test/stress_s.c @@ -32,9 +32,6 @@ #include "stress.h" #include "stress_internal.h" - -extern RXKST_ExecuteRequest(); - struct ktc_encryptionKey serviceKey = { 0x45, 0xe3, 0x3d, 0x16, 0x29, 0x64, 0x8a, 0x8f }; long serviceKeyVersion = 7; diff --git a/src/rxstat/Makefile.in b/src/rxstat/Makefile.in index ca2790265..b958ee902 100644 --- a/src/rxstat/Makefile.in +++ b/src/rxstat/Makefile.in @@ -17,15 +17,12 @@ LIBOBJS = rxstat.cs.o rxstat.ss.o rxstat.xdr.o rxstat.o all: depinstall ${TOP_LIBDIR}/librxstat.a depinstall: \ - ${TOP_INCDIR}/rx/rxstat.h ${TOP_INCDIR}/rx/rxstat_prototypes.h Krxstat.cs.c \ + ${TOP_INCDIR}/rx/rxstat.h Krxstat.cs.c \ Krxstat.ss.c Krxstat.xdr.c ${TOP_INCDIR}/rx/rxstat.h: rxstat.h ${INSTALL_DATA} $? $@ -${TOP_INCDIR}/rx/rxstat_prototypes.h: rxstat_prototypes.h - ${INSTALL_DATA} $? $@ - ${TOP_LIBDIR}/librxstat.a: librxstat.a ${INSTALL_DATA} $? $@ @@ -62,23 +59,18 @@ Krxstat.ss.c: rxstat.xg Krxstat.xdr.c: rxstat.xg ${RXGEN} -x -k -c -o $@ ${srcdir}/rxstat.xg -${DEST}/include/rx/rxstat_prototypes.h: rxstat_prototypes.h - ${INSTALL} $? $@ - # # Install targets # install: rxstat.h librxstat.a ${INSTALL} -d ${DESTDIR}${includedir}/rx ${INSTALL} -d ${DESTDIR}${libdir} - ${INSTALL_DATA} rxstat_prototypes.h ${DESTDIR}${includedir}/rx/rxstat_prototypes.h ${INSTALL_DATA} rxstat.h ${DESTDIR}${includedir}/rx/rxstat.h ${INSTALL_DATA} librxstat.a ${DESTDIR}${libdir}/librxstat.a dest: rxstat.h librxstat.a ${INSTALL} -d ${DEST}/include/rx ${INSTALL} -d ${DEST}/lib - ${INSTALL_DATA} rxstat_prototypes.h ${DEST}/include/rx/rxstat_prototypes.h ${INSTALL_DATA} rxstat.h ${DEST}/include/rx/rxstat.h ${INSTALL_DATA} librxstat.a ${DEST}/lib/librxstat.a diff --git a/src/rxstat/NTMakefile b/src/rxstat/NTMakefile index 654dab08b..2f4cd5157 100644 --- a/src/rxstat/NTMakefile +++ b/src/rxstat/NTMakefile @@ -15,7 +15,6 @@ INCFILEDIR = $(DESTDIR)\include INCFILES =\ $(INCFILEDIR)\rx\rxstat.h \ - $(INCFILEDIR)\rx\rxstat_prototypes.h # Library component lists. @@ -46,7 +45,6 @@ rxstat.h: rxstat.xg copyheader: rxstat.h $(COPY) rxstat.h $(INCFILEDIR)\rx\rxstat.h - $(COPY) rxstat_prototypes.h $(INCFILEDIR)\rx\rxstat_prototypes.h install: copyheader $(LIBFILE) $(INCFILES) diff --git a/src/rxstat/rxstat_prototypes.h b/src/rxstat/rxstat_prototypes.h deleted file mode 100644 index 22cd80204..000000000 --- a/src/rxstat/rxstat_prototypes.h +++ /dev/null @@ -1,16 +0,0 @@ -/* - * 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 _RXSTATS_PROTOTYPES_H -#define _RXSTATS_PROTOTYPES_H - -/* rxstat.ss.c */ -extern int RXSTATS_ExecuteRequest(register struct rx_call *z_call); - -#endif diff --git a/src/sys/sys_prototypes.h b/src/sys/sys_prototypes.h index e4e2c9597..3f3c46d72 100644 --- a/src/sys/sys_prototypes.h +++ b/src/sys/sys_prototypes.h @@ -21,10 +21,6 @@ extern int ioctl_afs_syscall(long, long, long, long, long, long, long, int *); /* pioctl.c */ extern int lpioctl(char *, int, void *, int); -/* rmtsys.ss.c */ -struct rx_call; -extern int RMTSYS_ExecuteRequest(struct rx_call *); - /* rmtsysc.c */ struct ViceIoctl; extern int pioctl(char *path, afs_int32 cmd, struct ViceIoctl *data, diff --git a/src/tests/afscp.c b/src/tests/afscp.c index d974e2dcf..d3c0194fb 100644 --- a/src/tests/afscp.c +++ b/src/tests/afscp.c @@ -115,7 +115,6 @@ statfile(char *path, char *cellname, afs_uint32 * server, struct AFSFid *f) } -extern int RXAFSCB_ExecuteRequest(); struct rx_securityClass *sc; extern int diff --git a/src/ubik/ubik.p.h b/src/ubik/ubik.p.h index 0c77b3d51..e419ebac7 100644 --- a/src/ubik/ubik.p.h +++ b/src/ubik/ubik.p.h @@ -441,11 +441,6 @@ extern void ubik_print(const char *format, ...); extern void ubik_dprint(const char *format, ...); /*\}*/ -/*! \name ubik_int.xg - rxgen really should prototype these for us ... */ -extern int VOTE_ExecuteRequest(register struct rx_call *); -extern int DISK_ExecuteRequest(register struct rx_call *); -/*\}*/ - #endif /* UBIK_INTERNALS */ extern afs_int32 ubik_nBuffers; diff --git a/src/ubik/utst_server.c b/src/ubik/utst_server.c index cc43e4a50..8076fc48c 100644 --- a/src/ubik/utst_server.c +++ b/src/ubik/utst_server.c @@ -274,8 +274,6 @@ SAMPLE_Test(struct rx_connection *rxconn) #include "AFS_component_version_number.c" -extern int SAMPLE_ExecuteRequest(struct rx_call *); - int main(int argc, char **argv) { diff --git a/src/update/server.c b/src/update/server.c index 1de831208..dca13f823 100644 --- a/src/update/server.c +++ b/src/update/server.c @@ -49,8 +49,6 @@ #include "update.h" #include "global.h" -extern int UPDATE_ExecuteRequest(struct rx_call *); - static int AddObject(char **expPath, char *dir); static int PathInDirectory(char *dir, char *path); int update_SendFile(int, struct rx_call *, struct stat *); diff --git a/src/viced/viced.c b/src/viced/viced.c index 339f32673..92c0700f9 100644 --- a/src/viced/viced.c +++ b/src/viced/viced.c @@ -68,6 +68,7 @@ #include #include #include +#include #include #include #include @@ -91,7 +92,6 @@ #include "sys/lock.h" #endif #include -#include #ifdef O_LARGEFILE #define afs_stat stat64 @@ -115,9 +115,6 @@ static void ResetCheckDescriptors(void); static void ResetCheckSignal(void); static void *CheckSignal(void *); -extern int RXAFS_ExecuteRequest(struct rx_call *); -extern int RXSTATS_ExecuteRequest(struct rx_call *); - static afs_int32 Do_VLRegisterRPC(void); int eventlog = 0, rxlog = 0; diff --git a/src/vlserver/vlserver.c b/src/vlserver/vlserver.c index 155884b31..4a6c2c2e0 100644 --- a/src/vlserver/vlserver.c +++ b/src/vlserver/vlserver.c @@ -39,7 +39,6 @@ #include #include #include -#include #include #include #include diff --git a/src/vlserver/vlserver_internal.h b/src/vlserver/vlserver_internal.h index f5dc82309..a96223777 100644 --- a/src/vlserver/vlserver_internal.h +++ b/src/vlserver/vlserver_internal.h @@ -10,9 +10,6 @@ #ifndef _VLSERVER_INTERNAL_H #define _VLSERVER_INTERNAL_H -/* vldbinit.ss.c */ -extern int VL_ExecuteRequest(struct rx_call *z_call); - /* vlprocs.c */ extern int Init_VLdbase(struct ubik_trans **trans, int locktype, int this_op); diff --git a/src/volser/volmain.c b/src/volser/volmain.c index ab0052c1e..fa683c4eb 100644 --- a/src/volser/volmain.c +++ b/src/volser/volmain.c @@ -46,6 +46,7 @@ #include #include #include +#include #include #include #include @@ -78,8 +79,6 @@ int GlobalVolType; int VolumeChanged; /* XXXX */ static char busyFlags[MAXHELPERS]; struct volser_trans *QI_GlobalWriteTrans = 0; -extern int AFSVolExecuteRequest(struct rx_call*); -extern int RXSTATS_ExecuteRequest(struct rx_call*); struct afsconf_dir *tdir; static afs_int32 runningCalls = 0; int DoLogging = 0; diff --git a/src/xstat/xstat_fs.c b/src/xstat/xstat_fs.c index 9f03030ca..964754866 100644 --- a/src/xstat/xstat_fs.c +++ b/src/xstat/xstat_fs.c @@ -27,9 +27,6 @@ #define LWP_STACK_SIZE (16 * 1024) -/* This should really be in a header file */ -extern int RXAFSCB_ExecuteRequest(struct rx_call *z_call); - /* * Exported variables. */