From FreeBSD via Jukka Salmi: Don't coredump on stdin.
This commit is contained in:
parent
bd65ddcdb1
commit
915f599cbf
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: rpc_main.c,v 1.30 2008/01/15 20:04:48 christos Exp $ */
|
||||
/* $NetBSD: rpc_main.c,v 1.31 2008/02/29 22:27:15 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
|
||||
@ -39,7 +39,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)rpc_main.c 1.30 89/03/30 (C) 1987 SMI";
|
||||
#else
|
||||
__RCSID("$NetBSD: rpc_main.c,v 1.30 2008/01/15 20:04:48 christos Exp $");
|
||||
__RCSID("$NetBSD: rpc_main.c,v 1.31 2008/02/29 22:27:15 christos Exp $");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -532,7 +532,10 @@ h_output(infile, define, extend, outfile)
|
||||
outfilename = extend ? extendfile(infile, outfile) : outfile;
|
||||
open_output(infile, outfilename);
|
||||
add_warning();
|
||||
guard = generate_guard(outfilename ? outfilename : infile);
|
||||
if (outfilename || infile)
|
||||
guard = generate_guard(outfilename ? outfilename : infile);
|
||||
else
|
||||
guard = "STDIN_";
|
||||
|
||||
f_print(fout, "#ifndef _%s\n#define _%s\n\n", guard,
|
||||
guard);
|
||||
|
Loading…
Reference in New Issue
Block a user