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.31 retrieving revision 1.39 diff -u -p -r1.31 -r1.39 --- src/include/stdio.h 1999/12/22 21:26:18 1.31 +++ src/include/stdio.h 2000/11/15 15:44:05 1.39 @@ -1,4 +1,4 @@ -/* $NetBSD: stdio.h,v 1.31 1999/12/22 21:26:18 kleink Exp $ */ +/* $NetBSD: stdio.h,v 1.39 2000/11/15 15:44:05 briggs Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -41,9 +41,7 @@ #ifndef _STDIO_H_ #define _STDIO_H_ -#if !defined(_ANSI_SOURCE) && !defined(__STRICT_ANSI__) -#include -#endif +#include #include #include @@ -54,18 +52,18 @@ typedef _BSD_SIZE_T_ size_t; #undef _BSD_SIZE_T_ #endif -#include +#include /* * This is fairly grotesque, but pure ANSI code must not inspect the * innards of an fpos_t anyway. The library internally uses off_t, * which we assume is exactly as big as eight chars. */ -#if !defined(_ANSI_SOURCE) && !defined(__STRICT_ANSI__) -typedef off_t fpos_t; +#if (!defined(_ANSI_SOURCE) && !defined(__STRICT_ANSI__)) || defined(_LIBC) +typedef __off_t fpos_t; #else typedef struct __sfpos { - long long _pos; /* XXX must be the same as off_t */ + __off_t _pos; } fpos_t; #endif @@ -157,8 +155,8 @@ __END_DECLS #define __SMBF 0x0080 /* _buf is from malloc */ #define __SAPP 0x0100 /* fdopen()ed in append mode */ #define __SSTR 0x0200 /* this is an sprintf/snprintf string */ -#define __SOPT 0x0400 /* do fseek() optimisation */ -#define __SNPT 0x0800 /* do not do fseek() optimisation */ +#define __SOPT 0x0400 /* do fseek() optimization */ +#define __SNPT 0x0800 /* do not do fseek() optimization */ #define __SOFF 0x1000 /* set iff _offset is in fact correct */ #define __SMOD 0x2000 /* true => fgetln modified _p text */ #define __SALC 0x4000 /* allocate string space dynamically */ @@ -331,6 +329,22 @@ __END_DECLS #endif /* + * X/Open CAE Specification Issue 5 Version 2 + */ +#if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || \ + (_XOPEN_SOURCE - 0) >= 500 || defined(_LARGEFILE_SOURCE) +#ifndef off_t +typedef __off_t off_t; +#define off_t __off_t +#endif /* off_t */ + +__BEGIN_DECLS +int fseeko __P((FILE *, off_t, int)); +off_t ftello __P((FILE *)); +__END_DECLS +#endif /* (!_POSIX_SOURCE && !_XOPEN_SOURCE) || ... */ + +/* * Routines that are purely local. */ #if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \ @@ -348,6 +362,8 @@ int vscanf __P((const char *, _BSD_VA_L __attribute__((__format__(__scanf__, 1, 0))); int vsscanf __P((const char *, const char *, _BSD_VA_LIST_)) __attribute__((__format__(__scanf__, 2, 0))); +__const char *fmtcheck __P((const char *, const char *)) + __attribute__((__format_arg__(2))); __END_DECLS /*