Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/include/stdio.h,v rcsdiff: /ftp/cvs/cvsroot/src/include/stdio.h,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.58 retrieving revision 1.60 diff -u -p -r1.58 -r1.60 --- src/include/stdio.h 2005/02/09 21:35:46 1.58 +++ src/include/stdio.h 2005/05/25 19:35:07 1.60 @@ -1,4 +1,4 @@ -/* $NetBSD: stdio.h,v 1.58 2005/02/09 21:35:46 kleink Exp $ */ +/* $NetBSD: stdio.h,v 1.60 2005/05/25 19:35:07 kleink Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -221,12 +221,13 @@ int fflush(FILE *); int fgetc(FILE *); int fgetpos(FILE * __restrict, fpos_t * __restrict); char *fgets(char * __restrict, int, FILE * __restrict); -FILE *fopen(const char *, const char *); +FILE *fopen(const char * __restrict , const char * __restrict); int fprintf(FILE * __restrict , const char * __restrict, ...); int fputc(int, FILE *); int fputs(const char * __restrict, FILE * __restrict); size_t fread(void * __restrict, size_t, size_t, FILE * __restrict); -FILE *freopen(const char *, const char *, FILE * __restrict); +FILE *freopen(const char * __restrict, const char * __restrict, + FILE * __restrict); int fscanf(FILE * __restrict, const char * __restrict, ...); int fseek(FILE *, long, int); int fsetpos(FILE *, const fpos_t *); @@ -313,17 +314,29 @@ __END_DECLS #endif /* - * Functions defined in XPG4.2. + * Functions defined in ISO XPG4.2, ISO C99, POSIX 1003.1-2001 or later. */ -#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE) -__BEGIN_DECLS -int getw(FILE *); -int putw(int, FILE *); +#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \ + !defined(_XOPEN_SOURCE) || \ + ((__STDC_VERSION__ - 0) >= 199901L) || \ + ((_POSIX_C_SOURCE - 0) >= 200112L) || \ + (defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE_EXTENDED)) || \ + ((_XOPEN_SOURCE - 0) >= 500) || \ + defined(_ISOC99_SOURCE) || defined(_NETBSD_SOURCE) int snprintf(char * __restrict, size_t, const char * __restrict, ...) __attribute__((__format__(__printf__, 3, 4))); int vsnprintf(char * __restrict, size_t, const char * __restrict, _BSD_VA_LIST_) __attribute__((__format__(__printf__, 3, 0))); +#endif + +/* + * Functions defined in XPG4.2. + */ +#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE) +__BEGIN_DECLS +int getw(FILE *); +int putw(int, FILE *); #ifndef __AUDIT__ char *tempnam(const char *, const char *);