diff options
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/generic/_G_config.h | 18 | ||||
-rw-r--r-- | sysdeps/generic/printf_fphex.c | 8 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/_G_config.h | 24 |
3 files changed, 44 insertions, 6 deletions
diff --git a/sysdeps/generic/_G_config.h b/sysdeps/generic/_G_config.h index d63b0d7..04bc4ed 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 b306220..9e9fd07 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) diff --git a/sysdeps/unix/sysv/linux/_G_config.h b/sysdeps/unix/sysv/linux/_G_config.h index e829a73..edd29ea 100644 --- a/sysdeps/unix/sysv/linux/_G_config.h +++ b/sysdeps/unix/sysv/linux/_G_config.h @@ -20,9 +20,19 @@ # define _WINT_T typedef unsigned int wint_t; #endif +#define __need_mbstate_t +#include <wchar.h> #define _G_size_t size_t -#define _G_fpos_t __off_t -#define _G_fpos64_t __off64_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 __off64_t @@ -31,6 +41,16 @@ typedef unsigned int wint_t; #define _G_wchar_t wchar_t #define _G_wint_t wint_t #define _G_stat64 stat64 +#include <gconv.h> +typedef union +{ + struct __gconv_info __cd; + struct + { + struct __gconv_info __cd; + struct __gconv_step_data __data; + } __combined; +} _G_iconv_t; typedef int _G_int16_t __attribute__ ((__mode__ (__HI__))); typedef int _G_int32_t __attribute__ ((__mode__ (__SI__))); |