Subject: fgetstr() problem
To: None <current-users@netbsd.org>
From: Ray Phillips <r.phillips@jkmrc.uq.edu.au>
List: current-users
Date: 06/11/2004 18:17:28
Recently I tried to compile three of J"org Schilling's programs -- 
smake, star and cdrtools -- from source code on an i386 machine 
running NetBSD 2.0E (compiled from CVS sources, updated on 10 June) 
and struck a problem.

All of these build fine on 1.6.1, but 2.0E's /usr/include/stdio.h has 
a prototype (if that's the right term) for fgetstr() which wasn't 
present before:

char    *fgetstr __P((FILE * __restrict, size_t * __restrict, int));

and which clashes with the one in J"org's code:

extern  int     fgetstr __PR((FILE *, char *, int));

I wrote to him and asked if he could modify his programs to take this 
into account, to which he replied:

"...try to convince the NetBSD people to remove their buggy prototype
from /usr/include/stdio.h ... I am using fgetstr() since 1996! If 
people on NetBSD ignore POSIX rules and pollute the namespace with 
wrong prototypes, they
have to live with programs they cannot compile."

I'm not knowledgable enough to take sides, but it would be nice if 
this problem hadn't cropped up.

Does the 2.0E's stdio.h violate POSIX?  Is there a possibility of it 
being changed?


Ray