diff options
author | obrien <obrien@FreeBSD.org> | 2000-12-09 09:35:55 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2000-12-09 09:35:55 +0000 |
commit | c2ee1dcc02035d781d6c70f06df7106979a9f870 (patch) | |
tree | 757810dc1fdd19be4c8125ccb9e8beb1aff3d929 /share/examples/sunrpc | |
parent | c174181f432119d1dae3f5e58ecc14c8d7b6f545 (diff) | |
download | FreeBSD-src-c2ee1dcc02035d781d6c70f06df7106979a9f870.zip FreeBSD-src-c2ee1dcc02035d781d6c70f06df7106979a9f870.tar.gz |
Add `_PATH_DEVZERO'.
Use _PATH_* where where possible.
Diffstat (limited to 'share/examples/sunrpc')
-rw-r--r-- | share/examples/sunrpc/msg/msg_proc.c | 4 | ||||
-rw-r--r-- | share/examples/sunrpc/msg/printmsg.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/share/examples/sunrpc/msg/msg_proc.c b/share/examples/sunrpc/msg/msg_proc.c index 96c1cb5..ed08883 100644 --- a/share/examples/sunrpc/msg/msg_proc.c +++ b/share/examples/sunrpc/msg/msg_proc.c @@ -1,7 +1,9 @@ /* @(#)msg_proc.c 2.1 88/08/11 4.0 RPCSRC */ +/* $FreeBSD$ */ /* * msg_proc.c: implementation of the remote procedure "printmessage" */ +#include <paths.h> #include <stdio.h> #include <rpc/rpc.h> /* always need this here */ #include "msg.h" /* need this too: msg.h will be generated by rpcgen */ @@ -16,7 +18,7 @@ printmessage_1(msg) static int result; /* must be static! */ FILE *f; - f = fopen("/dev/console", "w"); + f = fopen(_PATH_CONSOLE, "w"); if (f == NULL) { result = 0; return (&result); diff --git a/share/examples/sunrpc/msg/printmsg.c b/share/examples/sunrpc/msg/printmsg.c index f2d5285..681007c 100644 --- a/share/examples/sunrpc/msg/printmsg.c +++ b/share/examples/sunrpc/msg/printmsg.c @@ -1,7 +1,9 @@ /* @(#)printmsg.c 2.1 88/08/11 4.0 RPCSRC */ +/* $FreeBSD$ */ /* * printmsg.c: print a message on the console */ +#include <paths.h> #include <stdio.h> main(argc, argv) @@ -33,7 +35,7 @@ printmessage(msg) { FILE *f; - f = fopen("/dev/console", "w"); + f = fopen(_PATH_CONSOLE, "w"); if (f == NULL) { return (0); } |