diff options
Diffstat (limited to 'usr.bin/rpcgen/rpc_main.c')
-rw-r--r-- | usr.bin/rpcgen/rpc_main.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/usr.bin/rpcgen/rpc_main.c b/usr.bin/rpcgen/rpc_main.c index 5e2ebf7..2674b3a 100644 --- a/usr.bin/rpcgen/rpc_main.c +++ b/usr.bin/rpcgen/rpc_main.c @@ -152,11 +152,7 @@ int newstyle; /* newstyle of passing arguments (by value) */ int Cflag = 0; /* ANSI C syntax */ int CCflag = 0; /* C++ files */ static int allfiles; /* generate all files */ -#if defined(__FreeBSD__) || defined(__NetBSD__) -int tirpcflag = 0; /* generating code for tirpc, by default */ -#else int tirpcflag = 1; /* generating code for tirpc, by default */ -#endif xdrfunc *xdrfunc_head = NULL; /* xdr function list */ xdrfunc *xdrfunc_tail = NULL; /* xdr function list */ pid_t childpid; @@ -692,9 +688,10 @@ s_output(argc, argv, infile, define, extend, outfile, nomain, netflag) f_print(fout, "#include <memory.h>\n"); #if defined(__FreeBSD__) || defined(__NetBSD__) +#else if (tirpcflag) -#endif f_print(fout, "#include <stropts.h>\n"); +#endif if (inetdflag || !tirpcflag) { f_print(fout, "#include <sys/socket.h>\n"); f_print(fout, "#include <netinet/in.h>\n"); @@ -1173,11 +1170,7 @@ parseargs(argc, argv, cmd) * generating backward compatible * code */ -#if defined(__FreeBSD__) || defined(__NetBSD__) - tirpcflag = 1; -#else tirpcflag = 0; -#endif break; case 'I': @@ -1273,9 +1266,7 @@ parseargs(argc, argv, cmd) } } else { /* 4.1 mode */ pmflag = 0; /* set pmflag only in tirpcmode */ -#if !defined(__FreeBSD__) && !defined(__NetBSD__) inetdflag = 1; /* inetdflag is TRUE by default */ -#endif if (cmd->nflag) { /* netid needs TIRPC */ warnx("cannot use netid flag without TIRPC"); return (0); |