diff options
Diffstat (limited to 'sysdeps/generic')
-rw-r--r-- | sysdeps/generic/_G_config.h | 18 | ||||
-rw-r--r-- | sysdeps/generic/printf_fphex.c | 8 |
2 files changed, 22 insertions, 4 deletions
diff --git a/sysdeps/generic/_G_config.h b/sysdeps/generic/_G_config.h index d63b0d71a6..04bc4ed644 100644 --- a/sysdeps/generic/_G_config.h +++ b/sysdeps/generic/_G_config.h @@ -21,8 +21,16 @@ typedef unsigned int wint_t; #endif #define _G_size_t size_t -#define _G_fpos_t __off_t -#define _G_fpos64_t __off_t +typedef struct +{ + __off_t __pos; + __mbstate_t __state; +} _G_fpos_t; +typedef struct +{ + __off64_t __pos; + __mbstate_t __state; +} _G_fpos64_t; #define _G_ssize_t __ssize_t #define _G_off_t __off_t #define _G_off64_t __off_t @@ -31,6 +39,12 @@ typedef unsigned int wint_t; #define _G_wchar_t wchar_t #define _G_wint_t wint_t #define _G_stat64 stat +#include <gconv.h> +typedef struct +{ + __gconv_t __cd; + struct __gconv_step_data __data; +} _G_iconv_t; typedef int _G_int16_t __attribute__ ((__mode__ (__HI__))); typedef int _G_int32_t __attribute__ ((__mode__ (__SI__))); diff --git a/sysdeps/generic/printf_fphex.c b/sysdeps/generic/printf_fphex.c index b30622080c..9e9fd07dfc 100644 --- a/sysdeps/generic/printf_fphex.c +++ b/sysdeps/generic/printf_fphex.c @@ -38,11 +38,12 @@ #ifdef USE_IN_LIBIO # include <libioP.h> # define PUT(f, s, n) _IO_sputn (f, s, n) -# define PAD(f, c, n) _IO_padn (f, c, n) +# define PAD(f, c, n) (wide ? _IO_wpadn (f, c, n) : _IO_padn (f, c, n)) /* We use this file GNU C library and GNU I/O library. So make names equal. */ # undef putc -# define putc(c, f) _IO_putc_unlocked (c, f) +# define putc(c, f) (wide \ + ? _IO_putwc_unlocked (c, f) : _IO_putc_unlocked (c, f)) # define size_t _IO_size_t # define FILE _IO_FILE #else /* ! USE_IN_LIBIO */ @@ -132,6 +133,9 @@ __printf_fphex (FILE *fp, /* Number of characters written. */ int done = 0; + /* Nonzero if this is output on a wide character stream. */ + int wide = info->wide; + /* Figure out the decimal point character. */ if (info->extra == 0) |