diff options
Diffstat (limited to 'libio')
-rw-r--r-- | libio/filedoalloc.c | 2 | ||||
-rw-r--r-- | libio/fileops.c | 2 | ||||
-rw-r--r-- | libio/iofdopen.c | 4 | ||||
-rw-r--r-- | libio/iofopen.c | 2 | ||||
-rw-r--r-- | libio/libio.h | 22 | ||||
-rw-r--r-- | libio/libioP.h | 20 |
6 files changed, 33 insertions, 19 deletions
diff --git a/libio/filedoalloc.c b/libio/filedoalloc.c index 3298438..d6517e4 100644 --- a/libio/filedoalloc.c +++ b/libio/filedoalloc.c @@ -93,7 +93,7 @@ _IO_file_doallocate (_IO_FILE *fp) local_isatty (fp->_fileno)) fp->_flags |= _IO_LINE_BUF; } -#if _IO_HAVE_ST_BLKSIZE +#if defined _STATBUF_ST_BLKSIZE if (st.st_blksize > 0 && st.st_blksize < _IO_BUFSIZ) size = st.st_blksize; #endif diff --git a/libio/fileops.c b/libio/fileops.c index 6d5393c..5fd8a96 100644 --- a/libio/fileops.c +++ b/libio/fileops.c @@ -582,7 +582,7 @@ mmap_remap_check (_IO_FILE *fp) { /* The file added some pages. We need to remap it. */ void *p; -#ifdef _G_HAVE_MREMAP +#if _G_HAVE_MREMAP p = __mremap (fp->_IO_buf_base, ROUNDED (fp->_IO_buf_end - fp->_IO_buf_base), ROUNDED (st.st_size), MREMAP_MAYMOVE); diff --git a/libio/iofdopen.c b/libio/iofdopen.c index 3546d52..b6f1500 100644 --- a/libio/iofdopen.c +++ b/libio/iofdopen.c @@ -126,13 +126,13 @@ _IO_new_fdopen (int fd, const char *mode) new_f->fp.file._lock = &new_f->lock; #endif _IO_no_init (&new_f->fp.file, 0, 0, &new_f->wd, -#ifdef _G_HAVE_MMAP +#if _G_HAVE_MMAP (use_mmap && (read_write & _IO_NO_WRITES)) ? &_IO_wfile_jumps_maybe_mmap : #endif &_IO_wfile_jumps); _IO_JUMPS (&new_f->fp) = -#ifdef _G_HAVE_MMAP +#if _G_HAVE_MMAP (use_mmap && (read_write & _IO_NO_WRITES)) ? &_IO_file_jumps_maybe_mmap : #endif &_IO_file_jumps; diff --git a/libio/iofopen.c b/libio/iofopen.c index d6f5949..2ea82e2 100644 --- a/libio/iofopen.c +++ b/libio/iofopen.c @@ -33,7 +33,7 @@ _IO_FILE * __fopen_maybe_mmap (_IO_FILE *fp) { -#ifdef _G_HAVE_MMAP +#if _G_HAVE_MMAP if ((fp->_flags2 & _IO_FLAGS2_MMAP) && (fp->_flags & _IO_NO_WRITES)) { /* Since this is read-only, we might be able to mmap the contents diff --git a/libio/libio.h b/libio/libio.h index ff67e18..0953120 100644 --- a/libio/libio.h +++ b/libio/libio.h @@ -41,8 +41,24 @@ # error "Someone forgot to include stdio-lock.h" #endif -#include <bits/_G_config.h> -/* ALL of these should be defined in _G_config.h */ +#define __need_wchar_t +#include <stddef.h> + +#include <bits/types/__mbstate_t.h> +#include <bits/types/wint_t.h> +#include <gconv.h> + +typedef union +{ + struct __gconv_info __cd; + struct + { + struct __gconv_info __cd; + struct __gconv_step_data __data; + } __combined; +} _IO_iconv_t; + +/* Map the names used in libio to the names used in libc generally. */ #define _IO_fpos_t __fpos_t #define _IO_fpos64_t __fpos64_t #define _IO_size_t size_t @@ -51,8 +67,6 @@ #define _IO_off64_t __off64_t #define _IO_pid_t __pid_t #define _IO_uid_t __uid_t -#define _IO_iconv_t _G_iconv_t -#define _IO_HAVE_ST_BLKSIZE _G_HAVE_ST_BLKSIZE #define _IO_BUFSIZ BUFSIZ #define _IO_wint_t wint_t #define _IO_va_list __gnuc_va_list diff --git a/libio/libioP.h b/libio/libioP.h index 8edc207..58cc9de 100644 --- a/libio/libioP.h +++ b/libio/libioP.h @@ -46,6 +46,12 @@ #include <libio/libio.h> #include "iolibio.h" +#include <shlib-compat.h> + +/* For historical reasons this is the name of the sysdeps header that + adjusts the libio configuration. */ +#include <_G_config.h> + #ifdef __cplusplus extern "C" { #endif @@ -75,16 +81,10 @@ extern "C" { * object being acted on (i.e. the 'this' parameter). */ -#include <shlib-compat.h> -#if !SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1) - /* Setting this macro disables the use of the _vtable_offset bias in - _IO_JUMPS_FUNCS, below. That is only needed if we want to - support old binaries (see oldfileops.c). */ -# define _G_IO_NO_BACKWARD_COMPAT 1 -#endif - -#if (!defined _IO_USE_OLD_IO_FILE \ - && (!defined _G_IO_NO_BACKWARD_COMPAT || _G_IO_NO_BACKWARD_COMPAT == 0)) +/* Setting this macro to 1 enables the use of the _vtable_offset bias + in _IO_JUMPS_FUNCS, below. This is only needed for new-format + _IO_FILE in libc that must support old binaries (see oldfileops.c). */ +#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1) && !defined _IO_USE_OLD_IO_FILE # define _IO_JUMPS_OFFSET 1 #else # define _IO_JUMPS_OFFSET 0 |