rxgen: skip ubik for KERNEL
authorChaskiel Grundman <cg2v@andrew.cmu.edu>
Wed, 29 May 2013 17:05:15 +0000 (13:05 -0400)
committerBenjamin Kaduk <kaduk@mit.edu>
Mon, 1 Dec 2014 21:54:35 +0000 (16:54 -0500)
Declare ubik rxgen stubs only for !KERNEL, UKERNEL doesn't need them anymore.
Don't declare ubik_client or #include ubik.h on KERNEL or UKERNEL.

Change-Id: I0b1587eb46e9efbf627f04c74e0d76f9858bffd0
Reviewed-on: http://gerrit.openafs.org/9954
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

src/rxgen/rpc_hout.c
src/rxgen/rpc_main.c

index 386db3b..e4e15ac 100644 (file)
@@ -273,8 +273,11 @@ psprocdef(definition * defp)
     if (!(!multi_flag && split_flag))
         psproc1(defp, 0, "int", "", 0xFFFFFFFF);
 
-    if (uflag && !kflag)
+    if (uflag && !kflag) {
+       f_print(fout, "\n#ifndef KERNEL");
        psproc1(defp, 2, "int", "ubik_", 0xFFFFFFFF);
+       f_print(fout, "#endif /* KERNEL */\n");
+    }
 
     if (*ServerPrefix)
        psproc1(defp, 3, "afs_int32", ServerPrefix, 0xFFFFFFFF);
index ec97dc3..9a517fc 100644 (file)
@@ -461,14 +461,11 @@ h_output(char *infile, char *define, int extend, char *outfile, int append)
     if (brief_flag) {
        f_print(fout, "#include \"rx/rx_opaque.h\"\n");
     }
-    if (uflag)
-       f_print(fout, "#include <ubik.h>\n");
     f_print(fout, "#else       /* UKERNEL */\n");
     f_print(fout, "#include \"h/types.h\"\n");
     f_print(fout, "#ifndef     SOCK_DGRAM  /* XXXXX */\n");
     f_print(fout, "#include \"h/socket.h\"\n");
     f_print(fout, "#endif\n");
-    f_print(fout, "struct ubik_client;\n");
     f_print(fout, "#ifndef     DTYPE_SOCKET  /* XXXXX */\n");
     f_print(fout, "#ifndef AFS_LINUX22_ENV\n");
     f_print(fout, "#include \"h/file.h\"\n");