Make rxgen emit prototype for ExecuteRequest
authorSimon Wilkinson <sxw@inf.ed.ac.uk>
Wed, 29 Jul 2009 15:58:03 +0000 (16:58 +0100)
committerDerrick Brashear <shadow@dementia.org>
Thu, 30 Jul 2009 01:42:47 +0000 (18:42 -0700)
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 <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

35 files changed:
src/WINNT/afsd/afsd.h
src/WINNT/afsd/afsd_init.c
src/afs/afs_init.c
src/afs/afs_prototypes.h
src/bozo/bosprototypes.h
src/bozo/bosserver.c
src/bucoord/ttest.c
src/budb/budb_internal.h
src/butc/tcmain.c
src/fsprobe/fsprobe.c
src/kauth/kaserver.c
src/libadmin/test/client.c
src/ptserver/ptprototypes.h
src/ptserver/ptserver.c
src/rx/bulk.example/bulk_server.c
src/rx/bulktest/bulk_server.c
src/rx/multi.example/sample_server.c
src/rx/simple.example/sample_server.c
src/rxgen/rpc_main.c
src/rxgen/rpc_parse.c
src/rxgen/rpc_util.h
src/rxkad/test/stress_s.c
src/rxstat/Makefile.in
src/rxstat/NTMakefile
src/rxstat/rxstat_prototypes.h [deleted file]
src/sys/sys_prototypes.h
src/tests/afscp.c
src/ubik/ubik.p.h
src/ubik/utst_server.c
src/update/server.c
src/viced/viced.c
src/vlserver/vlserver.c
src/vlserver/vlserver_internal.h
src/volser/volmain.c
src/xstat/xstat_fs.c

index 0e0332b..9970867 100644 (file)
@@ -28,6 +28,8 @@ BOOL APIENTRY About(HWND, unsigned int, unsigned int, long);
 #include <osi.h>
 #include <afs/vldbint.h>
 #include <afs/afsint.h>
+#define FSINT_COMMON_XG
+
 #include <afs/prs_fs.h>
 
 #include "cm_config.h"
index bcf3302..f0c0a19 100644 (file)
 #endif
 #include <rx\rx.h>
 #include <rx\rx_null.h>
+#include <rx\rxstat.h>
 #include <WINNT/syscfg.h>
 #include <WINNT/afsreg.h>
+#include <afs\afscbint.h>
 
 #include "smb.h"
 #include "cm_rpc.h"
@@ -40,9 +42,6 @@
 #include <crtdbg.h>
 #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;
index dc25f26..f823f16 100644 (file)
 #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 */
index ec5b233..3559de5 100644 (file)
@@ -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
index 15abe3c..5314c0c 100644 (file)
@@ -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);
index 20d1a03..99f6579 100644 (file)
@@ -39,7 +39,6 @@
 #include "bosprototypes.h"
 #include <rx/rxkad.h>
 #include <rx/rxstat.h>
-#include <rx/rxstat_prototypes.h>
 #include <afs/keys.h>
 #include <afs/ktime.h>
 #include <afs/afsutil.h>
index 21f1d0f..5a71d26 100644 (file)
@@ -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;
index 6705766..450010f 100644 (file)
@@ -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,
index c2f12f0..1b48536 100644 (file)
@@ -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];
index 016a5bd..2c85ee7 100644 (file)
 #include <afs/cellconfig.h>
 #include <afs/afsint.h>
 #include <afs/afsutil.h>
-    
-#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 <afs/afscbint.h>
 
-/*
- * 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.
index 8c0b282..4606202 100644 (file)
@@ -34,6 +34,7 @@
 #include <lwp.h>
 #include <rx/xdr.h>
 #include <rx/rx.h>
+#include <rx/rxstat.h>
 #include <rx/rxkad.h>
 #include <rx/rx_globals.h>
 #include <afs/cellconfig.h>
@@ -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
     /*
index 55597f3..3d2cf61 100644 (file)
@@ -19,7 +19,6 @@
 #include <afs/cellconfig.h>
 #include <afs/bosint.h>
 #include <rx/rxstat.h>
-#include <rx/rxstat_prototypes.h>
 #include <afs/afsint.h>
 #define FSINT_COMMON_XG
 #include <afs/afscbint.h>
index 12eff06..4e0a4ca 100644 (file)
 #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, 
index 5ea4d6a..4b046e9 100644 (file)
@@ -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
index f4bc65c..21e283b 100644 (file)
@@ -22,7 +22,6 @@
 
 #define N_SECURITY_OBJECTS 1
 
-extern int BULK_ExecuteRequest(register struct rx_call *z_call);
 void Quit(char *msg);
 
 int
index 505a1fd..2bdedbf 100644 (file)
@@ -23,7 +23,6 @@
 
 #define N_SECURITY_OBJECTS 1
 
-extern BULK_ExecuteRequest();
 
 InterruptSignal()
 {
index 28be0db..c131613 100644 (file)
@@ -20,7 +20,6 @@
 
 #define N_SECURITY_OBJECTS 1
 
-extern TEST__ExecuteRequest();
 
 main()
 {
index 3342394..dbc7c78 100644 (file)
@@ -18,8 +18,6 @@
 
 #define N_SECURITY_OBJECTS 1
 
-extern TEST_ExecuteRequest();
-
 main()
 {
     struct rx_securityClass *(securityObjects[N_SECURITY_OBJECTS]);
index 783ee21..fd48fb7 100644 (file)
@@ -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));
index 330aec1..d4c24da 100644 (file)
@@ -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)
index 3722421..46731a6 100644 (file)
@@ -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);
index 673f773..45902a0 100644 (file)
@@ -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;
index ca27902..b958ee9 100644 (file)
@@ -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
 
index 654dab0..2f4cd51 100644 (file)
@@ -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 (file)
index 22cd802..0000000
+++ /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
index e4e2c95..3f3c46d 100644 (file)
@@ -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, 
index d974e2d..d3c0194 100644 (file)
@@ -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
index 0c77b3d..e419eba 100644 (file)
@@ -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;
index cc43e4a..8076fc4 100644 (file)
@@ -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)
 {
index 1de8312..dca13f8 100644 (file)
@@ -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 *);
index 339f326..92c0700 100644 (file)
@@ -68,6 +68,7 @@
 #include <afs/acl.h>
 #include <afs/prs_fs.h>
 #include <rx/rx.h>
+#include <rx/rxstat.h>
 #include <afs/keys.h>
 #include <afs/afs_args.h>
 #include <afs/vlserver.h>
@@ -91,7 +92,6 @@
 #include "sys/lock.h"
 #endif
 #include <rx/rx_globals.h>
-#include <rx/rxstat_prototypes.h>
 
 #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;
index 155884b..4a6c2c2 100644 (file)
@@ -39,7 +39,6 @@
 #include <rx/rx.h>
 #include <rx/rx_globals.h>
 #include <rx/rxstat.h>
-#include <rx/rxstat_prototypes.h>
 #include <afs/cellconfig.h>
 #include <afs/keys.h>
 #include <afs/auth.h>
index f5dc823..a962237 100644 (file)
@@ -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);
 
index ab0052c..fa683c4 100644 (file)
@@ -46,6 +46,7 @@
 #include <afs/volume.h>
 #include <afs/partition.h>
 #include <rx/rx.h>
+#include <rx/rxstat.h>
 #include <rx/rx_globals.h>
 #include <afs/auth.h>
 #include <afs/cellconfig.h>
@@ -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;
index 9f03030..9647548 100644 (file)
@@ -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.
  */