aboutsummaryrefslogtreecommitdiff
path: root/libio/libioP.h
diff options
context:
space:
mode:
Diffstat (limited to 'libio/libioP.h')
-rw-r--r--libio/libioP.h67
1 files changed, 43 insertions, 24 deletions
diff --git a/libio/libioP.h b/libio/libioP.h
index 2337071d39..5fe9598c0d 100644
--- a/libio/libioP.h
+++ b/libio/libioP.h
@@ -134,16 +134,16 @@ typedef _IO_size_t (*_IO_xsgetn_t) __P ((_IO_FILE *FP, void *DATA,
(MODE==1), or the end of the file (MODE==2).
It matches the streambuf::seekoff virtual function.
It is also used for the ANSI fseek function. */
-typedef _IO_fpos_t (*_IO_seekoff_t) __P ((_IO_FILE *FP, _IO_off_t OFF,
+typedef _IO_fpos64_t (*_IO_seekoff_t) __P ((_IO_FILE *FP, _IO_off64_t OFF,
int DIR, int MODE));
#define _IO_SEEKOFF(FP, OFF, DIR, MODE) JUMP3 (__seekoff, FP, OFF, DIR, MODE)
/* The 'seekpos' hook also moves the stream position,
- but to an absolute position given by a fpos_t (seekpos).
+ but to an absolute position given by a fpos64_t (seekpos).
It matches the streambuf::seekpos virtual function.
It is also used for the ANSI fgetpos and fsetpos functions. */
/* The _IO_seek_cur and _IO_seek_end options are not allowed. */
-typedef _IO_fpos_t (*_IO_seekpos_t) __P ((_IO_FILE *, _IO_fpos_t, int));
+typedef _IO_fpos64_t (*_IO_seekpos_t) __P ((_IO_FILE *, _IO_fpos64_t, int));
#define _IO_SEEKPOS(FP, POS, FLAGS) JUMP2 (__seekpos, FP, POS, FLAGS)
/* The 'setbuf' hook gives a buffer to the file.
@@ -192,7 +192,7 @@ typedef _IO_ssize_t (*_IO_write_t) __P ((_IO_FILE *,const void *,_IO_ssize_t));
It generalizes the Unix lseek(2) function.
It matches the streambuf::sys_seek virtual function, which is
specific to this implementation. */
-typedef _IO_fpos_t (*_IO_seek_t) __P ((_IO_FILE *, _IO_off_t, int));
+typedef _IO_fpos64_t (*_IO_seek_t) __P ((_IO_FILE *, _IO_off64_t, int));
#define _IO_SYSSEEK(FP, OFFSET, MODE) JUMP2 (__seek, FP, OFFSET, MODE)
/* The 'sysclose' hook is used to finalize (close, finish up) an
@@ -209,6 +209,17 @@ typedef int (*_IO_close_t) __P ((_IO_FILE *)); /* finalize */
typedef int (*_IO_stat_t) __P ((_IO_FILE *, void *));
#define _IO_SYSSTAT(FP, BUF) JUMP1 (__stat, FP, BUF)
+/* The 'showmany' hook can be used to get an image how much input is
+ available. In many cases the answer will be 0 which means unknown
+ but some cases one can provide real information. */
+typedef int (*_IO_showmanyc_t) __P ((_IO_FILE *));
+#define _IO_SHOWMANYC(FP) JUMP0 (__showmanyc, FP)
+
+/* The 'imbue' hook is used to get information about the currently
+ installed locales. */
+typedef void (*_IO_imbue_t) __P ((_IO_FILE *, void *));
+#define _IO_IMBUE(FP, LOCALE) JUMP1 (__imbue, FP, LOCALE)
+
#define _IO_CHAR_TYPE char /* unsigned char ? */
#define _IO_INT_TYPE int
@@ -237,6 +248,8 @@ struct _IO_jump_t
JUMP_FIELD(_IO_seek_t, __seek);
JUMP_FIELD(_IO_close_t, __close);
JUMP_FIELD(_IO_stat_t, __stat);
+ JUMP_FIELD(_IO_showmanyc_t, __showmanyc);
+ JUMP_FIELD(_IO_imbue_t, __imbue);
#if 0
get_column;
set_column;
@@ -256,8 +269,8 @@ struct _IO_FILE_plus
/* Generic functions */
-extern _IO_fpos_t _IO_seekoff __P ((_IO_FILE *, _IO_off_t, int, int));
-extern _IO_fpos_t _IO_seekpos __P ((_IO_FILE *, _IO_fpos_t, int));
+extern _IO_fpos64_t _IO_seekoff __P ((_IO_FILE *, _IO_off64_t, int, int));
+extern _IO_fpos64_t _IO_seekpos __P ((_IO_FILE *, _IO_fpos64_t, int));
extern void _IO_switch_to_main_get_area __P ((_IO_FILE *));
extern void _IO_switch_to_backup_area __P ((_IO_FILE *));
@@ -293,15 +306,19 @@ extern _IO_FILE* _IO_default_setbuf __P ((_IO_FILE *, char *, _IO_ssize_t));
extern _IO_size_t _IO_default_xsputn __P ((_IO_FILE *, const void *,
_IO_size_t));
extern _IO_size_t _IO_default_xsgetn __P ((_IO_FILE *, void *, _IO_size_t));
-extern _IO_fpos_t _IO_default_seekoff __P ((_IO_FILE *, _IO_off_t, int, int));
-extern _IO_fpos_t _IO_default_seekpos __P ((_IO_FILE *, _IO_fpos_t, int));
+extern _IO_fpos64_t _IO_default_seekoff __P ((_IO_FILE *,
+ _IO_off64_t, int, int));
+extern _IO_fpos64_t _IO_default_seekpos __P ((_IO_FILE *,
+ _IO_fpos64_t, int));
extern _IO_ssize_t _IO_default_write __P ((_IO_FILE *, const void *,
_IO_ssize_t));
extern _IO_ssize_t _IO_default_read __P ((_IO_FILE *, void *, _IO_ssize_t));
extern int _IO_default_stat __P ((_IO_FILE *, void *));
-extern _IO_fpos_t _IO_default_seek __P ((_IO_FILE *, _IO_off_t, int));
+extern _IO_fpos64_t _IO_default_seek __P ((_IO_FILE *, _IO_off64_t, int));
extern int _IO_default_sync __P ((_IO_FILE *));
#define _IO_default_close ((_IO_close_t) _IO_default_sync)
+extern int _IO_default_showmanyc __P ((_IO_FILE *));
+extern void _IO_default_imbue __P ((_IO_FILE *, void *));
extern struct _IO_jump_t _IO_file_jumps;
extern struct _IO_jump_t _IO_streambuf_jumps;
@@ -331,7 +348,7 @@ extern void _IO_flush_all_linebuffered __P ((void));
extern int _IO_file_doallocate __P ((_IO_FILE *));
extern _IO_FILE* _IO_file_setbuf __P ((_IO_FILE *, char *, _IO_ssize_t));
-extern _IO_fpos_t _IO_file_seekoff __P ((_IO_FILE *, _IO_off_t, int, int));
+extern _IO_fpos64_t _IO_file_seekoff __P ((_IO_FILE *, _IO_off64_t, int, int));
extern _IO_size_t _IO_file_xsputn __P ((_IO_FILE *, const void *, _IO_size_t));
extern int _IO_file_stat __P ((_IO_FILE *, void *));
extern int _IO_file_close __P ((_IO_FILE *));
@@ -340,13 +357,14 @@ extern int _IO_file_overflow __P ((_IO_FILE *, int));
#define _IO_file_is_open(__fp) ((__fp)->_fileno >= 0)
extern void _IO_file_init __P ((_IO_FILE *));
extern _IO_FILE* _IO_file_attach __P ((_IO_FILE *, int));
-extern _IO_FILE* _IO_file_fopen __P ((_IO_FILE *, const char *, const char *));
+extern _IO_FILE* _IO_file_fopen __P ((_IO_FILE *, const char *, const char *,
+ int));
extern _IO_ssize_t _IO_file_write __P ((_IO_FILE *, const void *,
_IO_ssize_t));
extern _IO_ssize_t _IO_file_read __P ((_IO_FILE *, void *, _IO_ssize_t));
extern int _IO_file_sync __P ((_IO_FILE *));
extern int _IO_file_close_it __P ((_IO_FILE *));
-extern _IO_fpos_t _IO_file_seek __P ((_IO_FILE *, _IO_off_t, int));
+extern _IO_fpos64_t _IO_file_seek __P ((_IO_FILE *, _IO_off64_t, int));
extern void _IO_file_finish __P ((_IO_FILE *, int));
/* Jumptable functions for proc_files. */
@@ -357,7 +375,7 @@ extern int _IO_proc_close __P ((_IO_FILE *));
extern int _IO_str_underflow __P ((_IO_FILE *));
extern int _IO_str_overflow __P ((_IO_FILE *, int));
extern int _IO_str_pbackfail __P ((_IO_FILE *, int));
-extern _IO_fpos_t _IO_str_seekoff __P ((_IO_FILE *, _IO_off_t, int, int));
+extern _IO_fpos64_t _IO_str_seekoff __P ((_IO_FILE *, _IO_off64_t, int, int));
extern void _IO_str_finish __P ((_IO_FILE *, int));
/* Other strfile functions */
@@ -424,6 +442,7 @@ extern void (*_IO_cleanup_registration_needed) __P ((void));
/* When using this code in the GNU libc we must not pollute the name space. */
# define mmap __mmap
# define munmap __munmap
+# define ftruncate __ftruncate
# endif
# define ROUND_TO_PAGE(_S) \
@@ -459,31 +478,31 @@ extern void (*_IO_cleanup_registration_needed) __P ((void));
struct stat;
extern _IO_ssize_t _IO_read __P ((int, void *, _IO_size_t));
extern _IO_ssize_t _IO_write __P ((int, const void *, _IO_size_t));
-extern _IO_off_t _IO_lseek __P ((int, _IO_off_t, int));
+extern _IO_off64_t _IO_lseek __P ((int, _IO_off64_t, int));
extern int _IO_close __P ((int));
extern int _IO_fstat __P ((int, struct stat *));
extern int _IO_vscanf __P ((const char *, _IO_va_list));
-/* Operations on _IO_fpos_t.
+/* Operations on _IO_fpos64_t.
Normally, these are trivial, but we provide hooks for configurations
- where an _IO_fpos_t is a struct.
- Note that _IO_off_t must be an integral type. */
+ where an _IO_fpos64_t is a struct.
+ Note that _IO_off64_t must be an integral type. */
-/* _IO_pos_BAD is an _IO_fpos_t value indicating error, unknown, or EOF. */
+/* _IO_pos_BAD is an _IO_fpos64_t value indicating error, unknown, or EOF. */
#ifndef _IO_pos_BAD
-# define _IO_pos_BAD ((_IO_fpos_t) -1)
+# define _IO_pos_BAD ((_IO_fpos64_t) -1)
#endif
-/* _IO_pos_as_off converts an _IO_fpos_t value to an _IO_off_t value. */
+/* _IO_pos_as_off converts an _IO_fpos64_t value to an _IO_off64_t value. */
#ifndef _IO_pos_as_off
-# define _IO_pos_as_off(__pos) ((_IO_off_t) (__pos))
+# define _IO_pos_as_off(__pos) ((_IO_off64_t) (__pos))
#endif
-/* _IO_pos_adjust adjust an _IO_fpos_t by some number of bytes. */
+/* _IO_pos_adjust adjust an _IO_fpos64_t by some number of bytes. */
#ifndef _IO_pos_adjust
# define _IO_pos_adjust(__pos, __delta) ((__pos) += (__delta))
#endif
-/* _IO_pos_0 is an _IO_fpos_t value indicating beginning of file. */
+/* _IO_pos_0 is an _IO_fpos64_t value indicating beginning of file. */
#ifndef _IO_pos_0
-# define _IO_pos_0 ((_IO_fpos_t) 0)
+# define _IO_pos_0 ((_IO_fpos64_t) 0)
#endif
#ifdef __cplusplus