Subject: Re: Another fix for bin/18785
To: None <tech-userlevel@netbsd.org>
From: None <jmmv@menta.net>
List: tech-userlevel
Date: 04/10/2003 20:25:28
What about this patch to fix this PR?  As this is a minor "fix" and may
bring portability problems when building the toolchain (the f flag is
not standard), I added the ifdef to avoid them... any way better?

Index: scan.l
===================================================================
RCS file: /cvsroot/src/usr.sbin/config/scan.l,v
retrieving revision 1.36
diff -u -r1.36 scan.l
--- scan.l	2002/11/17 23:36:20	1.36
+++ scan.l	2003/04/10 18:16:44
@@ -203,8 +203,11 @@
 int
 firstfile(const char *fname)
 {
-
+#if defined(__NetBSD__)
+	if ((yyin = fopen(fname, "rf")) == NULL)
+#else
 	if ((yyin = fopen(fname, "r")) == NULL)
+#endif
 		return (-1);
 	yyfile = conffile = fname;
 	yyline = 1;