Skip to content

Commit

Permalink
Fix for FreeBSD build as suggested by DennisHeimbigner Unidata#2043
Browse files Browse the repository at this point in the history
  • Loading branch information
BarrySmith committed Sep 26, 2021
1 parent cd6173f commit c9e1f9b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ncgen/ncgen.l
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@
#include "ncgeny.h"
#include "isnan.h"

#if !defined(fileno)
EXTERNL int fileno(FILE*);
#endif

#define FILL_STRING "_"
#define XDR_INT32_MIN (-2147483647-1)
Expand Down
2 changes: 2 additions & 0 deletions ncgen3/ncgen.l
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@
We include lexical definitions for all three, but use the second version.
*/

#if !defined(fileno)
extern int fileno(FILE*);
#endif

/* lex specification for tokens for ncgen */

Expand Down
2 changes: 2 additions & 0 deletions ncgen3/ncgen.y
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ static char SccsId[] = "$Id: ncgen.y,v 1.34 2010/03/31 18:18:41 dmh Exp $";
#include "ncgen.h"
#include "genlib.h" /* for grow_darray() et al */

#if !defined(fileno)
extern int fileno(FILE*);
#endif

typedef struct Symbol { /* symbol table entry */
char *name;
Expand Down

0 comments on commit c9e1f9b

Please # to comment.