From 1991fa031c685d5cdcfc07cfea552bd7c33804e9 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Fri, 9 Mar 2012 22:46:12 +0000 Subject: Remove __GNU_LIBRARY__ conditionals from rpcgen. --- sunrpc/rpc_main.c | 46 ---------------------------------------------- 1 file changed, 46 deletions(-) (limited to 'sunrpc/rpc_main.c') 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 /* ioctl, TIOCNOTTY */\n"); -#else - fprintf (fout, "#include /* TIOCNOTTY */\n"); -#endif if (Cflag && (inetdflag || pmflag)) { -#ifdef __GNU_LIBRARY__ fprintf (fout, "#include /* open */\n"); fprintf (fout, "#include /* open */\n"); fprintf (fout, "#include /* open */\n"); fprintf (fout, "#include /* getdtablesize */\n"); -#else - fprintf (fout, "#ifdef __cplusplus\n"); - fprintf (fout, "#include /* getdtablesize, open */\n"); - fprintf (fout, "#endif /* __cplusplus */\n"); - if (tirpcflag) - fprintf (fout, "#include /* setsid */\n"); -#endif } -#ifdef __GNU_LIBRARY__ if (tirpcflag && !(Cflag && (inetdflag || pmflag))) -#else - if (tirpcflag) -#endif fprintf (fout, "#include \n"); fprintf (fout, "#include \n"); -#ifndef __GNU_LIBRARY__ - fprintf (fout, "#include \n"); -#endif if (inetdflag || !tirpcflag) { fprintf (fout, "#include \n"); @@ -752,25 +725,13 @@ s_output (int argc, const char *argv[], const char *infile, const char *define, fprintf (fout, "#include /* rlimit */\n"); if (logflag || inetdflag || pmflag) { -#ifdef __GNU_LIBRARY__ fprintf (fout, "#include \n"); -#else - fprintf (fout, "#ifdef SYSLOG\n"); - fprintf (fout, "#include \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")); -- cgit 1.4.1