diff options
Diffstat (limited to 'usr.bin/rpcgen')
-rw-r--r-- | usr.bin/rpcgen/rpc_main.c | 13 | ||||
-rw-r--r-- | usr.bin/rpcgen/rpc_parse.c | 10 | ||||
-rw-r--r-- | usr.bin/rpcgen/rpc_svcout.c | 4 | ||||
-rw-r--r-- | usr.bin/rpcgen/rpcgen.1 | 14 |
4 files changed, 18 insertions, 23 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); diff --git a/usr.bin/rpcgen/rpc_parse.c b/usr.bin/rpcgen/rpc_parse.c index 1d952cc..a4a44c8 100644 --- a/usr.bin/rpcgen/rpc_parse.c +++ b/usr.bin/rpcgen/rpc_parse.c @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /* * Sun RPC is a product of Sun Microsystems, Inc. and is provided for * unrestricted use provided that this legend is included on all tape @@ -593,7 +594,11 @@ get_type(prefixp, typep, dkind) (void) peekscan(TOK_INT, &tok); break; case TOK_HYPER: +#ifdef __FreeBSD__ *typep = "int64_t"; +#else + *typep = "longlong_t"; +#endif (void) peekscan(TOK_INT, &tok); break; @@ -642,7 +647,12 @@ unsigned_dec(typep) break; case TOK_HYPER: get_token(&tok); +#ifdef __FreeBSD__ *typep = "u_int64_t"; +#else + *typep = "longlong_t"; +#endif + (void) peekscan(TOK_INT, &tok); break; case TOK_INT: diff --git a/usr.bin/rpcgen/rpc_svcout.c b/usr.bin/rpcgen/rpc_svcout.c index 62b2ab1..86ff5a2 100644 --- a/usr.bin/rpcgen/rpc_svcout.c +++ b/usr.bin/rpcgen/rpc_svcout.c @@ -1,4 +1,6 @@ /* + * $FreeBSD$ + * * Sun RPC is a product of Sun Microsystems, Inc. and is provided for * unrestricted use provided that this legend is included on all tape * media and as a part of the software program in whole or part. Users @@ -635,7 +637,7 @@ printif(proc, transp, prefix, arg) char *prefix; char *arg; { - f_print(fout, "\tif (!svc_%s(%s, xdr_%s, %s%s)) {\n", + f_print(fout, "\tif (!svc_%s(%s, xdr_%s, (char *)%s%s)) {\n", proc, transp, arg, prefix, arg); } diff --git a/usr.bin/rpcgen/rpcgen.1 b/usr.bin/rpcgen/rpcgen.1 index d8ecd96..c00dda4 100644 --- a/usr.bin/rpcgen/rpcgen.1 +++ b/usr.bin/rpcgen/rpcgen.1 @@ -233,7 +233,7 @@ If this routine does not exist in the library, it must be provided. Providing an undefined data type allows customization of -.Xr XDR +.Xr xdr 3 routines. .Sh OPTIONS The following options are available: @@ -246,15 +246,6 @@ Generate transport specific .Tn RPC code for older versions of the operating system. -.Pp -Note: in -.Fx , -this compatibility flag is turned on by -default since -.Fx -supports only the older -.Tn ONC RPC -library. .It Fl c Compile into .Tn XDR @@ -510,9 +501,10 @@ use: .Sh SEE ALSO .Xr cc 1 , .Xr rpc 3 , +.Xr rpc_svc_calls 3 , .Xr syslog 3 , +.Xr xdr 3 , .Xr inetd 8 -.\" .BR rpc_svc_calls (3) .Rs .%T The rpcgen chapter in the NETP manual .Re |