Subject: Re: fgetstr() problem
To: Ray Phillips <r.phillips@jkmrc.uq.edu.au>
From: Ian Zagorskih <ianzag@megasignal.com>
List: current-users
Date: 06/11/2004 16:03:46
=D0=92 =D1=81=D0=BE=D0=BE=D0=B1=D1=89=D0=B5=D0=BD=D0=B8=D0=B8 =D0=BE=D1=82 =
11 =D0=98=D1=8E=D0=BD=D1=8C 2004 15:17 Ray Phillips =D0=BD=D0=B0=D0=BF=D0=
=B8=D1=81=D0=B0=D0=BB(a):
> 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?
>

I do not see fgetstr() function in POSIX specs. It just dosn't exist there.=
=20
Same as in NetBSD-release-2-0 manual pages or stdio.h header file. And=20
personally i'v never saw it in C.

Where you got this function ? Even not you but the author of program.

// wbr