mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* vsnprintf.c (BSD_vfprintf): support 'll' prefix.
* vsnprintf.c (__sfeof): rename to avoid the collision with NetBSD's one. * vsnprintf.c (__sferror): ditto. * vsnprintf.c (__sclearerr): ditto. * vsnprintf.c (__sfileno): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33601 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b7d397348e
commit
cd3445ca6e
2 changed files with 31 additions and 9 deletions
13
ChangeLog
13
ChangeLog
|
@ -1,3 +1,16 @@
|
|||
Tue Nov 1 13:14:33 2011 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* vsnprintf.c (BSD_vfprintf): support 'll' prefix.
|
||||
|
||||
* vsnprintf.c (__sfeof): rename to avoid the collision with NetBSD's
|
||||
one.
|
||||
|
||||
* vsnprintf.c (__sferror): ditto.
|
||||
|
||||
* vsnprintf.c (__sclearerr): ditto.
|
||||
|
||||
* vsnprintf.c (__sfileno): ditto.
|
||||
|
||||
Tue Nov 1 12:36:16 2011 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* internal.h (rb_maygvl_fd_fix_cloexec): change the visibility for
|
||||
|
|
27
vsnprintf.c
27
vsnprintf.c
|
@ -206,20 +206,20 @@ typedef struct __sFILE {
|
|||
#define EOF (-1)
|
||||
|
||||
|
||||
#define __sfeof(p) (((p)->_flags & __SEOF) != 0)
|
||||
#define __sferror(p) (((p)->_flags & __SERR) != 0)
|
||||
#define __sclearerr(p) ((void)((p)->_flags &= ~(__SERR|__SEOF)))
|
||||
#define __sfileno(p) ((p)->_file)
|
||||
#define BSD__sfeof(p) (((p)->_flags & __SEOF) != 0)
|
||||
#define BSD__sferror(p) (((p)->_flags & __SERR) != 0)
|
||||
#define BSD__sclearerr(p) ((void)((p)->_flags &= ~(__SERR|__SEOF)))
|
||||
#define BSD__sfileno(p) ((p)->_file)
|
||||
|
||||
#undef feof
|
||||
#undef ferror
|
||||
#undef clearerr
|
||||
#define feof(p) __sfeof(p)
|
||||
#define ferror(p) __sferror(p)
|
||||
#define clearerr(p) __sclearerr(p)
|
||||
#define feof(p) BSD__sfeof(p)
|
||||
#define ferror(p) BSD__sferror(p)
|
||||
#define clearerr(p) BSD__sclearerr(p)
|
||||
|
||||
#ifndef _ANSI_SOURCE
|
||||
#define fileno(p) __sfileno(p)
|
||||
#define fileno(p) BSD__sfileno(p)
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -745,7 +745,16 @@ reswitch: switch (ch) {
|
|||
case 'z':
|
||||
#endif
|
||||
case 'l':
|
||||
#ifdef _HAVE_SANE_QUAD_
|
||||
if (*fmt == 'l') {
|
||||
fmt++;
|
||||
flags |= QUADINT;
|
||||
} else {
|
||||
flags |= LONGINT;
|
||||
}
|
||||
#else
|
||||
flags |= LONGINT;
|
||||
#endif
|
||||
goto rflag;
|
||||
#ifdef _HAVE_SANE_QUAD_
|
||||
#if SIZEOF_PTRDIFF_T == SIZEOF_LONG_LONG
|
||||
|
@ -1158,7 +1167,7 @@ long_len:
|
|||
done:
|
||||
FLUSH();
|
||||
error:
|
||||
return (__sferror(fp) ? EOF : ret);
|
||||
return (BSD__sferror(fp) ? EOF : ret);
|
||||
/* NOTREACHED */
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue