On Thu, 10 Jun 2004, Dave Korn wrote: > > -----Original Message----- > > From: Igor Pechtchanski > > Sent: 10 June 2004 17:48 > > > IMO, this is a bug in <mntent.h>. There's no reason not to include > > all the prerequisites, as include guards will take care of multiple > > includes. It shouldn't require the users to include other headers > > before it... > > > > Yes, I know, I know, PTC... > > Don't think that this one should need an assign! > > --- mntent.old.h 2004-06-10 18:33:11.485938400 +0100 > +++ mntent.new.h 2004-06-10 18:35:13.501071300 +0100 > @@ -11,6 +11,10 @@ details. */ > #ifndef _MNTENT_H > #define _MNTENT_H > > +#ifndef _STDIO_H_ > +#include <stdio.h> /* For FILE type. */ > +#endif > + > #ifdef __cplusplus > extern "C" { > #endif > @@ -25,6 +29,7 @@ struct mntent > int mnt_passno; > }; > > + > #ifndef _NOMNTENT_FUNCS > FILE *setmntent (const char *__filep, const char *__type); > struct mntent *getmntent (FILE *__filep);
The #ifdef/#endif just repeat the same test inside <stdio.h>. It should be possible to just include it. The second hunk looks like a gratuitous blank line... And the include probably should go into the #if surrounding the definition of all those functions. In other words, Index: winsup/cygwin/include/mntent.h =================================================================== RCS file: /cvs/src/src/winsup/cygwin/include/mntent.h,v retrieving revision 1.3 diff -u -p -r1.3 mntent.h --- winsup/cygwin/include/mntent.h 5 Mar 2001 21:29:20 -0000 1.3 +++ winsup/cygwin/include/mntent.h 10 Jun 2004 18:01:54 -0000 @@ -26,6 +26,8 @@ struct mntent }; #ifndef _NOMNTENT_FUNCS +#include <stdio.h> /* For FILE type. */ + FILE *setmntent (const char *__filep, const char *__type); struct mntent *getmntent (FILE *__filep); int addmntent (FILE *__filep, const struct mntent *__mnt); should suffice. Oh, and your patch won't apply (wrong destination file) and is missing a ChangeLog (so is mine, but I'm not submitting it, just correcting yours -- feel free to add a ChangeLog entry and send). HTH, Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_ [EMAIL PROTECTED] ZZZzz /,`.-'`' -. ;-;;,_ [EMAIL PROTECTED] |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D. '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! "I have since come to realize that being between your mentor and his route to the bathroom is a major career booster." -- Patrick Naughton -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/