projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
(1) Make __sputc() inline function invisible to gcc -traditional.
[unix-history]
/
usr
/
src
/
include
/
stdio.h
diff --git
a/usr/src/include/stdio.h
b/usr/src/include/stdio.h
index
a29ed59
..
1b489d0
100644
(file)
--- a/
usr/src/include/stdio.h
+++ b/
usr/src/include/stdio.h
@@
-7,7
+7,7
@@
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)stdio.h 5.1
3
(Berkeley) %G%
+ * @(#)stdio.h 5.1
4
(Berkeley) %G%
*/
#ifndef _STDIO_H_
*/
#ifndef _STDIO_H_
@@
-242,6
+242,13
@@
int snprintf __P((char *, size_t, const char *, ...));
int vsnprintf __P((char *, size_t, const char *, _VA_LIST_));
__END_DECLS
int vsnprintf __P((char *, size_t, const char *, _VA_LIST_));
__END_DECLS
+/*
+ * This is a #define because the function is used internally and
+ * (unlike vfscanf) the name __svfscanf is guaranteed not to collide
+ * with a user function when _ANSI_SOURCE or _POSIX_SOURCE is defined.
+ */
+#define vfscanf __svfscanf
+
/*
* Stdio function-access interface.
*/
/*
* Stdio function-access interface.
*/
@@
-261,6
+268,7
@@
__END_DECLS
*/
__BEGIN_DECLS
int __srget __P((FILE *));
*/
__BEGIN_DECLS
int __srget __P((FILE *));
+int __svfscanf __P((FILE *, const char *, _VA_LIST_));
int __swbuf __P((int, FILE *));
__END_DECLS
int __swbuf __P((int, FILE *));
__END_DECLS
@@
-269,8
+277,8
@@
__END_DECLS
* define function versions in the C library.
*/
#define __sgetc(p) (--(p)->_r < 0 ? __srget(p) : (int)(*(p)->_p++))
* define function versions in the C library.
*/
#define __sgetc(p) (--(p)->_r < 0 ? __srget(p) : (int)(*(p)->_p++))
-#if
def __GNUC__
-static
__
inline int __sputc(int _c, FILE *_p) {
+#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);
else
if (--_p->_w >= 0 || (_p->_w >= _p->_lbfsize && (char)_c != '\n'))
return (*_p->_p++ = _c);
else