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.87 retrieving revision 1.88.4.1 diff -u -p -r1.87 -r1.88.4.1 --- src/include/stdio.h 2013/04/26 17:37:06 1.87 +++ src/include/stdio.h 2014/08/10 07:03:53 1.88.4.1 @@ -1,4 +1,4 @@ -/* $NetBSD: stdio.h,v 1.87 2013/04/26 17:37:06 joerg Exp $ */ +/* $NetBSD: stdio.h,v 1.88.4.1 2014/08/10 07:03:53 tls Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -242,9 +242,6 @@ long ftell(FILE *); size_t fwrite(const void * __restrict, size_t, size_t, FILE * __restrict); int getc(FILE *); int getchar(void); -ssize_t getdelim(char ** __restrict, size_t * __restrict, int, - FILE * __restrict); -ssize_t getline(char ** __restrict, size_t * __restrict, FILE * __restrict); void perror(const char *); int printf(const char * __restrict, ...) __printflike(1, 2); @@ -461,9 +458,9 @@ __END_DECLS #if defined(__GNUC__) && defined(__STDC__) static __inline int __sputc(int _c, FILE *_p) { if (--_p->_w >= 0 || (_p->_w >= _p->_lbfsize && (char)_c != '\n')) - return (*_p->_p++ = _c); + return *_p->_p++ = (unsigned char)_c; else - return (__swbuf(_c, _p)); + return __swbuf(_c, _p); } #else /* @@ -508,10 +505,12 @@ static __inline int __sputc(int _c, FILE #endif /* !_ANSI_SOURCE && !__cplusplus*/ #if (_POSIX_C_SOURCE - 0) >= 200809L || defined(_NETBSD_SOURCE) +__BEGIN_DECLS int vdprintf(int, const char * __restrict, __va_list) __printflike(2, 0); int dprintf(int, const char * __restrict, ...) __printflike(2, 3); +__END_DECLS #endif /* (_POSIX_C_SOURCE - 0) >= 200809L || defined(_NETBSD_SOURCE) */ #if (_POSIX_C_SOURCE - 0) >= 199506L || (_XOPEN_SOURCE - 0) >= 500 || \ @@ -525,7 +524,12 @@ int dprintf(int, const char * __restric #if (_POSIX_C_SOURCE - 0) >= 200809L || (_XOPEN_SOURCE - 0) >= 700 || \ defined(_NETBSD_SOURCE) +__BEGIN_DECLS FILE *fmemopen(void * __restrict, size_t, const char * __restrict); +ssize_t getdelim(char ** __restrict, size_t * __restrict, int, + FILE * __restrict); +ssize_t getline(char ** __restrict, size_t * __restrict, FILE * __restrict); +__END_DECLS #endif #if (_POSIX_C_SOURCE - 0) >= 200809L || defined(_NETBSD_SOURCE) @@ -576,6 +580,12 @@ int vfscanf_l(FILE * __restrict, locale __va_list) __scanflike(3, 0); int vsscanf_l(const char * __restrict, locale_t, const char * __restrict, __va_list) __scanflike(3, 0); +#ifdef _NETBSD_SOURCE +int snprintf_ss(char *restrict, size_t, const char * __restrict, ...) + __printflike(3, 4); +int vsnprintf_ss(char *restrict, size_t, const char * __restrict, __va_list) + __printflike(3, 0); +#endif __END_DECLS #endif