diff options
Diffstat (limited to 'sunrpc')
-rw-r--r-- | sunrpc/Makefile | 14 | ||||
-rw-r--r-- | sunrpc/rpc_cout.c | 2 | ||||
-rw-r--r-- | sunrpc/rpc_main.c | 46 | ||||
-rw-r--r-- | sunrpc/rpc_svcout.c | 10 | ||||
-rw-r--r-- | sunrpc/rpcgen.c | 2 |
5 files changed, 6 insertions, 68 deletions
diff --git a/sunrpc/Makefile b/sunrpc/Makefile index b7f63a50b2..e0339ad77f 100644 --- a/sunrpc/Makefile +++ b/sunrpc/Makefile @@ -1,4 +1,4 @@ -# Copyright (C) 1994-2004, 2005, 2006, 2011 Free Software Foundation, Inc. +# Copyright (C) 1994-2006, 2011, 2012 Free Software Foundation, Inc. # This file is part of the GNU C Library. # The GNU C Library is free software; you can redistribute it and/or @@ -85,12 +85,8 @@ install-bin := rpcgen rpcgen-objs = rpc_main.o rpc_hout.o rpc_cout.o rpc_parse.o \ rpc_scan.o rpc_util.o rpc_svcout.o rpc_clntout.o \ rpc_tblout.o rpc_sample.o -# These headers are part of rpcgen. -distribute := proto.h rpc_util.h rpc_parse.h rpc_scan.h \ - $(headers-in-tirpc) $(headers-not-in-tirpc) \ - $(rpcgen-objs:.o=.c) etc.rpc \ - errqueue.h extra-objs = $(rpcgen-objs) +others += rpcgen all: # Make this the default target; it will be defined in Rules. @@ -100,7 +96,6 @@ xtests := tst-getmyaddr ifeq ($(have-thread-library),yes) xtests += thrsvc endif -distribute += thrsvc.c ifeq (yes,$(build-static-nss)) otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \ @@ -155,10 +150,7 @@ $(objpfx)tst-getmyaddr: $(common-objpfx)linkobj/libc.so $(objpfx)tst-xdrmem: $(common-objpfx)linkobj/libc.so $(objpfx)tst-xdrmem2: $(common-objpfx)linkobj/libc.so -$(objpfx)rpcgen: $(addprefix $(objpfx),$(rpcgen-objs)) \ - $(sort $(filter $(common-objpfx)libc%,$(link-libc))) \ - $(addprefix $(csu-objpfx),start.o) $(+preinit) $(+postinit) - $(+link) +$(objpfx)rpcgen: $(addprefix $(objpfx),$(rpcgen-objs)) # This makes sure -DNOT_IN_libc is passed for all these modules. cpp-srcs-left := $(rpcgen-objs:.o=.c) diff --git a/sunrpc/rpc_cout.c b/sunrpc/rpc_cout.c index d003ad7dca..db7b571b33 100644 --- a/sunrpc/rpc_cout.c +++ b/sunrpc/rpc_cout.c @@ -416,13 +416,11 @@ emit_union (const definition * def) free (object); f_print (fout, "\t\tbreak;\n"); } -#ifdef __GNU_LIBRARY__ else { f_print (fout, "\tdefault:\n"); f_print (fout, "\t\tbreak;\n"); } -#endif } else { diff --git a/sunrpc/rpc_main.c b/sunrpc/rpc_main.c index ad1b40055d..3096455eec 100644 --- a/sunrpc/rpc_main.c +++ b/sunrpc/rpc_main.c @@ -164,18 +164,10 @@ int indefinitewait; /* If started by port monitors, hang till it wants */ int exitnow; /* If started by port monitors, exit after the call */ int timerflag; /* TRUE if !indefinite && !exitnow */ int newstyle; /* newstyle of passing arguments (by value) */ -#ifdef __GNU_LIBRARY__ int Cflag = 1; /* ANSI C syntax */ -#else -int Cflag; /* ANSI C/C++ syntax */ -#endif int CCflag; /* C++ files */ static int allfiles; /* generate all files */ -#ifdef __GNU_LIBRARY__ int tirpcflag; /* generating code for tirpc, by default */ -#else -int tirpcflag = 1; /* generating code for tirpc, by default */ -#endif xdrfunc *xdrfunc_head; /* xdr function list */ xdrfunc *xdrfunc_tail; /* xdr function list */ @@ -707,37 +699,18 @@ s_output (int argc, const char *argv[], const char *infile, const char *define, } if (!tirpcflag && inetdflag) -#ifdef __GNU_LIBRARY__ fprintf (fout, "#include <sys/ioctl.h> /* ioctl, TIOCNOTTY */\n"); -#else - fprintf (fout, "#include <sys/ttycom.h>/* TIOCNOTTY */\n"); -#endif if (Cflag && (inetdflag || pmflag)) { -#ifdef __GNU_LIBRARY__ fprintf (fout, "#include <sys/types.h> /* open */\n"); fprintf (fout, "#include <sys/stat.h> /* open */\n"); fprintf (fout, "#include <fcntl.h> /* open */\n"); fprintf (fout, "#include <unistd.h> /* getdtablesize */\n"); -#else - fprintf (fout, "#ifdef __cplusplus\n"); - fprintf (fout, "#include <sysent.h> /* getdtablesize, open */\n"); - fprintf (fout, "#endif /* __cplusplus */\n"); - if (tirpcflag) - fprintf (fout, "#include <unistd.h> /* setsid */\n"); -#endif } -#ifdef __GNU_LIBRARY__ if (tirpcflag && !(Cflag && (inetdflag || pmflag))) -#else - if (tirpcflag) -#endif fprintf (fout, "#include <sys/types.h>\n"); fprintf (fout, "#include <memory.h>\n"); -#ifndef __GNU_LIBRARY__ - fprintf (fout, "#include <stropts.h>\n"); -#endif if (inetdflag || !tirpcflag) { fprintf (fout, "#include <sys/socket.h>\n"); @@ -752,25 +725,13 @@ s_output (int argc, const char *argv[], const char *infile, const char *define, fprintf (fout, "#include <sys/resource.h> /* rlimit */\n"); if (logflag || inetdflag || pmflag) { -#ifdef __GNU_LIBRARY__ fprintf (fout, "#include <syslog.h>\n"); -#else - fprintf (fout, "#ifdef SYSLOG\n"); - fprintf (fout, "#include <syslog.h>\n"); - fprintf (fout, "#else\n"); - fprintf (fout, "#define LOG_ERR 1\n"); - fprintf (fout, "#define openlog(a, b, c)\n"); - fprintf (fout, "#endif\n"); -#endif } /* for ANSI-C */ if (Cflag) fprintf (fout, "\n#ifndef SIG_PF\n#define SIG_PF void(*)(int)\n#endif\n"); -#ifndef __GNU_LIBRARY__ - fprintf (fout, "\n#ifdef DEBUG\n#define RPC_SVC_FG\n#endif\n"); -#endif if (timerflag) fprintf (fout, "\n#define _RPCSVC_CLOSEDOWN %s\n", svcclosetime); while ((def = get_definition ()) != NULL) @@ -1266,25 +1227,21 @@ parseargs (int argc, const char *argv[], struct commandline *cmd) Cflag = 1; break; -#ifdef __GNU_LIBRARY__ case 'k': /* K&R C syntax */ Cflag = 0; break; -#endif case 'b': /* turn TIRPC flag off for generating backward compatible */ tirpcflag = 0; break; -#ifdef __GNU_LIBRARY__ case '5': /* turn TIRPC flag on for generating SysVr4 compatible */ tirpcflag = 1; break; -#endif case 'I': inetdflag = 1; break; @@ -1405,9 +1362,6 @@ parseargs (int argc, const char *argv[], struct commandline *cmd) else { /* 4.1 mode */ pmflag = 0; /* set pmflag only in tirpcmode */ -#ifndef __GNU_LIBRARY__ - inetdflag = 1; /* inetdflag is TRUE by default */ -#endif if (cmd->nflag) { /* netid needs TIRPC */ f_print (stderr, _("Cannot use netid flag without TIRPC!\n")); diff --git a/sunrpc/rpc_svcout.c b/sunrpc/rpc_svcout.c index 71d9abd97d..be234aee8a 100644 --- a/sunrpc/rpc_svcout.c +++ b/sunrpc/rpc_svcout.c @@ -91,12 +91,8 @@ write_most (const char *infile /* our name */ , int netflag, int nomain) if (inetdflag || pmflag) { const char *var_type; -#ifdef __GNU_LIBRARY__ /* WHY? */ var_type = (nomain ? "extern" : ""); -#else - var_type = (nomain ? "extern" : "static"); -#endif f_print (fout, "%s int _rpcpmstart;", var_type); f_print (fout, "\t\t/* Started by a port monitor ? */\n"); if (!tirpcflag) @@ -133,7 +129,6 @@ write_most (const char *infile /* our name */ , int netflag, int nomain) if (nomain) return; -#ifdef __GNU_LIBRARY__ if (Cflag) f_print (fout, "\nint\nmain (int argc, char **argv)\n"); else @@ -142,9 +137,6 @@ write_most (const char *infile /* our name */ , int netflag, int nomain) f_print (fout, "\tint argc;\n"); f_print (fout, "\tchar **argv;\n"); } -#else - f_print (fout, "\nmain()\n"); -#endif f_print (fout, "{\n"); if (inetdflag) { @@ -812,7 +804,7 @@ write_timeout_func (void) f_print (fout, "closedown (sig)\n\tint sig;\n"); f_print (fout, "{\n"); -#if defined (__GNU_LIBRARY__) && 0 +#if 0 f_print (fout, "\t(void) signal (sig, %s closedown);\n", Cflag ? "(SIG_PF)" : "(void(*)())"); #endif diff --git a/sunrpc/rpcgen.c b/sunrpc/rpcgen.c new file mode 100644 index 0000000000..1b455ba243 --- /dev/null +++ b/sunrpc/rpcgen.c @@ -0,0 +1,2 @@ +/* Empty file expected by glibc's standard build rules for + executables. */ |