mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-27 03:33:33 +08:00
Update.
2002-02-25 Ulrich Drepper <drepper@redhat.com> * assert/assert-perr.c: Use INTUSE to reference functions and variables inside libc itself. Ise INTDEF and INTDEF2 to define appropriate aliases. Add prototypes for the new aliases. * assert/assert.c: Likewise. * include/libc-symbols.h: Likewise. * include/stdio.h: Likewise. * include/netinet/in.h: Likewise. * include/rpc/auth.h: Likewise. * include/rpc/auth_unix.h: Likewise. * include/rpc/key_prot.h: Likewise. * include/rpc/pmap_prot.h: Likewise. * include/rpc/pmap_rmt.h: Likewise. * include/rpc/rpc_msg.h: Likewise. * include/rpc/xdr.h: Likewise. * inet/gethstbyad_r.c: Likewise. * inet/gethstbynm2_r.c: Likewise. * inet/gethstbynm_r.c: Likewise. * inet/gethstent_r.c: Likewise. * inet/in6_addr.c: Likewise. * libio/__fpurge.c: Likewise. * libio/filedoalloc.c: Likewise. * libio/fileops.c: Likewise. * libio/ftello.c: Likewise. * libio/ftello64.c: Likewise. * libio/genops.c: Likewise. * libio/iofclose.c: Likewise. * libio/iofdopen.c: Likewise. * libio/iofflush.c: Likewise. * libio/iofflush_u.c: Likewise. * libio/iofgetpos.c: Likewise. * libio/iofgetpos64.c: Likewise. * libio/iofgets.c: Likewise. * libio/iofgets_u.c: Likewise. * libio/iofopen.c: Likewise. * libio/iofopncook.c: Likewise. * libio/iofputs.c: Likewise. * libio/iofread.c: Likewise. * libio/iofread_u.c: Likewise. * libio/iofsetpos.c: Likewise. * libio/iofsetpos64.c: Likewise. * libio/ioftell.c: Likewise. * libio/iofwrite.c: Likewise. * libio/iogetline.c: Likewise. * libio/iogets.c: Likewise. * libio/iogetwline.c: Likewise. * libio/iolibio.h: Likewise. * libio/iopadn.c: Likewise. * libio/iopopen.c: Likewise. * libio/ioseekoff.c: Likewise. * libio/ioseekpos.c: Likewise. * libio/iosetbuffer.c: Likewise. * libio/iosetvbuf.c: Likewise. * libio/ioungetc.c: Likewise. * libio/ioungetwc.c: Likewise. * libio/iovdprintf.c: Likewise. * libio/iovsprintf.c: Likewise. * libio/iovsscanf.c: Likewise. * libio/libioP.h: Likewise. * libio/memstream.c: Likewise. * libio/obprintf.c: Likewise. * libio/oldfileops.c: Likewise. * libio/oldiofclose.c: Likewise. * libio/oldiofdopen.c: Likewise. * libio/oldiofgetpos.c: Likewise. * libio/oldiofgetpos64.c: Likewise. * libio/oldiofopen.c: Likewise. * libio/oldiofsetpos.c: Likewise. * libio/oldiofsetpos64.c: Likewise. * libio/oldiopopen.c: Likewise. * libio/oldstdfiles.c: Likewise. * libio/putc.c: Likewise. * libio/setbuf.c: Likewise. * libio/setlinebuf.c: Likewise. * libio/stdfiles.c: Likewise. * libio/stdio.c: Likewise. * libio/strops.c: Likewise. * libio/vasprintf.c: Likewise. * libio/vscanf.c: Likewise. * libio/vsnprintf.c: Likewise. * libio/vswprintf.c: Likewise. * libio/wfiledoalloc.c: Likewise. * libio/wfileops.c: Likewise. * libio/wgenops.c: Likewise. * libio/wstrops.c: Likewise. * malloc/mtrace.c: Likewise. * misc/error.c: Likewise. * misc/syslog.c: Likewise. * nss/getXXbyYY_r.c: Likewise. * nss/getXXent_r.c: Likewise. * nss/hosts-lookup.c: Likewise. * stdio-common/getw.c * stdio-common/printf-prs.c: Likewise. * stdio-common/printf_fp.c: Likewise. * stdio-common/printf_size.c: Likewise. * stdio-common/putw.c: Likewise. * stdio-common/scanf.c: Likewise. * stdio-common/sprintf.c: Likewise. * stdio-common/tmpfile64.c: Likewise. * stdio-common/vfprintf.c: Likewise. * stdio-common/vfscanf.c: Likewise. * stdlib/strfmon.c: Likewise. * sunrpc/auth_des.c: Likewise. * sunrpc/auth_none.c: Likewise. * sunrpc/auth_unix.c: Likewise. * sunrpc/authdes_prot.c: Likewise. * sunrpc/authuxprot.c: Likewise. * sunrpc/clnt_perr.c: Likewise. * sunrpc/clnt_raw.c: Likewise. * sunrpc/clnt_tcp.c: Likewise. * sunrpc/clnt_udp.c: Likewise. * sunrpc/clnt_unix.c: Likewise. * sunrpc/key_call.c: Likewise. * sunrpc/key_prot.c: Likewise. * sunrpc/openchild.c: Likewise. * sunrpc/pm_getmaps.c: Likewise. * sunrpc/pm_getport.c: Likewise. * sunrpc/pmap_clnt.c: Likewise. * sunrpc/pmap_prot.c: Likewise. * sunrpc/pmap_prot2.c: Likewise. * sunrpc/pmap_rmt.c: Likewise. * sunrpc/rpc_cmsg.c: Likewise. * sunrpc/rpc_prot.c: Likewise. * sunrpc/svc_authux.c: Likewise. * sunrpc/svc_raw.c: Likewise. * sunrpc/svc_simple.c: Likewise. * sunrpc/svc_tcp.c: Likewise. * sunrpc/svc_udp.c: Likewise. * sunrpc/svc_unix.c: Likewise. * sunrpc/xdr.c: Likewise. * sunrpc/xdr_array.c: Likewise. * sunrpc/xdr_mem.c: Likewise. * sunrpc/xdr_rec.c: Likewise. * sunrpc/xdr_ref.c: Likewise. * sunrpc/xdr_stdio.c: Likewise. * sysdeps/generic/_strerror.c: Likewise. * sysdeps/generic/printf_fphex.c: Likewise. * sysdeps/generic/tmpfile.c: Likewise. * sysdeps/gnu/errlist.awk: Likewise. * sysdeps/gnu/errlist.c: Likewise. * libio/Makefile (routines): Remove iosprint. * libio/iosprintf.c: Removed
This commit is contained in:
parent
d417e0ffc4
commit
77fe0b9cd8
146
ChangeLog
146
ChangeLog
@ -1,3 +1,149 @@
|
||||
2002-02-25 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* assert/assert-perr.c: Use INTUSE to reference functions and variables
|
||||
inside libc itself. Ise INTDEF and INTDEF2 to define appropriate
|
||||
aliases. Add prototypes for the new aliases.
|
||||
* assert/assert.c: Likewise.
|
||||
* include/libc-symbols.h: Likewise.
|
||||
* include/stdio.h: Likewise.
|
||||
* include/netinet/in.h: Likewise.
|
||||
* include/rpc/auth.h: Likewise.
|
||||
* include/rpc/auth_unix.h: Likewise.
|
||||
* include/rpc/key_prot.h: Likewise.
|
||||
* include/rpc/pmap_prot.h: Likewise.
|
||||
* include/rpc/pmap_rmt.h: Likewise.
|
||||
* include/rpc/rpc_msg.h: Likewise.
|
||||
* include/rpc/xdr.h: Likewise.
|
||||
* inet/gethstbyad_r.c: Likewise.
|
||||
* inet/gethstbynm2_r.c: Likewise.
|
||||
* inet/gethstbynm_r.c: Likewise.
|
||||
* inet/gethstent_r.c: Likewise.
|
||||
* inet/in6_addr.c: Likewise.
|
||||
* libio/__fpurge.c: Likewise.
|
||||
* libio/filedoalloc.c: Likewise.
|
||||
* libio/fileops.c: Likewise.
|
||||
* libio/ftello.c: Likewise.
|
||||
* libio/ftello64.c: Likewise.
|
||||
* libio/genops.c: Likewise.
|
||||
* libio/iofclose.c: Likewise.
|
||||
* libio/iofdopen.c: Likewise.
|
||||
* libio/iofflush.c: Likewise.
|
||||
* libio/iofflush_u.c: Likewise.
|
||||
* libio/iofgetpos.c: Likewise.
|
||||
* libio/iofgetpos64.c: Likewise.
|
||||
* libio/iofgets.c: Likewise.
|
||||
* libio/iofgets_u.c: Likewise.
|
||||
* libio/iofopen.c: Likewise.
|
||||
* libio/iofopncook.c: Likewise.
|
||||
* libio/iofputs.c: Likewise.
|
||||
* libio/iofread.c: Likewise.
|
||||
* libio/iofread_u.c: Likewise.
|
||||
* libio/iofsetpos.c: Likewise.
|
||||
* libio/iofsetpos64.c: Likewise.
|
||||
* libio/ioftell.c: Likewise.
|
||||
* libio/iofwrite.c: Likewise.
|
||||
* libio/iogetline.c: Likewise.
|
||||
* libio/iogets.c: Likewise.
|
||||
* libio/iogetwline.c: Likewise.
|
||||
* libio/iolibio.h: Likewise.
|
||||
* libio/iopadn.c: Likewise.
|
||||
* libio/iopopen.c: Likewise.
|
||||
* libio/ioseekoff.c: Likewise.
|
||||
* libio/ioseekpos.c: Likewise.
|
||||
* libio/iosetbuffer.c: Likewise.
|
||||
* libio/iosetvbuf.c: Likewise.
|
||||
* libio/ioungetc.c: Likewise.
|
||||
* libio/ioungetwc.c: Likewise.
|
||||
* libio/iovdprintf.c: Likewise.
|
||||
* libio/iovsprintf.c: Likewise.
|
||||
* libio/iovsscanf.c: Likewise.
|
||||
* libio/libioP.h: Likewise.
|
||||
* libio/memstream.c: Likewise.
|
||||
* libio/obprintf.c: Likewise.
|
||||
* libio/oldfileops.c: Likewise.
|
||||
* libio/oldiofclose.c: Likewise.
|
||||
* libio/oldiofdopen.c: Likewise.
|
||||
* libio/oldiofgetpos.c: Likewise.
|
||||
* libio/oldiofgetpos64.c: Likewise.
|
||||
* libio/oldiofopen.c: Likewise.
|
||||
* libio/oldiofsetpos.c: Likewise.
|
||||
* libio/oldiofsetpos64.c: Likewise.
|
||||
* libio/oldiopopen.c: Likewise.
|
||||
* libio/oldstdfiles.c: Likewise.
|
||||
* libio/putc.c: Likewise.
|
||||
* libio/setbuf.c: Likewise.
|
||||
* libio/setlinebuf.c: Likewise.
|
||||
* libio/stdfiles.c: Likewise.
|
||||
* libio/stdio.c: Likewise.
|
||||
* libio/strops.c: Likewise.
|
||||
* libio/vasprintf.c: Likewise.
|
||||
* libio/vscanf.c: Likewise.
|
||||
* libio/vsnprintf.c: Likewise.
|
||||
* libio/vswprintf.c: Likewise.
|
||||
* libio/wfiledoalloc.c: Likewise.
|
||||
* libio/wfileops.c: Likewise.
|
||||
* libio/wgenops.c: Likewise.
|
||||
* libio/wstrops.c: Likewise.
|
||||
* malloc/mtrace.c: Likewise.
|
||||
* misc/error.c: Likewise.
|
||||
* misc/syslog.c: Likewise.
|
||||
* nss/getXXbyYY_r.c: Likewise.
|
||||
* nss/getXXent_r.c: Likewise.
|
||||
* nss/hosts-lookup.c: Likewise.
|
||||
* stdio-common/getw.c
|
||||
* stdio-common/printf-prs.c: Likewise.
|
||||
* stdio-common/printf_fp.c: Likewise.
|
||||
* stdio-common/printf_size.c: Likewise.
|
||||
* stdio-common/putw.c: Likewise.
|
||||
* stdio-common/scanf.c: Likewise.
|
||||
* stdio-common/sprintf.c: Likewise.
|
||||
* stdio-common/tmpfile64.c: Likewise.
|
||||
* stdio-common/vfprintf.c: Likewise.
|
||||
* stdio-common/vfscanf.c: Likewise.
|
||||
* stdlib/strfmon.c: Likewise.
|
||||
* sunrpc/auth_des.c: Likewise.
|
||||
* sunrpc/auth_none.c: Likewise.
|
||||
* sunrpc/auth_unix.c: Likewise.
|
||||
* sunrpc/authdes_prot.c: Likewise.
|
||||
* sunrpc/authuxprot.c: Likewise.
|
||||
* sunrpc/clnt_perr.c: Likewise.
|
||||
* sunrpc/clnt_raw.c: Likewise.
|
||||
* sunrpc/clnt_tcp.c: Likewise.
|
||||
* sunrpc/clnt_udp.c: Likewise.
|
||||
* sunrpc/clnt_unix.c: Likewise.
|
||||
* sunrpc/key_call.c: Likewise.
|
||||
* sunrpc/key_prot.c: Likewise.
|
||||
* sunrpc/openchild.c: Likewise.
|
||||
* sunrpc/pm_getmaps.c: Likewise.
|
||||
* sunrpc/pm_getport.c: Likewise.
|
||||
* sunrpc/pmap_clnt.c: Likewise.
|
||||
* sunrpc/pmap_prot.c: Likewise.
|
||||
* sunrpc/pmap_prot2.c: Likewise.
|
||||
* sunrpc/pmap_rmt.c: Likewise.
|
||||
* sunrpc/rpc_cmsg.c: Likewise.
|
||||
* sunrpc/rpc_prot.c: Likewise.
|
||||
* sunrpc/svc_authux.c: Likewise.
|
||||
* sunrpc/svc_raw.c: Likewise.
|
||||
* sunrpc/svc_simple.c: Likewise.
|
||||
* sunrpc/svc_tcp.c: Likewise.
|
||||
* sunrpc/svc_udp.c: Likewise.
|
||||
* sunrpc/svc_unix.c: Likewise.
|
||||
* sunrpc/xdr.c: Likewise.
|
||||
* sunrpc/xdr_array.c: Likewise.
|
||||
* sunrpc/xdr_mem.c: Likewise.
|
||||
* sunrpc/xdr_rec.c: Likewise.
|
||||
* sunrpc/xdr_ref.c: Likewise.
|
||||
* sunrpc/xdr_stdio.c: Likewise.
|
||||
* sysdeps/generic/_strerror.c: Likewise.
|
||||
* sysdeps/generic/printf_fphex.c: Likewise.
|
||||
* sysdeps/generic/tmpfile.c: Likewise.
|
||||
* sysdeps/gnu/errlist.awk: Likewise.
|
||||
* sysdeps/gnu/errlist.c: Likewise.
|
||||
|
||||
* libio/Makefile (routines): Remove iosprint.
|
||||
* libio/iosprintf.c: Removed
|
||||
|
||||
|
||||
2002-02-24 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* elf/dl-support.c (_dl_non_dynamic_init): Renamed from
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1994,1995,1996,1997,1998,2001 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1994-1998,2001,2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -30,7 +30,7 @@ extern const char *__progname;
|
||||
#ifdef USE_IN_LIBIO
|
||||
# include <wchar.h>
|
||||
# include <libio/iolibio.h>
|
||||
# define fflush(s) _IO_fflush (s)
|
||||
# define fflush(s) INTUSE(_IO_fflush) (s)
|
||||
#endif
|
||||
|
||||
/* This function, when passed an error number, a filename, and a line
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1991,1994,1995,1996,1998,2001 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991,1994-1996,1998,2001,2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -29,7 +29,7 @@ extern const char *__progname;
|
||||
#ifdef USE_IN_LIBIO
|
||||
# include <wchar.h>
|
||||
# include <libio/iolibio.h>
|
||||
# define fflush(s) _IO_fflush (s)
|
||||
# define fflush(s) INTUSE(_IO_fflush) (s)
|
||||
#endif
|
||||
|
||||
/* This function, when passed a string containing an asserted
|
||||
|
6
configure
vendored
6
configure
vendored
@ -3500,12 +3500,12 @@ else
|
||||
#line 3501 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <stdio.h>
|
||||
main()
|
||||
int main()
|
||||
{
|
||||
FILE *f=fopen("conftestval", "w");
|
||||
if (!f) exit(1);
|
||||
if (!f) return(1);
|
||||
fprintf(f, "%d\n", sizeof(long double));
|
||||
exit(0);
|
||||
return(0);
|
||||
}
|
||||
EOF
|
||||
if { (eval echo configure:3512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
|
||||
|
@ -354,9 +354,11 @@
|
||||
#ifdef SHARED
|
||||
# define INTUSE(name) name##_internal
|
||||
# define INTDEF(name) strong_alias (name, name##_internal);
|
||||
# define INTDEF2(name, newname) strong_alias (name, newname##_internal);
|
||||
#else
|
||||
# define INTUSE(name) name
|
||||
# define INTDEF(name)
|
||||
# define INTDEF2(name, newname)
|
||||
#endif
|
||||
|
||||
#endif /* libc-symbols.h */
|
||||
|
@ -1 +1,3 @@
|
||||
#include <inet/netinet/in.h>
|
||||
|
||||
extern const struct in6_addr in6addr_any_internal;
|
||||
|
@ -16,4 +16,7 @@ DECLARE_NSS_PROTOTYPES (nisplus)
|
||||
|
||||
#undef DECLARE_NSS_PROTOTYPES
|
||||
|
||||
extern bool_t xdr_des_block_internal (XDR *__xdrs, des_block *__blkp);
|
||||
extern bool_t xdr_opaque_auth_internal (XDR *, struct opaque_auth *);
|
||||
|
||||
#endif
|
||||
|
@ -1 +1,4 @@
|
||||
#include <sunrpc/rpc/auth_unix.h>
|
||||
|
||||
extern bool_t xdr_authunix_parms_internal (XDR *__xdrs,
|
||||
struct authunix_parms *__p);
|
||||
|
@ -1 +1,11 @@
|
||||
#include <sunrpc/rpc/key_prot.h>
|
||||
|
||||
extern bool_t xdr_cryptkeyres_internal (XDR *xdrs, cryptkeyres *objp);
|
||||
extern bool_t xdr_keystatus_internal (XDR *, keystatus*);
|
||||
extern bool_t xdr_keybuf_internal (XDR *, keybuf);
|
||||
extern bool_t xdr_cryptkeyarg_internal (XDR *, cryptkeyarg*);
|
||||
extern bool_t xdr_cryptkeyarg2_internal (XDR *, cryptkeyarg2*);
|
||||
extern bool_t xdr_key_netstres_internal (XDR *, key_netstres*);
|
||||
extern bool_t xdr_key_netstarg_internal (XDR *, key_netstarg*);
|
||||
extern bool_t xdr_netnamestr_internal (XDR *, netnamestr*);
|
||||
extern bool_t xdr_unixcred_internal (XDR *, unixcred*);
|
||||
|
@ -1 +1,5 @@
|
||||
#include <sunrpc/rpc/pmap_prot.h>
|
||||
|
||||
|
||||
extern bool_t xdr_pmap_internal (XDR *__xdrs, struct pmap *__regs);
|
||||
extern bool_t xdr_pmaplist_internal (XDR *__xdrs, struct pmaplist **__rp);
|
||||
|
@ -1 +1,5 @@
|
||||
#include <sunrpc/rpc/pmap_rmt.h>
|
||||
|
||||
extern bool_t xdr_rmtcall_args_internal (XDR *__xdrs,
|
||||
struct rmtcallargs *__crp);
|
||||
extern bool_t xdr_rmtcallres_internal (XDR *__xdrs, struct rmtcallres *__crp);
|
||||
|
@ -5,6 +5,8 @@
|
||||
|
||||
extern bool_t xdr_rejected_reply (XDR *xdrs, struct rejected_reply *rr);
|
||||
extern bool_t xdr_accepted_reply (XDR *xdrs, struct accepted_reply *ar);
|
||||
|
||||
extern bool_t xdr_callmsg_internal (XDR *__xdrs, struct rpc_msg *__cmsg);
|
||||
extern bool_t xdr_callhdr_internal (XDR *__xdrs, struct rpc_msg *__cmsg);
|
||||
extern bool_t xdr_replymsg_internal (XDR *__xdrs, struct rpc_msg *__rmsg);
|
||||
|
||||
#endif
|
||||
|
@ -1 +1,34 @@
|
||||
#include <sunrpc/rpc/xdr.h>
|
||||
|
||||
extern bool_t xdr_void_internal (void);
|
||||
extern bool_t xdr_bool_internal (XDR *__xdrs, bool_t *__bp);
|
||||
extern bool_t xdr_u_hyper_internal (XDR *__xdrs, u_quad_t *__ullp);
|
||||
extern bool_t xdr_u_long_internal (XDR *__xdrs, u_long *__ulp);
|
||||
extern bool_t xdr_u_int_internal (XDR *__xdrs, u_int *__up);
|
||||
extern bool_t xdr_u_short_internal (XDR *__xdrs, u_short *__usp);
|
||||
extern bool_t xdr_hyper_internal (XDR *__xdrs, quad_t *__ullp);
|
||||
extern bool_t xdr_long_internal (XDR *__xdrs, long *__ulp);
|
||||
extern bool_t xdr_int_internal (XDR *__xdrs, int *__up);
|
||||
extern bool_t xdr_short_internal (XDR *__xdrs, short *__usp);
|
||||
extern bool_t xdr_enum_internal (XDR *__xdrs, enum_t *__ep);
|
||||
extern bool_t xdr_union_internal (XDR *__xdrs, enum_t *__dscmp, char *__unp,
|
||||
const struct xdr_discrim *choices,
|
||||
xdrproc_t dfault);
|
||||
extern bool_t xdr_string_internal (XDR *__xdrs, char **__cpp, u_int __maxsize);
|
||||
extern bool_t xdr_array_internal (XDR * _xdrs, caddr_t *__addrp,
|
||||
u_int *__sizep, u_int __maxsize,
|
||||
u_int __elsize, xdrproc_t __elproc);
|
||||
extern bool_t xdr_reference_internal (XDR *__xdrs, caddr_t *__xpp,
|
||||
u_int __size, xdrproc_t __proc);
|
||||
extern bool_t xdr_bytes_internal (XDR *xdrs, char **cpp, u_int *sizep,
|
||||
u_int maxsize);
|
||||
extern bool_t xdr_netobj_internal (XDR *__xdrs, struct netobj *__np);
|
||||
extern bool_t xdr_opaque_internal (XDR *__xdrs, caddr_t __cp, u_int __cnt);
|
||||
extern void xdrrec_create_internal (XDR *__xdrs, u_int __sendsize,
|
||||
u_int __recvsize, caddr_t __tcp_handle,
|
||||
int (*__readit) (char *, char *, int),
|
||||
int (*__writeit) (char *, char *, int));
|
||||
extern void xdrmem_create_internal (XDR *, const caddr_t, u_int, enum xdr_op);
|
||||
extern bool_t xdrrec_endofrecord_internal (XDR *__xdrs, bool_t __sendnow);
|
||||
extern bool_t xdrrec_skiprecord_internal (XDR *__xdrs);
|
||||
extern bool_t xdrrec_eof_internal (XDR *__xdrs);
|
||||
|
@ -74,6 +74,9 @@ extern wint_t __getwc_unlocked (FILE *__fp);
|
||||
# endif
|
||||
|
||||
|
||||
extern __const char *__const _sys_errlist_internal[];
|
||||
extern int _sys_nerr_internal;
|
||||
|
||||
# endif
|
||||
|
||||
#endif
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1996,1997,1998,1999,2000,2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
|
||||
|
||||
@ -33,7 +33,7 @@
|
||||
be performed. */
|
||||
#define PREPROCESS \
|
||||
if (len == sizeof (struct in6_addr) \
|
||||
&& __builtin_expect (memcmp (&in6addr_any, addr, \
|
||||
&& __builtin_expect (memcmp (&INTUSE(in6addr_any), addr, \
|
||||
sizeof (struct in6_addr)), 1) == 0) \
|
||||
{ \
|
||||
*h_errnop = HOST_NOT_FOUND; \
|
||||
@ -47,4 +47,7 @@
|
||||
_res_hconf_trim_domains (resbuf); \
|
||||
}
|
||||
|
||||
/* Special name for the lookup function. */
|
||||
#define DB_LOOKUP_FCT INTUSE(__nss_hosts_lookup)
|
||||
|
||||
#include "../nss/getXXbyYY_r.c"
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1996, 1997, 2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
|
||||
|
||||
@ -40,4 +40,7 @@
|
||||
#define HAVE_LOOKUP_BUFFER 1
|
||||
#define HAVE_AF 1
|
||||
|
||||
/* Special name for the lookup function. */
|
||||
#define DB_LOOKUP_FCT INTUSE(__nss_hosts_lookup)
|
||||
|
||||
#include "../nss/getXXbyYY_r.c"
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1996, 1997, 1998, 2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
|
||||
|
||||
@ -39,4 +39,7 @@
|
||||
#define HANDLE_DIGITS_DOTS 1
|
||||
#define HAVE_LOOKUP_BUFFER 1
|
||||
|
||||
/* Special name for the lookup function. */
|
||||
#define DB_LOOKUP_FCT INTUSE(__nss_hosts_lookup)
|
||||
|
||||
#include "../nss/getXXbyYY_r.c"
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1996, 2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -29,4 +29,7 @@
|
||||
#define NEED_H_ERRNO 1
|
||||
#define NEED__RES 1
|
||||
|
||||
/* Special name for the lookup function. */
|
||||
#define DB_LOOKUP_FCT INTUSE(__nss_hosts_lookup)
|
||||
|
||||
#include "../nss/getXXent_r.c"
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1997, 1998, 2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Philip Blundell <pjb27@cam.ac.uk>, 1997.
|
||||
|
||||
@ -21,5 +21,6 @@
|
||||
|
||||
const struct in6_addr in6addr_any =
|
||||
{ { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } } };
|
||||
INTDEF(in6addr_any)
|
||||
const struct in6_addr in6addr_loopback =
|
||||
{ { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 } } };
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright (C) 1995,96,97,98,99,2000, 2001 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1995,96,97,98,99,2000,2001,2002 Free Software Foundation, Inc.
|
||||
# This file is part of the GNU C Library.
|
||||
|
||||
# The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -27,7 +27,7 @@ routines := \
|
||||
filedoalloc iofclose iofdopen iofflush iofgetpos iofgets iofopen \
|
||||
iofopncook iofputs iofread iofsetpos ioftell wfiledoalloc \
|
||||
iofwrite iogetdelim iogetline iogets iopadn iopopen ioputs \
|
||||
ioseekoff ioseekpos iosetbuffer iosetvbuf iosprintf ioungetc \
|
||||
ioseekoff ioseekpos iosetbuffer iosetvbuf ioungetc \
|
||||
iovsprintf iovsscanf \
|
||||
iofgetpos64 iofopen64 iofsetpos64 \
|
||||
fputwc fputwc_u getwc getwc_u getwchar getwchar_u iofgetws iofgetws_u \
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2000, 2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -35,7 +35,7 @@ __fpurge (FILE *fp)
|
||||
{
|
||||
/* Wide-char stream. */
|
||||
if (_IO_in_backup (fp))
|
||||
_IO_free_wbackup_area (fp);
|
||||
INTUSE(_IO_free_wbackup_area) (fp);
|
||||
|
||||
fp->_wide_data->_IO_read_end = fp->_wide_data->_IO_read_ptr;
|
||||
fp->_wide_data->_IO_write_ptr = fp->_wide_data->_IO_write_base;
|
||||
@ -44,7 +44,7 @@ __fpurge (FILE *fp)
|
||||
{
|
||||
/* Byte stream. */
|
||||
if (_IO_in_backup (fp))
|
||||
_IO_free_backup_area (fp);
|
||||
INTUSE(_IO_free_backup_area) (fp);
|
||||
|
||||
fp->_IO_read_end = fp->_IO_read_ptr;
|
||||
fp->_IO_write_ptr = fp->_IO_write_base;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1993, 1997, 2001 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1993, 1997, 2001, 2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -106,6 +106,7 @@ _IO_file_doallocate (fp)
|
||||
#endif
|
||||
}
|
||||
ALLOC_BUF (p, size, EOF);
|
||||
_IO_setb (fp, p, p + size, 1);
|
||||
INTUSE(_IO_setb) (fp, p, p + size, 1);
|
||||
return 1;
|
||||
}
|
||||
INTDEF(_IO_file_doallocate)
|
||||
|
@ -148,9 +148,10 @@ _IO_new_file_init (fp)
|
||||
fp->file._offset = _IO_pos_BAD;
|
||||
fp->file._IO_file_flags |= CLOSED_FILEBUF_FLAGS;
|
||||
|
||||
_IO_link_in (fp);
|
||||
INTUSE(_IO_link_in) (fp);
|
||||
fp->file._fileno = -1;
|
||||
}
|
||||
INTDEF2(_IO_new_file_init, _IO_file_init)
|
||||
|
||||
int
|
||||
_IO_new_file_close_it (fp)
|
||||
@ -162,33 +163,34 @@ _IO_new_file_close_it (fp)
|
||||
|
||||
write_status = _IO_do_flush (fp);
|
||||
|
||||
_IO_unsave_markers(fp);
|
||||
INTUSE(_IO_unsave_markers) (fp);
|
||||
|
||||
close_status = _IO_SYSCLOSE (fp);
|
||||
|
||||
/* Free buffer. */
|
||||
if (fp->_mode <= 0)
|
||||
{
|
||||
_IO_setb (fp, NULL, NULL, 0);
|
||||
INTUSE(_IO_setb) (fp, NULL, NULL, 0);
|
||||
_IO_setg (fp, NULL, NULL, NULL);
|
||||
_IO_setp (fp, NULL, NULL);
|
||||
}
|
||||
#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
|
||||
else
|
||||
{
|
||||
_IO_wsetb (fp, NULL, NULL, 0);
|
||||
INTUSE(_IO_wsetb) (fp, NULL, NULL, 0);
|
||||
_IO_wsetg (fp, NULL, NULL, NULL);
|
||||
_IO_wsetp (fp, NULL, NULL);
|
||||
}
|
||||
#endif
|
||||
|
||||
_IO_un_link ((struct _IO_FILE_plus *) fp);
|
||||
INTUSE(_IO_un_link) ((struct _IO_FILE_plus *) fp);
|
||||
fp->_flags = _IO_MAGIC|CLOSED_FILEBUF_FLAGS;
|
||||
fp->_fileno = -1;
|
||||
fp->_offset = _IO_pos_BAD;
|
||||
|
||||
return close_status ? close_status : write_status;
|
||||
}
|
||||
INTDEF2(_IO_new_file_close_it, _IO_file_close_it)
|
||||
|
||||
void
|
||||
_IO_new_file_finish (fp, dummy)
|
||||
@ -201,8 +203,9 @@ _IO_new_file_finish (fp, dummy)
|
||||
if (!(fp->_flags & _IO_DELETE_DONT_CLOSE))
|
||||
_IO_SYSCLOSE (fp);
|
||||
}
|
||||
_IO_default_finish (fp, 0);
|
||||
INTUSE(_IO_default_finish) (fp, 0);
|
||||
}
|
||||
INTDEF2(_IO_new_file_finish, _IO_file_finish)
|
||||
|
||||
#if defined __GNUC__ && __GNUC__ >= 2
|
||||
__inline__
|
||||
@ -232,7 +235,7 @@ _IO_file_open (fp, filename, posix_mode, prot, read_write, is32not64)
|
||||
if (_IO_SEEKOFF (fp, (_IO_off64_t)0, _IO_seek_end, _IOS_INPUT|_IOS_OUTPUT)
|
||||
== _IO_pos_BAD && errno != ESPIPE)
|
||||
return NULL;
|
||||
_IO_link_in ((struct _IO_FILE_plus *) fp);
|
||||
INTUSE(_IO_link_in) ((struct _IO_FILE_plus *) fp);
|
||||
return fp;
|
||||
}
|
||||
|
||||
@ -389,6 +392,7 @@ _IO_new_file_fopen (fp, filename, mode, is32not64)
|
||||
|
||||
return result;
|
||||
}
|
||||
INTDEF2(_IO_new_file_fopen, _IO_file_fopen)
|
||||
|
||||
_IO_FILE *
|
||||
_IO_new_file_attach (fp, fd)
|
||||
@ -408,6 +412,7 @@ _IO_new_file_attach (fp, fd)
|
||||
return NULL;
|
||||
return fp;
|
||||
}
|
||||
INTDEF2(_IO_new_file_attach, _IO_file_attach)
|
||||
|
||||
_IO_FILE *
|
||||
_IO_new_file_setbuf (fp, p, len)
|
||||
@ -424,6 +429,7 @@ _IO_new_file_setbuf (fp, p, len)
|
||||
|
||||
return fp;
|
||||
}
|
||||
INTDEF2(_IO_new_file_setbuf, _IO_file_setbuf)
|
||||
|
||||
static int new_do_write __P ((_IO_FILE *, const char *, _IO_size_t));
|
||||
|
||||
@ -438,6 +444,7 @@ _IO_new_do_write (fp, data, to_do)
|
||||
{
|
||||
return (to_do == 0 || new_do_write (fp, data, to_do) == to_do) ? 0 : EOF;
|
||||
}
|
||||
INTDEF2(_IO_new_do_write, _IO_do_write)
|
||||
|
||||
static
|
||||
int
|
||||
@ -464,7 +471,8 @@ new_do_write (fp, data, to_do)
|
||||
}
|
||||
count = _IO_SYSWRITE (fp, data, to_do);
|
||||
if (fp->_cur_column && count)
|
||||
fp->_cur_column = _IO_adjust_column (fp->_cur_column - 1, data, count) + 1;
|
||||
fp->_cur_column = INTUSE(_IO_adjust_column) (fp->_cur_column - 1, data,
|
||||
count) + 1;
|
||||
_IO_setg (fp, fp->_IO_buf_base, fp->_IO_buf_base, fp->_IO_buf_base);
|
||||
fp->_IO_write_base = fp->_IO_write_ptr = fp->_IO_buf_base;
|
||||
fp->_IO_write_end = (fp->_mode <= 0
|
||||
@ -501,7 +509,7 @@ _IO_new_file_underflow (fp)
|
||||
free (fp->_IO_save_base);
|
||||
fp->_flags &= ~_IO_IN_BACKUP;
|
||||
}
|
||||
_IO_doallocbuf (fp);
|
||||
INTUSE(_IO_doallocbuf) (fp);
|
||||
}
|
||||
|
||||
/* Flush all line buffered files before reading. */
|
||||
@ -509,7 +517,7 @@ _IO_new_file_underflow (fp)
|
||||
if (fp->_flags & (_IO_LINE_BUF|_IO_UNBUFFERED))
|
||||
{
|
||||
#if 0
|
||||
_IO_flush_all_linebuffered ();
|
||||
INTUSE(_IO_flush_all_linebuffered) ();
|
||||
#else
|
||||
/* We used to flush all line-buffered stream. This really isn't
|
||||
required by any standard. My recollection is that
|
||||
@ -529,7 +537,7 @@ _IO_new_file_underflow (fp)
|
||||
#endif
|
||||
}
|
||||
|
||||
_IO_switch_to_get_mode (fp);
|
||||
INTUSE(_IO_switch_to_get_mode) (fp);
|
||||
|
||||
/* This is very tricky. We have to adjust those
|
||||
pointers before we call _IO_SYSREAD () since
|
||||
@ -556,6 +564,7 @@ _IO_new_file_underflow (fp)
|
||||
_IO_pos_adjust (fp->_offset, count);
|
||||
return *(unsigned char *) fp->_IO_read_ptr;
|
||||
}
|
||||
INTDEF2(_IO_new_file_underflow, _IO_file_underflow)
|
||||
|
||||
/* Special callback replacing the underflow callbacks if we mmap the
|
||||
file. */
|
||||
@ -603,7 +612,7 @@ _IO_new_file_overflow (f, ch)
|
||||
/* Allocate a buffer if needed. */
|
||||
if (f->_IO_write_base == 0)
|
||||
{
|
||||
_IO_doallocbuf (f);
|
||||
INTUSE(_IO_doallocbuf) (f);
|
||||
_IO_setg (f, f->_IO_buf_base, f->_IO_buf_base, f->_IO_buf_base);
|
||||
}
|
||||
/* Otherwise must be currently reading.
|
||||
@ -638,6 +647,7 @@ _IO_new_file_overflow (f, ch)
|
||||
return EOF;
|
||||
return (unsigned char) ch;
|
||||
}
|
||||
INTDEF2(_IO_new_file_overflow, _IO_file_overflow)
|
||||
|
||||
int
|
||||
_IO_new_file_sync (fp)
|
||||
@ -672,6 +682,7 @@ _IO_new_file_sync (fp)
|
||||
/* setg(base(), ptr, ptr); */
|
||||
return retval;
|
||||
}
|
||||
INTDEF2(_IO_new_file_sync, _IO_file_sync)
|
||||
|
||||
_IO_off64_t
|
||||
_IO_new_file_seekoff (fp, offset, dir, mode)
|
||||
@ -700,7 +711,7 @@ _IO_new_file_seekoff (fp, offset, dir, mode)
|
||||
FIXME: simulate mem-papped files. */
|
||||
|
||||
if (fp->_IO_write_ptr > fp->_IO_write_base || _IO_in_put_mode (fp))
|
||||
if (_IO_switch_to_get_mode (fp))
|
||||
if (INTUSE(_IO_switch_to_get_mode) (fp))
|
||||
return EOF;
|
||||
|
||||
if (fp->_IO_buf_base == NULL)
|
||||
@ -711,7 +722,7 @@ _IO_new_file_seekoff (fp, offset, dir, mode)
|
||||
free (fp->_IO_read_base);
|
||||
fp->_flags &= ~_IO_IN_BACKUP;
|
||||
}
|
||||
_IO_doallocbuf (fp);
|
||||
INTUSE(_IO_doallocbuf) (fp);
|
||||
_IO_setp (fp, fp->_IO_buf_base, fp->_IO_buf_base);
|
||||
_IO_setg (fp, fp->_IO_buf_base, fp->_IO_buf_base, fp->_IO_buf_base);
|
||||
}
|
||||
@ -797,7 +808,7 @@ _IO_new_file_seekoff (fp, offset, dir, mode)
|
||||
}
|
||||
|
||||
#ifdef TODO
|
||||
_IO_unsave_markers (fp);
|
||||
INTUSE(_IO_unsave_markers) (fp);
|
||||
#endif
|
||||
|
||||
if (fp->_flags & _IO_NO_READS)
|
||||
@ -837,7 +848,7 @@ _IO_new_file_seekoff (fp, offset, dir, mode)
|
||||
return offset;
|
||||
dumb:
|
||||
|
||||
_IO_unsave_markers (fp);
|
||||
INTUSE(_IO_unsave_markers) (fp);
|
||||
result = _IO_SYSSEEK (fp, offset, dir);
|
||||
if (result != EOF)
|
||||
{
|
||||
@ -858,6 +869,7 @@ resync:
|
||||
|
||||
return offset;
|
||||
}
|
||||
INTDEF2(_IO_new_file_seekoff, _IO_file_seekoff)
|
||||
|
||||
_IO_off64_t
|
||||
_IO_file_seekoff_mmap (fp, offset, dir, mode)
|
||||
@ -913,6 +925,7 @@ _IO_file_read (fp, buf, size)
|
||||
{
|
||||
return read (fp->_fileno, buf, size);
|
||||
}
|
||||
INTDEF(_IO_file_read)
|
||||
|
||||
_IO_off64_t
|
||||
_IO_file_seek (fp, offset, dir)
|
||||
@ -926,6 +939,7 @@ _IO_file_seek (fp, offset, dir)
|
||||
return lseek (fp->_fileno, offset, dir);
|
||||
#endif
|
||||
}
|
||||
INTDEF(_IO_file_seek)
|
||||
|
||||
int
|
||||
_IO_file_stat (fp, st)
|
||||
@ -938,6 +952,7 @@ _IO_file_stat (fp, st)
|
||||
return fstat (fp->_fileno, (struct stat *) st);
|
||||
#endif
|
||||
}
|
||||
INTDEF(_IO_file_stat)
|
||||
|
||||
int
|
||||
_IO_file_close_mmap (fp)
|
||||
@ -956,6 +971,7 @@ _IO_file_close (fp)
|
||||
{
|
||||
return close (fp->_fileno);
|
||||
}
|
||||
INTDEF(_IO_file_close)
|
||||
|
||||
_IO_ssize_t
|
||||
_IO_new_file_write (f, data, n)
|
||||
@ -1066,10 +1082,11 @@ _IO_new_file_xsputn (f, data, n)
|
||||
buffer, but it's somewhat messier for line-buffered files,
|
||||
so we let _IO_default_xsputn handle the general case. */
|
||||
if (to_do)
|
||||
to_do -= _IO_default_xsputn (f, s+do_write, to_do);
|
||||
to_do -= INTUSE(_IO_default_xsputn) (f, s+do_write, to_do);
|
||||
}
|
||||
return n - to_do;
|
||||
}
|
||||
INTDEF2(_IO_new_file_xsputn, _IO_file_xsputn)
|
||||
|
||||
_IO_size_t
|
||||
_IO_file_xsgetn (fp, data, n)
|
||||
@ -1091,7 +1108,7 @@ _IO_file_xsgetn (fp, data, n)
|
||||
free (fp->_IO_save_base);
|
||||
fp->_flags &= ~_IO_IN_BACKUP;
|
||||
}
|
||||
_IO_doallocbuf (fp);
|
||||
INTUSE(_IO_doallocbuf) (fp);
|
||||
}
|
||||
|
||||
while (want > 0)
|
||||
@ -1169,6 +1186,7 @@ _IO_file_xsgetn (fp, data, n)
|
||||
|
||||
return n - want;
|
||||
}
|
||||
INTDEF(_IO_file_xsgetn)
|
||||
|
||||
static _IO_size_t _IO_file_xsgetn_mmap __P ((_IO_FILE *, void *, _IO_size_t));
|
||||
static _IO_size_t
|
||||
@ -1206,47 +1224,48 @@ _IO_file_xsgetn_mmap (fp, data, n)
|
||||
struct _IO_jump_t _IO_file_jumps =
|
||||
{
|
||||
JUMP_INIT_DUMMY,
|
||||
JUMP_INIT(finish, _IO_new_file_finish),
|
||||
JUMP_INIT(overflow, _IO_new_file_overflow),
|
||||
JUMP_INIT(underflow, _IO_new_file_underflow),
|
||||
JUMP_INIT(uflow, _IO_default_uflow),
|
||||
JUMP_INIT(pbackfail, _IO_default_pbackfail),
|
||||
JUMP_INIT(xsputn, _IO_new_file_xsputn),
|
||||
JUMP_INIT(xsgetn, _IO_file_xsgetn),
|
||||
JUMP_INIT(finish, INTUSE(_IO_file_finish)),
|
||||
JUMP_INIT(overflow, INTUSE(_IO_file_overflow)),
|
||||
JUMP_INIT(underflow, INTUSE(_IO_file_underflow)),
|
||||
JUMP_INIT(uflow, INTUSE(_IO_default_uflow)),
|
||||
JUMP_INIT(pbackfail, INTUSE(_IO_default_pbackfail)),
|
||||
JUMP_INIT(xsputn, INTUSE(_IO_file_xsputn)),
|
||||
JUMP_INIT(xsgetn, INTUSE(_IO_file_xsgetn)),
|
||||
JUMP_INIT(seekoff, _IO_new_file_seekoff),
|
||||
JUMP_INIT(seekpos, _IO_default_seekpos),
|
||||
JUMP_INIT(setbuf, _IO_new_file_setbuf),
|
||||
JUMP_INIT(sync, _IO_new_file_sync),
|
||||
JUMP_INIT(doallocate, _IO_file_doallocate),
|
||||
JUMP_INIT(read, _IO_file_read),
|
||||
JUMP_INIT(doallocate, INTUSE(_IO_file_doallocate)),
|
||||
JUMP_INIT(read, INTUSE(_IO_file_read)),
|
||||
JUMP_INIT(write, _IO_new_file_write),
|
||||
JUMP_INIT(seek, _IO_file_seek),
|
||||
JUMP_INIT(close, _IO_file_close),
|
||||
JUMP_INIT(stat, _IO_file_stat),
|
||||
JUMP_INIT(seek, INTUSE(_IO_file_seek)),
|
||||
JUMP_INIT(close, INTUSE(_IO_file_close)),
|
||||
JUMP_INIT(stat, INTUSE(_IO_file_stat)),
|
||||
JUMP_INIT(showmanyc, _IO_default_showmanyc),
|
||||
JUMP_INIT(imbue, _IO_default_imbue)
|
||||
};
|
||||
INTDEF(_IO_file_jumps)
|
||||
|
||||
struct _IO_jump_t _IO_file_jumps_mmap =
|
||||
{
|
||||
JUMP_INIT_DUMMY,
|
||||
JUMP_INIT(finish, _IO_new_file_finish),
|
||||
JUMP_INIT(overflow, _IO_new_file_overflow),
|
||||
JUMP_INIT(finish, INTUSE(_IO_file_finish)),
|
||||
JUMP_INIT(overflow, INTUSE(_IO_file_overflow)),
|
||||
JUMP_INIT(underflow, _IO_file_underflow_mmap),
|
||||
JUMP_INIT(uflow, _IO_default_uflow),
|
||||
JUMP_INIT(pbackfail, _IO_default_pbackfail),
|
||||
JUMP_INIT(uflow, INTUSE(_IO_default_uflow)),
|
||||
JUMP_INIT(pbackfail, INTUSE(_IO_default_pbackfail)),
|
||||
JUMP_INIT(xsputn, _IO_new_file_xsputn),
|
||||
JUMP_INIT(xsgetn, _IO_file_xsgetn_mmap),
|
||||
JUMP_INIT(seekoff, _IO_file_seekoff_mmap),
|
||||
JUMP_INIT(seekpos, _IO_default_seekpos),
|
||||
JUMP_INIT(setbuf, _IO_new_file_setbuf),
|
||||
JUMP_INIT(sync, _IO_new_file_sync),
|
||||
JUMP_INIT(doallocate, _IO_file_doallocate),
|
||||
JUMP_INIT(read, _IO_file_read),
|
||||
JUMP_INIT(doallocate, INTUSE(_IO_file_doallocate)),
|
||||
JUMP_INIT(read, INTUSE(_IO_file_read)),
|
||||
JUMP_INIT(write, _IO_new_file_write),
|
||||
JUMP_INIT(seek, _IO_file_seek),
|
||||
JUMP_INIT(seek, INTUSE(_IO_file_seek)),
|
||||
JUMP_INIT(close, _IO_file_close_mmap),
|
||||
JUMP_INIT(stat, _IO_file_stat),
|
||||
JUMP_INIT(stat, INTUSE(_IO_file_stat)),
|
||||
JUMP_INIT(showmanyc, _IO_default_showmanyc),
|
||||
JUMP_INIT(imbue, _IO_default_imbue)
|
||||
};
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1993, 1995-2000, 2001 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1993, 1995-2001, 2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -39,7 +39,7 @@ ftello (fp)
|
||||
CHECK_FILE (fp, -1L);
|
||||
_IO_cleanup_region_start ((void (*) (void *)) _IO_funlockfile, fp);
|
||||
_IO_flockfile (fp);
|
||||
pos = _IO_seekoff (fp, 0, _IO_seek_cur, 0);
|
||||
pos = INTUSE(_IO_seekoff) (fp, 0, _IO_seek_cur, 0);
|
||||
if (_IO_in_backup (fp))
|
||||
{
|
||||
if (fp->_mode <= 0)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1993, 1995-2000, 2001 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1993, 1995-2001, 2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -40,7 +40,7 @@ ftello64 (fp)
|
||||
CHECK_FILE (fp, -1L);
|
||||
_IO_cleanup_region_start ((void (*) (void *)) _IO_funlockfile, fp);
|
||||
_IO_flockfile (fp);
|
||||
pos = _IO_seekoff (fp, 0, _IO_seek_cur, 0);
|
||||
pos = INTUSE(_IO_seekoff) (fp, 0, _IO_seek_cur, 0);
|
||||
if (_IO_in_backup (fp))
|
||||
{
|
||||
if (fp->_mode <= 0)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1993,1995,1997-1999,2000,2001 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1993,1995,1997-2001,2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -66,7 +66,8 @@ _IO_un_link (fp)
|
||||
run_fp = (_IO_FILE *) fp;
|
||||
_IO_flockfile ((_IO_FILE *) fp);
|
||||
#endif
|
||||
for (f = &_IO_list_all; *f; f = (struct _IO_FILE_plus **) &(*f)->file._chain)
|
||||
for (f = &INTUSE(_IO_list_all); *f;
|
||||
f = (struct _IO_FILE_plus **) &(*f)->file._chain)
|
||||
{
|
||||
if (*f == fp)
|
||||
{
|
||||
@ -84,6 +85,7 @@ _IO_un_link (fp)
|
||||
#endif
|
||||
}
|
||||
}
|
||||
INTDEF(_IO_un_link)
|
||||
|
||||
void
|
||||
_IO_link_in (fp)
|
||||
@ -98,8 +100,8 @@ _IO_link_in (fp)
|
||||
run_fp = (_IO_FILE *) fp;
|
||||
_IO_flockfile ((_IO_FILE *) fp);
|
||||
#endif
|
||||
fp->file._chain = (_IO_FILE *) _IO_list_all;
|
||||
_IO_list_all = fp;
|
||||
fp->file._chain = (_IO_FILE *) INTUSE(_IO_list_all);
|
||||
INTUSE(_IO_list_all) = fp;
|
||||
++_IO_list_all_stamp;
|
||||
#ifdef _IO_MTSAFE_IO
|
||||
_IO_funlockfile ((_IO_FILE *) fp);
|
||||
@ -109,6 +111,7 @@ _IO_link_in (fp)
|
||||
#endif
|
||||
}
|
||||
}
|
||||
INTDEF(_IO_link_in)
|
||||
|
||||
/* Return minimum _pos markers
|
||||
Assumes the current get area is the main get area. */
|
||||
@ -189,6 +192,7 @@ _IO_switch_to_get_mode (fp)
|
||||
fp->_flags &= ~_IO_CURRENTLY_PUTTING;
|
||||
return 0;
|
||||
}
|
||||
INTDEF(_IO_switch_to_get_mode)
|
||||
|
||||
void
|
||||
_IO_free_backup_area (fp)
|
||||
@ -201,6 +205,7 @@ _IO_free_backup_area (fp)
|
||||
fp->_IO_save_end = NULL;
|
||||
fp->_IO_backup_base = NULL;
|
||||
}
|
||||
INTDEF(_IO_free_backup_area)
|
||||
|
||||
#if 0
|
||||
int
|
||||
@ -325,7 +330,7 @@ __underflow (fp)
|
||||
if (fp->_mode == 0)
|
||||
_IO_fwide (fp, -1);
|
||||
if (_IO_in_put_mode (fp))
|
||||
if (_IO_switch_to_get_mode (fp) == EOF)
|
||||
if (INTUSE(_IO_switch_to_get_mode) (fp) == EOF)
|
||||
return EOF;
|
||||
if (fp->_IO_read_ptr < fp->_IO_read_end)
|
||||
return *(unsigned char *) fp->_IO_read_ptr;
|
||||
@ -341,7 +346,7 @@ __underflow (fp)
|
||||
return EOF;
|
||||
}
|
||||
else if (_IO_have_backup (fp))
|
||||
_IO_free_backup_area (fp);
|
||||
INTUSE(_IO_free_backup_area) (fp);
|
||||
return _IO_UNDERFLOW (fp);
|
||||
}
|
||||
|
||||
@ -357,7 +362,7 @@ __uflow (fp)
|
||||
if (fp->_mode == 0)
|
||||
_IO_fwide (fp, -11);
|
||||
if (_IO_in_put_mode (fp))
|
||||
if (_IO_switch_to_get_mode (fp) == EOF)
|
||||
if (INTUSE(_IO_switch_to_get_mode) (fp) == EOF)
|
||||
return EOF;
|
||||
if (fp->_IO_read_ptr < fp->_IO_read_end)
|
||||
return *(unsigned char *) fp->_IO_read_ptr++;
|
||||
@ -373,7 +378,7 @@ __uflow (fp)
|
||||
return EOF;
|
||||
}
|
||||
else if (_IO_have_backup (fp))
|
||||
_IO_free_backup_area (fp);
|
||||
INTUSE(_IO_free_backup_area) (fp);
|
||||
return _IO_UFLOW (fp);
|
||||
}
|
||||
|
||||
@ -393,6 +398,7 @@ _IO_setb (f, b, eb, a)
|
||||
else
|
||||
f->_flags |= _IO_USER_BUF;
|
||||
}
|
||||
INTDEF(_IO_setb)
|
||||
|
||||
void
|
||||
_IO_doallocbuf (fp)
|
||||
@ -403,8 +409,9 @@ _IO_doallocbuf (fp)
|
||||
if (!(fp->_flags & _IO_UNBUFFERED) || fp->_mode > 0)
|
||||
if (_IO_DOALLOCATE (fp) != EOF)
|
||||
return;
|
||||
_IO_setb (fp, fp->_shortbuf, fp->_shortbuf+1, 0);
|
||||
INTUSE(_IO_setb) (fp, fp->_shortbuf, fp->_shortbuf+1, 0);
|
||||
}
|
||||
INTDEF(_IO_doallocbuf)
|
||||
|
||||
int
|
||||
_IO_default_underflow (fp)
|
||||
@ -422,6 +429,7 @@ _IO_default_uflow (fp)
|
||||
return EOF;
|
||||
return *(unsigned char *) fp->_IO_read_ptr++;
|
||||
}
|
||||
INTDEF(_IO_default_uflow)
|
||||
|
||||
_IO_size_t
|
||||
_IO_default_xsputn (f, data, n)
|
||||
@ -469,6 +477,7 @@ _IO_default_xsputn (f, data, n)
|
||||
}
|
||||
return n - more;
|
||||
}
|
||||
INTDEF(_IO_default_xsputn)
|
||||
|
||||
_IO_size_t
|
||||
_IO_sgetn (fp, data, n)
|
||||
@ -479,6 +488,7 @@ _IO_sgetn (fp, data, n)
|
||||
/* FIXME handle putback buffer here! */
|
||||
return _IO_XSGETN (fp, data, n);
|
||||
}
|
||||
INTDEF(_IO_sgetn)
|
||||
|
||||
_IO_size_t
|
||||
_IO_default_xsgetn (fp, data, n)
|
||||
@ -523,6 +533,7 @@ _IO_default_xsgetn (fp, data, n)
|
||||
}
|
||||
return n - more;
|
||||
}
|
||||
INTDEF(_IO_default_xsgetn)
|
||||
|
||||
#if 0
|
||||
/* Seems not to be needed. --drepper */
|
||||
@ -545,12 +556,12 @@ _IO_default_setbuf (fp, p, len)
|
||||
if (p == NULL || len == 0)
|
||||
{
|
||||
fp->_flags |= _IO_UNBUFFERED;
|
||||
_IO_setb (fp, fp->_shortbuf, fp->_shortbuf+1, 0);
|
||||
INTUSE(_IO_setb) (fp, fp->_shortbuf, fp->_shortbuf+1, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
fp->_flags &= ~_IO_UNBUFFERED;
|
||||
_IO_setb (fp, p, p+len, 0);
|
||||
INTUSE(_IO_setb) (fp, p, p+len, 0);
|
||||
}
|
||||
fp->_IO_write_base = fp->_IO_write_ptr = fp->_IO_write_end = 0;
|
||||
fp->_IO_read_base = fp->_IO_read_ptr = fp->_IO_read_end = 0;
|
||||
@ -573,9 +584,10 @@ _IO_default_doallocate (fp)
|
||||
char *buf;
|
||||
|
||||
ALLOC_BUF (buf, _IO_BUFSIZ, EOF);
|
||||
_IO_setb (fp, buf, buf+_IO_BUFSIZ, 1);
|
||||
INTUSE(_IO_setb) (fp, buf, buf+_IO_BUFSIZ, 1);
|
||||
return 1;
|
||||
}
|
||||
INTDEF(_IO_default_doallocate)
|
||||
|
||||
void
|
||||
_IO_init (fp, flags)
|
||||
@ -584,6 +596,7 @@ _IO_init (fp, flags)
|
||||
{
|
||||
_IO_no_init (fp, flags, -1, NULL, NULL);
|
||||
}
|
||||
INTDEF(_IO_init)
|
||||
|
||||
void
|
||||
_IO_no_init (fp, flags, orientation, wd, jmp)
|
||||
@ -674,8 +687,9 @@ _IO_default_finish (fp, dummy)
|
||||
_IO_lock_fini (*fp->_lock);
|
||||
#endif
|
||||
|
||||
_IO_un_link ((struct _IO_FILE_plus *) fp);
|
||||
INTUSE(_IO_un_link) ((struct _IO_FILE_plus *) fp);
|
||||
}
|
||||
INTDEF(_IO_default_finish)
|
||||
|
||||
_IO_off64_t
|
||||
_IO_default_seekoff (fp, offset, dir, mode)
|
||||
@ -708,6 +722,7 @@ _IO_sputbackc (fp, c)
|
||||
|
||||
return result;
|
||||
}
|
||||
INTDEF(_IO_sputbackc)
|
||||
|
||||
int
|
||||
_IO_sungetc (fp)
|
||||
@ -767,6 +782,7 @@ _IO_adjust_column (start, line, count)
|
||||
return line + count - ptr - 1;
|
||||
return start + count;
|
||||
}
|
||||
INTDEF(_IO_adjust_column)
|
||||
|
||||
#if 0
|
||||
/* Seems not to be needed. --drepper */
|
||||
@ -797,7 +813,7 @@ _IO_flush_all_lockp (int do_lock)
|
||||
#endif
|
||||
|
||||
last_stamp = _IO_list_all_stamp;
|
||||
fp = (_IO_FILE *) _IO_list_all;
|
||||
fp = (_IO_FILE *) INTUSE(_IO_list_all);
|
||||
while (fp != NULL)
|
||||
{
|
||||
run_fp = fp;
|
||||
@ -821,7 +837,7 @@ _IO_flush_all_lockp (int do_lock)
|
||||
if (last_stamp != _IO_list_all_stamp)
|
||||
{
|
||||
/* Something was added to the list. Start all over again. */
|
||||
fp = (_IO_FILE *) _IO_list_all;
|
||||
fp = (_IO_FILE *) INTUSE(_IO_list_all);
|
||||
last_stamp = _IO_list_all_stamp;
|
||||
}
|
||||
else
|
||||
@ -844,6 +860,7 @@ _IO_flush_all ()
|
||||
/* We want locking. */
|
||||
return _IO_flush_all_lockp (1);
|
||||
}
|
||||
INTDEF(_IO_flush_all)
|
||||
|
||||
void
|
||||
_IO_flush_all_linebuffered ()
|
||||
@ -857,7 +874,7 @@ _IO_flush_all_linebuffered ()
|
||||
#endif
|
||||
|
||||
last_stamp = _IO_list_all_stamp;
|
||||
fp = (_IO_FILE *) _IO_list_all;
|
||||
fp = (_IO_FILE *) INTUSE(_IO_list_all);
|
||||
while (fp != NULL)
|
||||
{
|
||||
run_fp = fp;
|
||||
@ -872,7 +889,7 @@ _IO_flush_all_linebuffered ()
|
||||
if (last_stamp != _IO_list_all_stamp)
|
||||
{
|
||||
/* Something was added to the list. Start all over again. */
|
||||
fp = (_IO_FILE *) _IO_list_all;
|
||||
fp = (_IO_FILE *) INTUSE(_IO_list_all);
|
||||
last_stamp = _IO_list_all_stamp;
|
||||
}
|
||||
else
|
||||
@ -884,6 +901,7 @@ _IO_flush_all_linebuffered ()
|
||||
_IO_cleanup_region_end (0);
|
||||
#endif
|
||||
}
|
||||
INTDEF(_IO_flush_all_linebuffered)
|
||||
#ifdef _LIBC
|
||||
weak_alias (_IO_flush_all_linebuffered, _flushlbf)
|
||||
#endif
|
||||
@ -894,7 +912,7 @@ static void
|
||||
_IO_unbuffer_write ()
|
||||
{
|
||||
struct _IO_FILE *fp;
|
||||
for (fp = (_IO_FILE *) _IO_list_all; fp; fp = fp->_chain)
|
||||
for (fp = (_IO_FILE *) INTUSE(_IO_list_all); fp; fp = fp->_chain)
|
||||
{
|
||||
if (! (fp->_flags & _IO_UNBUFFERED)
|
||||
&& (! (fp->_flags & _IO_NO_WRITES)
|
||||
@ -912,7 +930,7 @@ _IO_unbuffer_write ()
|
||||
int
|
||||
_IO_cleanup ()
|
||||
{
|
||||
int result = _IO_flush_all ();
|
||||
int result = INTUSE(_IO_flush_all) ();
|
||||
|
||||
/* We currently don't have a reliable mechanism for making sure that
|
||||
C++ static destructors are executed in the correct order.
|
||||
@ -934,7 +952,7 @@ _IO_init_marker (marker, fp)
|
||||
{
|
||||
marker->_sbuf = fp;
|
||||
if (_IO_in_put_mode (fp))
|
||||
_IO_switch_to_get_mode (fp);
|
||||
INTUSE(_IO_switch_to_get_mode) (fp);
|
||||
if (_IO_in_backup (fp))
|
||||
marker->_pos = fp->_IO_read_ptr - fp->_IO_read_end;
|
||||
else
|
||||
@ -1040,8 +1058,9 @@ _IO_unsave_markers (fp)
|
||||
}
|
||||
|
||||
if (_IO_have_backup (fp))
|
||||
_IO_free_backup_area (fp);
|
||||
INTUSE(_IO_free_backup_area) (fp);
|
||||
}
|
||||
INTDEF(_IO_unsave_markers)
|
||||
|
||||
#if 0
|
||||
/* Seems not to be needed. --drepper */
|
||||
@ -1115,6 +1134,7 @@ _IO_default_pbackfail (fp, c)
|
||||
}
|
||||
return (unsigned char) c;
|
||||
}
|
||||
INTDEF(_IO_default_pbackfail)
|
||||
|
||||
_IO_off64_t
|
||||
_IO_default_seek (fp, offset, dir)
|
||||
@ -1168,7 +1188,7 @@ _IO_default_imbue (fp, locale)
|
||||
_IO_ITER
|
||||
_IO_iter_begin()
|
||||
{
|
||||
return (_IO_ITER) _IO_list_all;
|
||||
return (_IO_ITER) INTUSE(_IO_list_all);
|
||||
}
|
||||
|
||||
_IO_ITER
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1993,1995,1997-1999,2000,2001 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1993,1995,1997-2001,2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -55,16 +55,17 @@ _IO_new_fclose (fp)
|
||||
|
||||
/* First unlink the stream. */
|
||||
if (fp->_IO_file_flags & _IO_IS_FILEBUF)
|
||||
_IO_un_link ((struct _IO_FILE_plus *) fp);
|
||||
INTUSE(_IO_un_link) ((struct _IO_FILE_plus *) fp);
|
||||
|
||||
_IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
|
||||
_IO_flockfile (fp);
|
||||
if (fp->_IO_file_flags & _IO_IS_FILEBUF)
|
||||
status = _IO_file_close_it (fp);
|
||||
status = INTUSE(_IO_file_close_it) (fp);
|
||||
else
|
||||
status = fp->_flags & _IO_ERR_SEEN ? -1 : 0;
|
||||
_IO_FINISH (fp);
|
||||
_IO_funlockfile (fp);
|
||||
_IO_cleanup_region_end (0);
|
||||
if (fp->_mode > 0)
|
||||
{
|
||||
#if _LIBC
|
||||
@ -75,10 +76,15 @@ _IO_new_fclose (fp)
|
||||
__gconv_release_step (cc->__cd_in.__cd.__steps);
|
||||
__gconv_release_step (cc->__cd_out.__cd.__steps);
|
||||
#endif
|
||||
|
||||
if (_IO_have_wbackup (fp))
|
||||
INTUSE(_IO_free_wbackup_area) (fp);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_IO_have_backup (fp))
|
||||
INTUSE(_IO_free_backup_area) (fp);
|
||||
}
|
||||
_IO_cleanup_region_end (0);
|
||||
if (_IO_have_backup (fp))
|
||||
_IO_free_backup_area (fp);
|
||||
if (fp != _IO_stdin && fp != _IO_stdout && fp != _IO_stderr)
|
||||
{
|
||||
fp->_IO_file_flags = 0;
|
||||
|
@ -124,15 +124,15 @@ _IO_new_fdopen (fd, mode)
|
||||
#ifdef _IO_MTSAFE_IO
|
||||
new_f->fp.file._lock = &new_f->lock;
|
||||
#endif
|
||||
_IO_no_init (&new_f->fp.file, 0, 0, &new_f->wd, &_IO_wfile_jumps);
|
||||
_IO_JUMPS (&new_f->fp) = &_IO_file_jumps;
|
||||
_IO_file_init (&new_f->fp);
|
||||
_IO_no_init (&new_f->fp.file, 0, 0, &new_f->wd, &INTUSE(_IO_wfile_jumps));
|
||||
_IO_JUMPS (&new_f->fp) = &INTUSE(_IO_file_jumps);
|
||||
INTUSE(_IO_file_init) (&new_f->fp);
|
||||
#if !_IO_UNIFIED_JUMPTABLES
|
||||
new_f->fp.vtable = NULL;
|
||||
#endif
|
||||
if (_IO_file_attach ((_IO_FILE *) &new_f->fp, fd) == NULL)
|
||||
if (INTUSE(_IO_file_attach) ((_IO_FILE *) &new_f->fp, fd) == NULL)
|
||||
{
|
||||
_IO_un_link (&new_f->fp);
|
||||
INTUSE(_IO_un_link) (&new_f->fp);
|
||||
free (new_f);
|
||||
return NULL;
|
||||
}
|
||||
@ -144,6 +144,7 @@ _IO_new_fdopen (fd, mode)
|
||||
|
||||
return __fopen_maybe_mmap (&new_f->fp.file);
|
||||
}
|
||||
INTDEF2(_IO_new_fdopen, _IO_fdopen)
|
||||
|
||||
strong_alias (_IO_new_fdopen, __new_fdopen)
|
||||
versioned_symbol (libc, _IO_new_fdopen, _IO_fdopen, GLIBC_2_1);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1993, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1993,1995,1996,1997,1998,2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -33,7 +33,7 @@ _IO_fflush (fp)
|
||||
_IO_FILE *fp;
|
||||
{
|
||||
if (fp == NULL)
|
||||
return _IO_flush_all ();
|
||||
return INTUSE(_IO_flush_all) ();
|
||||
else
|
||||
{
|
||||
int result;
|
||||
@ -46,6 +46,7 @@ _IO_fflush (fp)
|
||||
return result;
|
||||
}
|
||||
}
|
||||
INTDEF(_IO_fflush)
|
||||
|
||||
#ifdef weak_alias
|
||||
weak_alias (_IO_fflush, fflush)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1993, 1995, 1996, 1997, 2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -33,7 +33,7 @@ fflush_unlocked (fp)
|
||||
_IO_FILE *fp;
|
||||
{
|
||||
if (fp == NULL)
|
||||
return _IO_flush_all ();
|
||||
return INTUSE(_IO_flush_all) ();
|
||||
else
|
||||
{
|
||||
CHECK_FILE (fp, EOF);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1993, 1995-1999, 2000, 2001 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1993, 1995-2001, 2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -40,7 +40,7 @@ _IO_new_fgetpos (fp, posp)
|
||||
CHECK_FILE (fp, EOF);
|
||||
_IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
|
||||
_IO_flockfile (fp);
|
||||
pos = _IO_seekoff (fp, 0, _IO_seek_cur, 0);
|
||||
pos = INTUSE(_IO_seekoff) (fp, 0, _IO_seek_cur, 0);
|
||||
if (_IO_in_backup (fp))
|
||||
{
|
||||
if (fp->_mode <= 0)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1993, 1995-2000, 2001 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1993, 1995-2001, 2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -40,7 +40,7 @@ _IO_new_fgetpos64 (fp, posp)
|
||||
CHECK_FILE (fp, EOF);
|
||||
_IO_cleanup_region_start ((void (*) (void *)) _IO_funlockfile, fp);
|
||||
_IO_flockfile (fp);
|
||||
pos = _IO_seekoff (fp, 0, _IO_seek_cur, 0);
|
||||
pos = INTUSE(_IO_seekoff) (fp, 0, _IO_seek_cur, 0);
|
||||
if (_IO_in_backup (fp))
|
||||
{
|
||||
if (fp->_mode <= 0)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1993, 95, 96, 97, 98, 99 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1993, 95, 96, 97, 98, 99, 2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -47,7 +47,7 @@ _IO_fgets (buf, n, fp)
|
||||
case. We return an error only when there is a new error. */
|
||||
old_error = fp->_IO_file_flags & _IO_ERR_SEEN;
|
||||
fp->_IO_file_flags &= ~_IO_ERR_SEEN;
|
||||
count = _IO_getline (fp, buf, n - 1, '\n', 1);
|
||||
count = INTUSE(_IO_getline) (fp, buf, n - 1, '\n', 1);
|
||||
/* If we read in some bytes and errno is EAGAIN, that error will
|
||||
be reported for next read. */
|
||||
if (count == 0 || ((fp->_IO_file_flags & _IO_ERR_SEEN)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1993, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1993,1995,1996,1997,1998,2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -45,7 +45,7 @@ fgets_unlocked (buf, n, fp)
|
||||
case. We return an error only when there is a new error. */
|
||||
old_error = fp->_IO_file_flags & _IO_ERR_SEEN;
|
||||
fp->_IO_file_flags &= ~_IO_ERR_SEEN;
|
||||
count = _IO_getline (fp, buf, n - 1, '\n', 1);
|
||||
count = INTUSE(_IO_getline) (fp, buf, n - 1, '\n', 1);
|
||||
/* If we read in some bytes and errno is EAGAIN, that error will
|
||||
be reported for next read. */
|
||||
if (count == 0 || ((fp->_IO_file_flags & _IO_ERR_SEEN)
|
||||
|
@ -71,7 +71,7 @@ __fopen_maybe_mmap (fp)
|
||||
and use a special jump table with simplified
|
||||
underflow functions which never tries to read
|
||||
anything from the file. */
|
||||
_IO_setb (fp, p, (char *) p + st.st_size, 0);
|
||||
INTUSE(_IO_setb) (fp, p, (char *) p + st.st_size, 0);
|
||||
_IO_setg (fp, p, p, p);
|
||||
|
||||
if (fp->_mode <= 0)
|
||||
@ -110,19 +110,20 @@ __fopen_internal (filename, mode, is32)
|
||||
new_f->fp.file._lock = &new_f->lock;
|
||||
#endif
|
||||
#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
|
||||
_IO_no_init (&new_f->fp.file, 0, 0, &new_f->wd, &_IO_wfile_jumps);
|
||||
_IO_no_init (&new_f->fp.file, 0, 0, &new_f->wd, &INTUSE(_IO_wfile_jumps));
|
||||
#else
|
||||
_IO_no_init (&new_f->fp.file, 1, 0, NULL, NULL);
|
||||
#endif
|
||||
_IO_JUMPS (&new_f->fp) = &_IO_file_jumps;
|
||||
_IO_file_init (&new_f->fp);
|
||||
_IO_JUMPS (&new_f->fp) = &INTUSE(_IO_file_jumps);
|
||||
INTUSE(_IO_file_init) (&new_f->fp);
|
||||
#if !_IO_UNIFIED_JUMPTABLES
|
||||
new_f->fp.vtable = NULL;
|
||||
#endif
|
||||
if (_IO_file_fopen ((_IO_FILE *) new_f, filename, mode, is32) != NULL)
|
||||
if (INTUSE(_IO_file_fopen) ((_IO_FILE *) new_f, filename, mode, is32)
|
||||
!= NULL)
|
||||
return __fopen_maybe_mmap (&new_f->fp.file);
|
||||
|
||||
_IO_un_link (&new_f->fp);
|
||||
INTUSE(_IO_un_link) (&new_f->fp);
|
||||
free (new_f);
|
||||
return NULL;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1993,95,97,99,2000 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1993,95,97,99,2000,2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -96,18 +96,18 @@ _IO_cookie_close (fp)
|
||||
|
||||
static struct _IO_jump_t _IO_cookie_jumps = {
|
||||
JUMP_INIT_DUMMY,
|
||||
JUMP_INIT(finish, _IO_file_finish),
|
||||
JUMP_INIT(overflow, _IO_file_overflow),
|
||||
JUMP_INIT(underflow, _IO_file_underflow),
|
||||
JUMP_INIT(uflow, _IO_default_uflow),
|
||||
JUMP_INIT(pbackfail, _IO_default_pbackfail),
|
||||
JUMP_INIT(xsputn, _IO_file_xsputn),
|
||||
JUMP_INIT(xsgetn, _IO_default_xsgetn),
|
||||
JUMP_INIT(seekoff, _IO_file_seekoff),
|
||||
JUMP_INIT(finish, INTUSE(_IO_file_finish)),
|
||||
JUMP_INIT(overflow, INTUSE(_IO_file_overflow)),
|
||||
JUMP_INIT(underflow, INTUSE(_IO_file_underflow)),
|
||||
JUMP_INIT(uflow, INTUSE(_IO_default_uflow)),
|
||||
JUMP_INIT(pbackfail, INTUSE(_IO_default_pbackfail)),
|
||||
JUMP_INIT(xsputn, INTUSE(_IO_file_xsputn)),
|
||||
JUMP_INIT(xsgetn, INTUSE(_IO_default_xsgetn)),
|
||||
JUMP_INIT(seekoff, INTUSE(_IO_file_seekoff)),
|
||||
JUMP_INIT(seekpos, _IO_default_seekpos),
|
||||
JUMP_INIT(setbuf, _IO_file_setbuf),
|
||||
JUMP_INIT(sync, _IO_file_sync),
|
||||
JUMP_INIT(doallocate, _IO_file_doallocate),
|
||||
JUMP_INIT(setbuf, INTUSE(_IO_file_setbuf)),
|
||||
JUMP_INIT(sync, INTUSE(_IO_file_sync)),
|
||||
JUMP_INIT(doallocate, INTUSE(_IO_file_doallocate)),
|
||||
JUMP_INIT(read, _IO_cookie_read),
|
||||
JUMP_INIT(write, _IO_cookie_write),
|
||||
JUMP_INIT(seek, _IO_cookie_seek),
|
||||
@ -122,13 +122,13 @@ void
|
||||
_IO_cookie_init (struct _IO_cookie_file *cfile, int read_write,
|
||||
void *cookie, _IO_cookie_io_functions_t io_functions)
|
||||
{
|
||||
_IO_init (&cfile->__fp.file, 0);
|
||||
INTUSE(_IO_init) (&cfile->__fp.file, 0);
|
||||
_IO_JUMPS (&cfile->__fp) = &_IO_cookie_jumps;
|
||||
|
||||
cfile->__cookie = cookie;
|
||||
cfile->__io_functions = io_functions;
|
||||
|
||||
_IO_file_init(&cfile->__fp);
|
||||
INTUSE(_IO_file_init) (&cfile->__fp);
|
||||
|
||||
cfile->__fp.file._IO_file_flags =
|
||||
_IO_mask_flags (&cfile->__fp.file, read_write,
|
||||
@ -215,18 +215,18 @@ _IO_old_cookie_seek (fp, offset, dir)
|
||||
|
||||
static struct _IO_jump_t _IO_old_cookie_jumps = {
|
||||
JUMP_INIT_DUMMY,
|
||||
JUMP_INIT(finish, _IO_file_finish),
|
||||
JUMP_INIT(overflow, _IO_file_overflow),
|
||||
JUMP_INIT(underflow, _IO_file_underflow),
|
||||
JUMP_INIT(uflow, _IO_default_uflow),
|
||||
JUMP_INIT(pbackfail, _IO_default_pbackfail),
|
||||
JUMP_INIT(xsputn, _IO_file_xsputn),
|
||||
JUMP_INIT(xsgetn, _IO_default_xsgetn),
|
||||
JUMP_INIT(seekoff, _IO_file_seekoff),
|
||||
JUMP_INIT(finish, INTUSE(_IO_file_finish)),
|
||||
JUMP_INIT(overflow, INTUSE(_IO_file_overflow)),
|
||||
JUMP_INIT(underflow, INTUSE(_IO_file_underflow)),
|
||||
JUMP_INIT(uflow, INTUSE(_IO_default_uflow)),
|
||||
JUMP_INIT(pbackfail, INTUSE(_IO_default_pbackfail)),
|
||||
JUMP_INIT(xsputn, INTUSE(_IO_file_xsputn)),
|
||||
JUMP_INIT(xsgetn, INTUSE(_IO_default_xsgetn)),
|
||||
JUMP_INIT(seekoff, INTUSE(_IO_file_seekoff)),
|
||||
JUMP_INIT(seekpos, _IO_default_seekpos),
|
||||
JUMP_INIT(setbuf, _IO_file_setbuf),
|
||||
JUMP_INIT(sync, _IO_file_sync),
|
||||
JUMP_INIT(doallocate, _IO_file_doallocate),
|
||||
JUMP_INIT(setbuf, INTUSE(_IO_file_setbuf)),
|
||||
JUMP_INIT(sync, INTUSE(_IO_file_sync)),
|
||||
JUMP_INIT(doallocate, INTUSE(_IO_file_doallocate)),
|
||||
JUMP_INIT(read, _IO_cookie_read),
|
||||
JUMP_INIT(write, _IO_cookie_write),
|
||||
JUMP_INIT(seek, _IO_old_cookie_seek),
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1993, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1993,1996,1997,1998,1999,2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -45,6 +45,7 @@ _IO_fputs (str, fp)
|
||||
_IO_cleanup_region_end (0);
|
||||
return result;
|
||||
}
|
||||
INTDEF(_IO_fputs)
|
||||
|
||||
#ifdef weak_alias
|
||||
weak_alias (_IO_fputs, fputs)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1993, 1995, 1997, 1998, 1999 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1993,1995,1997,1998,1999,2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -41,11 +41,12 @@ _IO_fread (buf, size, count, fp)
|
||||
return 0;
|
||||
_IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
|
||||
_IO_flockfile (fp);
|
||||
bytes_read = _IO_sgetn (fp, (char *) buf, bytes_requested);
|
||||
bytes_read = INTUSE(_IO_sgetn) (fp, (char *) buf, bytes_requested);
|
||||
_IO_funlockfile (fp);
|
||||
_IO_cleanup_region_end (0);
|
||||
return bytes_requested == bytes_read ? count : bytes_read / size;
|
||||
}
|
||||
INTDEF(_IO_fread)
|
||||
|
||||
#ifdef weak_alias
|
||||
weak_alias (_IO_fread, fread)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1993, 1995, 1997, 1998 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1993, 1995, 1997, 1998, 2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -42,6 +42,6 @@ fread_unlocked (buf, size, count, fp)
|
||||
CHECK_FILE (fp, 0);
|
||||
if (bytes_requested == 0)
|
||||
return 0;
|
||||
bytes_read = _IO_sgetn (fp, (char *) buf, bytes_requested);
|
||||
bytes_read = INTUSE(_IO_sgetn) (fp, (char *) buf, bytes_requested);
|
||||
return bytes_requested == bytes_read ? count : bytes_read / size;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1993, 1995, 1997-1999, 2000 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1993, 1995, 1997-2000, 2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -38,7 +38,8 @@ _IO_new_fsetpos (fp, posp)
|
||||
CHECK_FILE (fp, EOF);
|
||||
_IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
|
||||
_IO_flockfile (fp);
|
||||
if (_IO_seekpos (fp, posp->__pos, _IOS_INPUT|_IOS_OUTPUT) == _IO_pos_BAD)
|
||||
if (INTUSE(_IO_seekpos) (fp, posp->__pos, _IOS_INPUT|_IOS_OUTPUT)
|
||||
== _IO_pos_BAD)
|
||||
{
|
||||
/* ANSI explicitly requires setting errno to a positive value on
|
||||
failure. */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1993, 1995, 1997-1999, 2000 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1993, 1995, 1997-2000, 2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -39,7 +39,8 @@ _IO_new_fsetpos64 (fp, posp)
|
||||
CHECK_FILE (fp, EOF);
|
||||
_IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
|
||||
_IO_flockfile (fp);
|
||||
if (_IO_seekpos (fp, posp->__pos, _IOS_INPUT|_IOS_OUTPUT) == _IO_pos_BAD)
|
||||
if (INTUSE(_IO_seekpos) (fp, posp->__pos, _IOS_INPUT|_IOS_OUTPUT)
|
||||
== _IO_pos_BAD)
|
||||
{
|
||||
/* ANSI explicitly requires setting errno to a positive value on
|
||||
failure. */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1993, 1995-2000, 2001 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1993, 1995-2000, 2001, 2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -38,7 +38,7 @@ _IO_ftell (fp)
|
||||
CHECK_FILE (fp, -1L);
|
||||
_IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
|
||||
_IO_flockfile (fp);
|
||||
pos = _IO_seekoff (fp, 0, _IO_seek_cur, 0);
|
||||
pos = INTUSE(_IO_seekoff) (fp, 0, _IO_seek_cur, 0);
|
||||
if (_IO_in_backup (fp))
|
||||
{
|
||||
if (fp->_vtable_offset != 0 || fp->_mode <= 0)
|
||||
@ -56,6 +56,7 @@ _IO_ftell (fp)
|
||||
}
|
||||
return pos;
|
||||
}
|
||||
INTDEF(_IO_ftell)
|
||||
|
||||
#ifdef weak_alias
|
||||
weak_alias (_IO_ftell, ftell)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1993, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1993,96,97,98,99,2000,2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -50,6 +50,7 @@ _IO_fwrite (buf, size, count, fp)
|
||||
else
|
||||
return written / size;
|
||||
}
|
||||
INTDEF(_IO_fwrite)
|
||||
|
||||
#ifdef weak_alias
|
||||
weak_alias (_IO_fwrite, fwrite)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1993, 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1993,1997,1998,2000,2001,2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -38,8 +38,10 @@ _IO_getline (fp, buf, n, delim, extract_delim)
|
||||
int delim;
|
||||
int extract_delim;
|
||||
{
|
||||
return _IO_getline_info (fp, buf, n, delim, extract_delim, (int *) 0);
|
||||
return INTUSE(_IO_getline_info) (fp, buf, n, delim, extract_delim,
|
||||
(int *) 0);
|
||||
}
|
||||
INTDEF(_IO_getline)
|
||||
|
||||
/* Algorithm based on that used by Berkeley pre-4.4 fgets implementation.
|
||||
|
||||
@ -79,7 +81,7 @@ _IO_getline_info (fp, buf, n, delim, extract_delim, eof)
|
||||
if (extract_delim > 0)
|
||||
*ptr++ = c;
|
||||
else if (extract_delim < 0)
|
||||
_IO_sputbackc (fp, c);
|
||||
INTUSE(_IO_sputbackc) (fp, c);
|
||||
if (extract_delim > 0)
|
||||
++len;
|
||||
return ptr - buf;
|
||||
@ -115,5 +117,6 @@ _IO_getline_info (fp, buf, n, delim, extract_delim, eof)
|
||||
}
|
||||
return ptr - buf;
|
||||
}
|
||||
INTDEF(_IO_getline_info)
|
||||
|
||||
#endif /* Defined _LIBC || !_G_HAVE_IO_GETLINE_INFO */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1993, 1996, 1997, 1998 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1993, 1996, 1997, 1998, 2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -55,7 +55,7 @@ _IO_gets (buf)
|
||||
int old_error = _IO_stdin->_IO_file_flags & _IO_ERR_SEEN;
|
||||
_IO_stdin->_IO_file_flags &= ~_IO_ERR_SEEN;
|
||||
buf[0] = (char) ch;
|
||||
count = _IO_getline (_IO_stdin, buf + 1, INT_MAX, '\n', 0) + 1;
|
||||
count = INTUSE(_IO_getline) (_IO_stdin, buf + 1, INT_MAX, '\n', 0) + 1;
|
||||
if (_IO_stdin->_IO_file_flags & _IO_ERR_SEEN)
|
||||
{
|
||||
retval = NULL;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1993, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1993,1997,1998,1999,2000,2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -86,7 +86,7 @@ _IO_getwline_info (fp, buf, n, delim, extract_delim, eof)
|
||||
if (extract_delim > 0)
|
||||
*ptr++ = wc;
|
||||
else if (extract_delim < 0)
|
||||
_IO_sputbackc (fp, wc);
|
||||
INTUSE(_IO_sputbackc) (fp, wc);
|
||||
return ptr - buf;
|
||||
if (extract_delim > 0)
|
||||
++len;
|
||||
|
@ -55,15 +55,20 @@ extern int _IO_obstack_printf __P ((struct obstack *, const char *, ...));
|
||||
#endif
|
||||
#define _IO_clearerr(FP) ((FP)->_flags &= ~(_IO_ERR_SEEN|_IO_EOF_SEEN))
|
||||
#define _IO_fseek(__fp, __offset, __whence) \
|
||||
(_IO_seekoff(__fp, __offset, __whence, _IOS_INPUT|_IOS_OUTPUT) == _IO_pos_BAD ? EOF : 0)
|
||||
#define _IO_rewind(FILE) (void)_IO_seekoff(FILE, 0, 0, _IOS_INPUT|_IOS_OUTPUT)
|
||||
#define _IO_vprintf(FORMAT, ARGS) _IO_vfprintf(_IO_stdout, FORMAT, ARGS)
|
||||
(INTUSE(_IO_seekoff)(__fp, __offset, __whence, _IOS_INPUT|_IOS_OUTPUT) \
|
||||
== _IO_pos_BAD ? EOF : 0)
|
||||
#define _IO_rewind(FILE) \
|
||||
(void)INTUSE(_IO_seekoff)(FILE, 0, 0, _IOS_INPUT|_IOS_OUTPUT)
|
||||
#define _IO_vprintf(FORMAT, ARGS) \
|
||||
INTUSE(_IO_vfprintf) (_IO_stdout, FORMAT, ARGS)
|
||||
#define _IO_freopen(FILENAME, MODE, FP) \
|
||||
(_IO_file_close_it(FP), _IO_file_fopen(FP, FILENAME, MODE, 1))
|
||||
(INTUSE(_IO_file_close_it)(FP), \
|
||||
INTUSE(_IO_file_fopen)(FP, FILENAME, MODE, 1))
|
||||
#define _IO_old_freopen(FILENAME, MODE, FP) \
|
||||
(_IO_old_file_close_it (FP), _IO_old_file_fopen(FP, FILENAME, MODE))
|
||||
#define _IO_freopen64(FILENAME, MODE, FP) \
|
||||
(_IO_file_close_it(FP), _IO_file_fopen(FP, FILENAME, MODE, 0))
|
||||
(INTUSE(_IO_file_close_it)(FP), \
|
||||
INTUSE(_IO_file_fopen)(FP, FILENAME, MODE, 0))
|
||||
#define _IO_fileno(FP) ((FP)->_fileno)
|
||||
extern _IO_FILE* _IO_popen __P((const char*, const char*));
|
||||
extern _IO_FILE* _IO_new_popen __P((const char*, const char*));
|
||||
@ -71,12 +76,25 @@ extern _IO_FILE* _IO_old_popen __P((const char*, const char*));
|
||||
extern int __new_pclose __P((_IO_FILE *));
|
||||
extern int __old_pclose __P((_IO_FILE *));
|
||||
#define _IO_pclose _IO_fclose
|
||||
#define _IO_setbuf(_FP, _BUF) _IO_setbuffer(_FP, _BUF, _IO_BUFSIZ)
|
||||
#define _IO_setlinebuf(_FP) _IO_setvbuf(_FP, NULL, 1, 0)
|
||||
#define _IO_setbuf(_FP, _BUF) INTUSE(_IO_setbuffer)(_FP, _BUF, _IO_BUFSIZ)
|
||||
#define _IO_setlinebuf(_FP) INTUSE(_IO_setvbuf)(_FP, NULL, 1, 0)
|
||||
|
||||
_IO_FILE *__new_freopen __P ((const char *, const char *, _IO_FILE *));
|
||||
_IO_FILE *__old_freopen __P ((const char *, const char *, _IO_FILE *));
|
||||
|
||||
/* Prototype for functions with alternative entry point. */
|
||||
extern void _IO_setbuffer_internal __P((_IO_FILE *, char*, _IO_size_t));
|
||||
extern _IO_size_t _IO_fread_internal __P((void*, _IO_size_t, _IO_size_t,
|
||||
_IO_FILE*));
|
||||
extern _IO_FILE *_IO_fdopen_internal __P((int, const char*));
|
||||
extern int _IO_vsprintf_internal __P((char*, const char*, _IO_va_list));
|
||||
extern int _IO_fflush_internal __P((_IO_FILE*));
|
||||
extern _IO_size_t _IO_fwrite_internal __P((const void*, _IO_size_t,
|
||||
_IO_size_t, _IO_FILE*));
|
||||
extern long int _IO_ftell_internal __P((_IO_FILE*));
|
||||
extern int _IO_fputs_internal __P((const char*, _IO_FILE*));
|
||||
extern int _IO_setvbuf_internal __P((_IO_FILE*, char*, int, _IO_size_t));
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1993, 1997 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1993, 1997, 2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -70,3 +70,4 @@ _IO_padn (fp, pad, count)
|
||||
}
|
||||
return written;
|
||||
}
|
||||
INTDEF(_IO_padn)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1993,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1993,1997-2001,2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Written by Per Bothner <bothner@cygnus.com>.
|
||||
|
||||
@ -230,7 +230,7 @@ _IO_new_popen (command, mode)
|
||||
#endif
|
||||
if (_IO_new_proc_open (fp, command, mode) != NULL)
|
||||
return (_IO_FILE *) &new_f->fpx.file;
|
||||
_IO_un_link (&new_f->fpx.file);
|
||||
INTUSE(_IO_un_link) (&new_f->fpx.file);
|
||||
free (new_f);
|
||||
return NULL;
|
||||
}
|
||||
@ -289,20 +289,20 @@ struct _IO_jump_t _IO_proc_jumps = {
|
||||
JUMP_INIT(finish, _IO_new_file_finish),
|
||||
JUMP_INIT(overflow, _IO_new_file_overflow),
|
||||
JUMP_INIT(underflow, _IO_new_file_underflow),
|
||||
JUMP_INIT(uflow, _IO_default_uflow),
|
||||
JUMP_INIT(pbackfail, _IO_default_pbackfail),
|
||||
JUMP_INIT(uflow, INTUSE(_IO_default_uflow)),
|
||||
JUMP_INIT(pbackfail, INTUSE(_IO_default_pbackfail)),
|
||||
JUMP_INIT(xsputn, _IO_new_file_xsputn),
|
||||
JUMP_INIT(xsgetn, _IO_default_xsgetn),
|
||||
JUMP_INIT(xsgetn, INTUSE(_IO_default_xsgetn)),
|
||||
JUMP_INIT(seekoff, _IO_new_file_seekoff),
|
||||
JUMP_INIT(seekpos, _IO_default_seekpos),
|
||||
JUMP_INIT(setbuf, _IO_new_file_setbuf),
|
||||
JUMP_INIT(sync, _IO_new_file_sync),
|
||||
JUMP_INIT(doallocate, _IO_file_doallocate),
|
||||
JUMP_INIT(read, _IO_file_read),
|
||||
JUMP_INIT(doallocate, INTUSE(_IO_file_doallocate)),
|
||||
JUMP_INIT(read, INTUSE(_IO_file_read)),
|
||||
JUMP_INIT(write, _IO_new_file_write),
|
||||
JUMP_INIT(seek, _IO_file_seek),
|
||||
JUMP_INIT(seek, INTUSE(_IO_file_seek)),
|
||||
JUMP_INIT(close, _IO_new_proc_close),
|
||||
JUMP_INIT(stat, _IO_file_stat),
|
||||
JUMP_INIT(stat, INTUSE(_IO_file_stat)),
|
||||
JUMP_INIT(showmanyc, _IO_default_showmanyc),
|
||||
JUMP_INIT(imbue, _IO_default_imbue)
|
||||
};
|
||||
@ -312,20 +312,20 @@ static struct _IO_jump_t _IO_wproc_jumps = {
|
||||
JUMP_INIT(finish, _IO_new_file_finish),
|
||||
JUMP_INIT(overflow, _IO_new_file_overflow),
|
||||
JUMP_INIT(underflow, _IO_new_file_underflow),
|
||||
JUMP_INIT(uflow, _IO_default_uflow),
|
||||
JUMP_INIT(pbackfail, _IO_default_pbackfail),
|
||||
JUMP_INIT(uflow, INTUSE(_IO_default_uflow)),
|
||||
JUMP_INIT(pbackfail, INTUSE(_IO_default_pbackfail)),
|
||||
JUMP_INIT(xsputn, _IO_new_file_xsputn),
|
||||
JUMP_INIT(xsgetn, _IO_default_xsgetn),
|
||||
JUMP_INIT(xsgetn, INTUSE(_IO_default_xsgetn)),
|
||||
JUMP_INIT(seekoff, _IO_new_file_seekoff),
|
||||
JUMP_INIT(seekpos, _IO_default_seekpos),
|
||||
JUMP_INIT(setbuf, _IO_new_file_setbuf),
|
||||
JUMP_INIT(sync, _IO_new_file_sync),
|
||||
JUMP_INIT(doallocate, _IO_file_doallocate),
|
||||
JUMP_INIT(read, _IO_file_read),
|
||||
JUMP_INIT(doallocate, INTUSE(_IO_file_doallocate)),
|
||||
JUMP_INIT(read, INTUSE(_IO_file_read)),
|
||||
JUMP_INIT(write, _IO_new_file_write),
|
||||
JUMP_INIT(seek, _IO_file_seek),
|
||||
JUMP_INIT(seek, INTUSE(_IO_file_seek)),
|
||||
JUMP_INIT(close, _IO_new_proc_close),
|
||||
JUMP_INIT(stat, _IO_file_stat),
|
||||
JUMP_INIT(stat, INTUSE(_IO_file_stat)),
|
||||
JUMP_INIT(showmanyc, _IO_default_showmanyc),
|
||||
JUMP_INIT(imbue, _IO_default_imbue)
|
||||
};
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1993, 1997, 1998, 1999, 2001 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1993,1997,1998,1999,2001,2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -56,7 +56,8 @@ _IO_seekoff (fp, offset, dir, mode)
|
||||
_IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
|
||||
_IO_flockfile (fp);
|
||||
|
||||
if (mode != 0 && _IO_have_backup (fp))
|
||||
if (mode != 0 && ((_IO_fwide (fp, 0) < 0 && _IO_have_backup (fp))
|
||||
|| (_IO_fwide (fp, 0) > 0 && _IO_have_wbackup (fp))))
|
||||
{
|
||||
if (dir == _IO_seek_cur && _IO_in_backup (fp))
|
||||
{
|
||||
@ -65,7 +66,10 @@ _IO_seekoff (fp, offset, dir, mode)
|
||||
else
|
||||
abort ();
|
||||
}
|
||||
_IO_free_backup_area (fp);
|
||||
if (_IO_fwide (fp, 0) < 0)
|
||||
INTUSE(_IO_free_backup_area) (fp);
|
||||
else
|
||||
INTUSE(_IO_free_wbackup_area) (fp);
|
||||
}
|
||||
|
||||
retval = _IO_SEEKOFF (fp, offset, dir, mode);
|
||||
@ -74,3 +78,4 @@ _IO_seekoff (fp, offset, dir, mode)
|
||||
_IO_cleanup_region_end (0);
|
||||
return retval;
|
||||
}
|
||||
INTDEF(_IO_seekoff)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1993, 1997, 1998, 1999 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1993, 1997, 1998, 1999, 2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -41,11 +41,21 @@ _IO_seekpos (fp, pos, mode)
|
||||
_IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
|
||||
_IO_flockfile (fp);
|
||||
|
||||
if (_IO_have_backup (fp))
|
||||
_IO_free_backup_area (fp);
|
||||
if (_IO_fwide (fp, 0) <= 0)
|
||||
{
|
||||
if (_IO_have_backup (fp))
|
||||
INTUSE(_IO_free_backup_area) (fp);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_IO_have_wbackup (fp))
|
||||
INTUSE(_IO_free_wbackup_area) (fp);
|
||||
}
|
||||
|
||||
retval = _IO_SEEKPOS (fp, pos, mode);
|
||||
|
||||
_IO_funlockfile (fp);
|
||||
_IO_cleanup_region_end (0);
|
||||
return retval;
|
||||
}
|
||||
INTDEF(_IO_seekpos)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1993, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1993,95,96,97,98,99,2000,2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -46,6 +46,7 @@ _IO_setbuffer (fp, buf, size)
|
||||
_IO_funlockfile (fp);
|
||||
_IO_cleanup_region_end (0);
|
||||
}
|
||||
INTDEF(_IO_setbuffer)
|
||||
|
||||
#ifdef weak_alias
|
||||
weak_alias (_IO_setbuffer, setbuffer)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1993,96,97,98,99,2000,2001 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1993,96,97,98,99,2000,2001,2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -104,6 +104,7 @@ unlock_return:
|
||||
_IO_cleanup_region_end (0);
|
||||
return result;
|
||||
}
|
||||
INTDEF(_IO_setvbuf)
|
||||
|
||||
#ifdef weak_alias
|
||||
weak_alias (_IO_setvbuf, setvbuf)
|
||||
|
@ -1,52 +0,0 @@
|
||||
/* Copyright (C) 1993, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
As a special exception, if you link the code in this file with
|
||||
files compiled with a GNU compiler to produce an executable,
|
||||
that does not cause the resulting executable to be covered by
|
||||
the GNU Lesser General Public License. This exception does not
|
||||
however invalidate any other reasons why the executable file
|
||||
might be covered by the GNU Lesser General Public License.
|
||||
This exception applies to code released by its copyright holders
|
||||
in files containing the exception. */
|
||||
|
||||
#include "libioP.h"
|
||||
|
||||
#ifdef __STDC__
|
||||
#include <stdarg.h>
|
||||
#else
|
||||
#include <varargs.h>
|
||||
#endif
|
||||
|
||||
int
|
||||
#ifdef __STDC__
|
||||
_IO_sprintf (char *string, const char* format, ...)
|
||||
#else
|
||||
_IO_sprintf (string, format, va_alist)
|
||||
char *string;
|
||||
char *format;
|
||||
va_dcl
|
||||
#endif
|
||||
{
|
||||
int ret;
|
||||
va_list args;
|
||||
_IO_va_start (args, format);
|
||||
ret = _IO_vsprintf (string, format, args);
|
||||
va_end (args);
|
||||
return ret;
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1993, 1996, 1997, 1998 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1993,1996,1997,1998,2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -38,7 +38,7 @@ _IO_ungetc (c, fp)
|
||||
return EOF;
|
||||
_IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
|
||||
_IO_flockfile (fp);
|
||||
result = _IO_sputbackc (fp, (unsigned char) c);
|
||||
result = INTUSE(_IO_sputbackc) (fp, (unsigned char) c);
|
||||
_IO_funlockfile (fp);
|
||||
_IO_cleanup_region_end (0);
|
||||
return result;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1993, 1996-1999, 2001 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1993, 1996-1999, 2001, 2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -41,7 +41,7 @@ ungetwc (c, fp)
|
||||
if (c == WEOF)
|
||||
result = WEOF;
|
||||
else
|
||||
result = _IO_sputbackwc (fp, c);
|
||||
result = INTUSE(_IO_sputbackwc) (fp, c);
|
||||
_IO_funlockfile (fp);
|
||||
_IO_cleanup_region_end (0);
|
||||
return result;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1995, 1997-2000, 2001 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1995, 1997-2000, 2001, 2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -42,15 +42,15 @@ _IO_vdprintf (d, format, arg)
|
||||
#ifdef _IO_MTSAFE_IO
|
||||
tmpfil.file._lock = NULL;
|
||||
#endif
|
||||
_IO_no_init (&tmpfil.file, _IO_USER_LOCK, 0, &wd, &_IO_wfile_jumps);
|
||||
_IO_JUMPS (&tmpfil) = &_IO_file_jumps;
|
||||
_IO_file_init (&tmpfil);
|
||||
_IO_no_init (&tmpfil.file, _IO_USER_LOCK, 0, &wd, &INTUSE(_IO_wfile_jumps));
|
||||
_IO_JUMPS (&tmpfil) = &INTUSE(_IO_file_jumps);
|
||||
INTUSE(_IO_file_init) (&tmpfil);
|
||||
#if !_IO_UNIFIED_JUMPTABLES
|
||||
tmpfil.vtable = NULL;
|
||||
#endif
|
||||
if (_IO_file_attach (&tmpfil.file, d) == NULL)
|
||||
if (INTUSE(_IO_file_attach) (&tmpfil.file, d) == NULL)
|
||||
{
|
||||
_IO_un_link (&tmpfil);
|
||||
INTUSE(_IO_un_link) (&tmpfil);
|
||||
return EOF;
|
||||
}
|
||||
tmpfil.file._IO_file_flags =
|
||||
@ -58,7 +58,7 @@ _IO_vdprintf (d, format, arg)
|
||||
_IO_NO_READS+_IO_NO_WRITES+_IO_IS_APPENDING)
|
||||
| _IO_DELETE_DONT_CLOSE);
|
||||
|
||||
done = _IO_vfprintf (&tmpfil.file, format, arg);
|
||||
done = INTUSE(_IO_vfprintf) (&tmpfil.file, format, arg);
|
||||
|
||||
_IO_FINISH (&tmpfil.file);
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1993, 1997-2000, 2001 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1993, 1997-2000, 2001, 2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -42,11 +42,12 @@ _IO_vsprintf (string, format, args)
|
||||
#endif
|
||||
_IO_no_init (&sf._sbf._f, _IO_USER_LOCK, -1, NULL, NULL);
|
||||
_IO_JUMPS ((struct _IO_FILE_plus *) &sf._sbf) = &_IO_str_jumps;
|
||||
_IO_str_init_static (&sf, string, -1, string);
|
||||
ret = _IO_vfprintf ((_IO_FILE *) &sf._sbf, format, args);
|
||||
INTUSE(_IO_str_init_static) (&sf, string, -1, string);
|
||||
ret = INTUSE(_IO_vfprintf) ((_IO_FILE *) &sf._sbf, format, args);
|
||||
_IO_putc_unlocked ('\0', (_IO_FILE *) &sf._sbf);
|
||||
return ret;
|
||||
}
|
||||
INTDEF(_IO_vsprintf)
|
||||
|
||||
#ifdef weak_alias
|
||||
weak_alias (_IO_vsprintf, vsprintf)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1993, 1997-2000, 2001 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1993, 1997-2000, 2001, 2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -41,8 +41,8 @@ _IO_vsscanf (string, format, args)
|
||||
#endif
|
||||
_IO_no_init (&sf._sbf._f, _IO_USER_LOCK, -1, NULL, NULL);
|
||||
_IO_JUMPS ((struct _IO_FILE_plus *) &sf._sbf) = &_IO_str_jumps;
|
||||
_IO_str_init_static (&sf, (char*)string, 0, NULL);
|
||||
ret = _IO_vfscanf ((_IO_FILE *) &sf._sbf, format, args, NULL);
|
||||
INTUSE(_IO_str_init_static) (&sf, (char*)string, 0, NULL);
|
||||
ret = INTUSE(_IO_vfscanf) ((_IO_FILE *) &sf._sbf, format, args, NULL);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
129
libio/libioP.h
129
libio/libioP.h
@ -37,6 +37,18 @@
|
||||
|
||||
#include "iolibio.h"
|
||||
|
||||
/* Control of exported symbols. Used in glibc. By default we don't
|
||||
do anything. */
|
||||
#ifndef INTUSE
|
||||
# define INTUSE(name) name
|
||||
#endif
|
||||
#ifndef INTDEF
|
||||
# define INTDEF(name)
|
||||
#endif
|
||||
#ifndef INTDEF2
|
||||
# define INTDEF2(name)
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@ -445,15 +457,15 @@ extern int _IO_old_fsetpos64 __P ((_IO_FILE *, const _IO_fpos64_t *));
|
||||
#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
|
||||
# define _IO_do_flush(_f) \
|
||||
((_f)->_mode <= 0 \
|
||||
? _IO_do_write(_f, (_f)->_IO_write_base, \
|
||||
(_f)->_IO_write_ptr-(_f)->_IO_write_base) \
|
||||
: _IO_wdo_write(_f, (_f)->_wide_data->_IO_write_base, \
|
||||
((_f)->_wide_data->_IO_write_ptr \
|
||||
- (_f)->_wide_data->_IO_write_base)))
|
||||
? INTUSE(_IO_do_write)(_f, (_f)->_IO_write_base, \
|
||||
(_f)->_IO_write_ptr-(_f)->_IO_write_base) \
|
||||
: INTUSE(_IO_wdo_write)(_f, (_f)->_wide_data->_IO_write_base, \
|
||||
((_f)->_wide_data->_IO_write_ptr \
|
||||
- (_f)->_wide_data->_IO_write_base)))
|
||||
#else
|
||||
# define _IO_do_flush(_f) \
|
||||
_IO_do_write(_f, (_f)->_IO_write_base, \
|
||||
(_f)->_IO_write_ptr-(_f)->_IO_write_base)
|
||||
INTUSE(_IO_do_write)(_f, (_f)->_IO_write_base, \
|
||||
(_f)->_IO_write_ptr-(_f)->_IO_write_base)
|
||||
#endif
|
||||
#define _IO_old_do_flush(_f) \
|
||||
_IO_old_do_write(_f, (_f)->_IO_write_base, \
|
||||
@ -610,6 +622,109 @@ extern int _IO_outfloat __P ((double __value, _IO_FILE *__sb, int __type,
|
||||
extern struct _IO_FILE_plus *_IO_list_all;
|
||||
extern void (*_IO_cleanup_registration_needed) __PMT ((void));
|
||||
|
||||
/* Prototype for functions with alternative entry point. */
|
||||
extern int _IO_flush_all_internal __P ((void));
|
||||
extern unsigned _IO_adjust_column_internal __P ((unsigned, const char *, int));
|
||||
|
||||
extern int _IO_default_uflow_internal __P ((_IO_FILE *));
|
||||
extern void _IO_default_finish_internal __P ((_IO_FILE *, int));
|
||||
extern int _IO_default_pbackfail_internal __P ((_IO_FILE *, int));
|
||||
extern _IO_size_t _IO_default_xsputn_internal __P ((_IO_FILE *, const void *,
|
||||
_IO_size_t));
|
||||
extern _IO_size_t _IO_default_xsgetn_internal __P ((_IO_FILE *, void *,
|
||||
_IO_size_t));
|
||||
extern int _IO_default_doallocate_internal __P ((_IO_FILE *));
|
||||
extern void _IO_wdefault_finish_internal __P ((_IO_FILE *, int));
|
||||
extern wint_t _IO_wdefault_pbackfail_internal __P ((_IO_FILE *, wint_t));
|
||||
extern _IO_size_t _IO_wdefault_xsputn_internal __P ((_IO_FILE *, const void *,
|
||||
_IO_size_t));
|
||||
extern _IO_size_t _IO_wdefault_xsgetn_internal __P ((_IO_FILE *, void *,
|
||||
_IO_size_t));
|
||||
extern _IO_FILE* _IO_wdefault_setbuf_internal __P ((_IO_FILE *, wchar_t *,
|
||||
_IO_ssize_t));
|
||||
extern int _IO_wdefault_doallocate_internal __P ((_IO_FILE *));
|
||||
extern wint_t _IO_wdefault_uflow_internal __P ((_IO_FILE *));
|
||||
|
||||
extern int _IO_file_doallocate_internal __P ((_IO_FILE *));
|
||||
extern _IO_FILE* _IO_file_setbuf_internal __P ((_IO_FILE *, char *,
|
||||
_IO_ssize_t));
|
||||
extern _IO_off64_t _IO_file_seekoff_internal __P ((_IO_FILE *, _IO_off64_t,
|
||||
int, int));
|
||||
extern _IO_size_t _IO_file_xsputn_internal __P ((_IO_FILE *, const void *,
|
||||
_IO_size_t));
|
||||
extern _IO_size_t _IO_file_xsgetn_internal __P ((_IO_FILE *, void *,
|
||||
_IO_size_t));
|
||||
extern int _IO_file_stat_internal __P ((_IO_FILE *, void *));
|
||||
extern int _IO_file_close_internal __P ((_IO_FILE *));
|
||||
extern int _IO_file_close_it_internal __P ((_IO_FILE *));
|
||||
extern int _IO_file_underflow_internal __P ((_IO_FILE *));
|
||||
extern int _IO_file_overflow_internal __P ((_IO_FILE *, int));
|
||||
extern void _IO_file_init_internal __P ((struct _IO_FILE_plus *));
|
||||
extern _IO_FILE* _IO_file_attach_internal __P ((_IO_FILE *, int));
|
||||
extern _IO_FILE* _IO_file_fopen_internal __P ((_IO_FILE *, const char *,
|
||||
const char *, int));
|
||||
extern _IO_ssize_t _IO_file_read_internal __P ((_IO_FILE *, void *,
|
||||
_IO_ssize_t));
|
||||
extern int _IO_file_sync_internal __P ((_IO_FILE *));
|
||||
extern _IO_off64_t _IO_file_seek_internal __P ((_IO_FILE *, _IO_off64_t, int));
|
||||
extern void _IO_file_finish_internal __P ((_IO_FILE *, int));
|
||||
|
||||
extern _IO_size_t _IO_wfile_xsputn_internal __P ((_IO_FILE *, const void *,
|
||||
_IO_size_t));
|
||||
extern _IO_off64_t _IO_wfile_seekoff_internal __P ((_IO_FILE *, _IO_off64_t,
|
||||
int, int));
|
||||
extern wint_t _IO_wfile_sync_internal __P ((_IO_FILE *));
|
||||
|
||||
extern int _IO_str_underflow_internal __P ((_IO_FILE *));
|
||||
extern int _IO_str_overflow_internal __P ((_IO_FILE *, int));
|
||||
extern int _IO_str_pbackfail_internal __P ((_IO_FILE *, int));
|
||||
extern _IO_off64_t _IO_str_seekoff_internal __P ((_IO_FILE *, _IO_off64_t,
|
||||
int, int));
|
||||
extern void _IO_str_init_static_internal __P ((struct _IO_strfile_ *, char *,
|
||||
int, char *));
|
||||
|
||||
extern struct _IO_jump_t _IO_file_jumps_internal;
|
||||
extern struct _IO_jump_t _IO_wfile_jumps_internal;
|
||||
|
||||
extern struct _IO_FILE_plus *_IO_list_all_internal;
|
||||
|
||||
extern void _IO_link_in_internal __P ((struct _IO_FILE_plus *));
|
||||
extern int _IO_sputbackc_internal __P ((_IO_FILE *, int));
|
||||
extern void _IO_wdoallocbuf_internal __P ((_IO_FILE *));
|
||||
|
||||
extern _IO_size_t _IO_sgetn_internal (_IO_FILE *, void *, _IO_size_t);
|
||||
extern void _IO_flush_all_linebuffered_internal __P ((void));
|
||||
extern int _IO_switch_to_wget_mode_internal __P ((_IO_FILE *));
|
||||
extern void _IO_unsave_markers_internal __P ((_IO_FILE *));
|
||||
extern void _IO_switch_to_main_wget_area_internal __P ((_IO_FILE *));
|
||||
extern int _IO_wdo_write_internal __P ((_IO_FILE *, const wchar_t *,
|
||||
_IO_size_t));
|
||||
extern int _IO_do_write_internal __P ((_IO_FILE *, const char *, _IO_size_t));
|
||||
extern _IO_ssize_t _IO_padn_internal (_IO_FILE *, int, _IO_ssize_t);
|
||||
extern _IO_size_t _IO_getline_info_internal __P ((_IO_FILE *,char *,
|
||||
_IO_size_t, int, int,
|
||||
int *));
|
||||
extern _IO_size_t _IO_getline_internal __P ((_IO_FILE *, char *, _IO_size_t,
|
||||
int, int));
|
||||
extern void _IO_free_wbackup_area_internal (_IO_FILE *);
|
||||
extern void _IO_free_backup_area_internal (_IO_FILE *);
|
||||
extern void _IO_switch_to_wbackup_area_internal __P ((_IO_FILE *));
|
||||
extern void _IO_setb_internal __P ((_IO_FILE *, char *, char *, int));
|
||||
extern wint_t _IO_sputbackwc_internal __P ((_IO_FILE *, wint_t));
|
||||
extern int _IO_switch_to_get_mode_internal __P ((_IO_FILE *));
|
||||
extern int _IO_vfscanf_internal (_IO_FILE * __restrict,
|
||||
const char * __restrict,
|
||||
_IO_va_list, int *__restrict);
|
||||
extern int _IO_vfprintf_internal (_IO_FILE *__restrict, const char *__restrict,
|
||||
_IO_va_list);
|
||||
extern void _IO_doallocbuf_internal __P ((_IO_FILE *));
|
||||
extern void _IO_wsetb_internal __P ((_IO_FILE *, wchar_t *, wchar_t *, int));
|
||||
extern _IO_off64_t _IO_seekoff_internal (_IO_FILE *, _IO_off64_t, int, int);
|
||||
extern _IO_off64_t _IO_seekpos_internal (_IO_FILE *, _IO_off64_t, int);
|
||||
extern int _IO_putc_internal (int __c, _IO_FILE *__fp);
|
||||
extern void _IO_init_internal __P ((_IO_FILE *, int));
|
||||
extern void _IO_un_link_internal __P ((struct _IO_FILE_plus *));
|
||||
|
||||
#ifndef EOF
|
||||
# define EOF (-1)
|
||||
#endif
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1995, 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1995,1996,1997,1999,2000,2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -40,17 +40,17 @@ static struct _IO_jump_t _IO_mem_jumps =
|
||||
{
|
||||
JUMP_INIT_DUMMY,
|
||||
JUMP_INIT (finish, _IO_mem_finish),
|
||||
JUMP_INIT (overflow, _IO_str_overflow),
|
||||
JUMP_INIT (underflow, _IO_str_underflow),
|
||||
JUMP_INIT (uflow, _IO_default_uflow),
|
||||
JUMP_INIT (pbackfail, _IO_str_pbackfail),
|
||||
JUMP_INIT (xsputn, _IO_default_xsputn),
|
||||
JUMP_INIT (xsgetn, _IO_default_xsgetn),
|
||||
JUMP_INIT (seekoff, _IO_str_seekoff),
|
||||
JUMP_INIT (overflow, INTUSE(_IO_str_overflow)),
|
||||
JUMP_INIT (underflow, INTUSE(_IO_str_underflow)),
|
||||
JUMP_INIT (uflow, INTUSE(_IO_default_uflow)),
|
||||
JUMP_INIT (pbackfail, INTUSE(_IO_str_pbackfail)),
|
||||
JUMP_INIT (xsputn, INTUSE(_IO_default_xsputn)),
|
||||
JUMP_INIT (xsgetn, INTUSE(_IO_default_xsgetn)),
|
||||
JUMP_INIT (seekoff, INTUSE(_IO_str_seekoff)),
|
||||
JUMP_INIT (seekpos, _IO_default_seekpos),
|
||||
JUMP_INIT (setbuf, _IO_default_setbuf),
|
||||
JUMP_INIT (sync, _IO_mem_sync),
|
||||
JUMP_INIT (doallocate, _IO_default_doallocate),
|
||||
JUMP_INIT (doallocate, INTUSE(_IO_default_doallocate)),
|
||||
JUMP_INIT (read, _IO_default_read),
|
||||
JUMP_INIT (write, _IO_default_write),
|
||||
JUMP_INIT (seek, _IO_default_seek),
|
||||
@ -66,15 +66,15 @@ static struct _IO_jump_t _IO_wmem_jumps =
|
||||
JUMP_INIT (finish, (_IO_finish_t) _IO_wmem_finish),
|
||||
JUMP_INIT (overflow, (_IO_overflow_t) _IO_wstr_overflow),
|
||||
JUMP_INIT (underflow, (_IO_underflow_t) _IO_wstr_underflow),
|
||||
JUMP_INIT (uflow, (_IO_underflow_t) _IO_wdefault_uflow),
|
||||
JUMP_INIT (uflow, (_IO_underflow_t) INTUSE(_IO_wdefault_uflow)),
|
||||
JUMP_INIT (pbackfail, (_IO_pbackfail_t) _IO_wstr_pbackfail),
|
||||
JUMP_INIT (xsputn, (_IO_xsputn_t) _IO_wdefault_xsputn),
|
||||
JUMP_INIT (xsgetn, (_IO_xsgetn_t) _IO_wdefault_xsgetn),
|
||||
JUMP_INIT (xsputn, (_IO_xsputn_t) INTUSE(_IO_wdefault_xsputn)),
|
||||
JUMP_INIT (xsgetn, (_IO_xsgetn_t) INTUSE(_IO_wdefault_xsgetn)),
|
||||
JUMP_INIT (seekoff, _IO_wstr_seekoff),
|
||||
JUMP_INIT (seekpos, _IO_default_seekpos),
|
||||
JUMP_INIT (setbuf, (_IO_setbuf_t) _IO_wdefault_setbuf),
|
||||
JUMP_INIT (setbuf, (_IO_setbuf_t) INTUSE(_IO_wdefault_setbuf)),
|
||||
JUMP_INIT (sync, (_IO_sync_t) _IO_wmem_sync),
|
||||
JUMP_INIT (doallocate, _IO_wdefault_doallocate),
|
||||
JUMP_INIT (doallocate, INTUSE(_IO_wdefault_doallocate)),
|
||||
JUMP_INIT (read, _IO_default_read),
|
||||
JUMP_INIT (write, _IO_default_write),
|
||||
JUMP_INIT (seek, _IO_default_seek),
|
||||
@ -114,7 +114,7 @@ open_memstream (bufloc, sizeloc)
|
||||
return NULL;
|
||||
_IO_no_init (&new_f->fp._sf._sbf._f, 0, 0, &new_f->wd, &_IO_wmem_jumps);
|
||||
_IO_JUMPS ((struct _IO_FILE_plus *) &new_f->fp._sf._sbf) = &_IO_mem_jumps;
|
||||
_IO_str_init_static (&new_f->fp._sf, buf, _IO_BUFSIZ, buf);
|
||||
INTUSE(_IO_str_init_static) (&new_f->fp._sf, buf, _IO_BUFSIZ, buf);
|
||||
new_f->fp._sf._sbf._f._flags &= ~_IO_USER_BUF;
|
||||
new_f->fp._sf._s._allocate_buffer = (_IO_alloc_type) malloc;
|
||||
new_f->fp._sf._s._free_buffer = (_IO_free_type) free;
|
||||
@ -139,7 +139,7 @@ _IO_mem_sync (fp)
|
||||
|
||||
if (fp->_IO_write_ptr == fp->_IO_write_end)
|
||||
{
|
||||
_IO_str_overflow (fp, '\0');
|
||||
INTUSE(_IO_str_overflow) (fp, '\0');
|
||||
--fp->_IO_write_ptr;
|
||||
}
|
||||
else
|
||||
@ -169,7 +169,7 @@ _IO_mem_finish (fp, dummy)
|
||||
|
||||
fp->_IO_buf_base = NULL;
|
||||
|
||||
_IO_default_finish (fp, 0);
|
||||
INTUSE(_IO_default_finish) (fp, 0);
|
||||
}
|
||||
|
||||
|
||||
@ -221,5 +221,5 @@ _IO_wmem_finish (fp, dummy)
|
||||
|
||||
fp->_wide_data->_IO_buf_base = NULL;
|
||||
|
||||
_IO_default_finish (fp, 0);
|
||||
INTUSE(_IO_default_finish) (fp, 0);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Print output of stream to given obstack.
|
||||
Copyright (C) 1996, 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996,1997,1999,2000,2001,2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
|
||||
|
||||
@ -153,9 +153,9 @@ _IO_obstack_vprintf (struct obstack *obstack, const char *format, va_list args)
|
||||
assert (size != 0);
|
||||
}
|
||||
|
||||
_IO_str_init_static ((struct _IO_strfile_ *) &new_f.ofile,
|
||||
obstack_base (obstack),
|
||||
size, obstack_next_free (obstack));
|
||||
INTUSE(_IO_str_init_static) ((struct _IO_strfile_ *) &new_f.ofile,
|
||||
obstack_base (obstack),
|
||||
size, obstack_next_free (obstack));
|
||||
/* Now allocate the rest of the current chunk. */
|
||||
assert (size == (new_f.ofile.file.file._IO_write_end
|
||||
- new_f.ofile.file.file._IO_write_base));
|
||||
@ -166,7 +166,7 @@ _IO_obstack_vprintf (struct obstack *obstack, const char *format, va_list args)
|
||||
|
||||
new_f.ofile.obstack = obstack;
|
||||
|
||||
result = _IO_vfprintf (&new_f.ofile.file.file, format, args);
|
||||
result = INTUSE(_IO_vfprintf) (&new_f.ofile.file.file, format, args);
|
||||
|
||||
/* Shrink the buffer to the space we really currently need. */
|
||||
obstack_blank_fast (obstack, (new_f.ofile.file.file._IO_write_ptr
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1993,95,97,98,99,2000 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1993,95,97,98,99,2000,2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Written by Per Bothner <bothner@cygnus.com>.
|
||||
|
||||
@ -124,7 +124,7 @@ _IO_old_file_init (fp)
|
||||
fp->file._old_offset = _IO_pos_BAD;
|
||||
fp->file._IO_file_flags |= CLOSED_FILEBUF_FLAGS;
|
||||
|
||||
_IO_link_in (fp);
|
||||
INTUSE(_IO_link_in) (fp);
|
||||
fp->file._vtable_offset = ((int) sizeof (struct _IO_FILE)
|
||||
- (int) sizeof (struct _IO_FILE_complete));
|
||||
fp->file._fileno = -1;
|
||||
@ -140,16 +140,16 @@ _IO_old_file_close_it (fp)
|
||||
|
||||
write_status = _IO_old_do_flush (fp);
|
||||
|
||||
_IO_unsave_markers(fp);
|
||||
INTUSE(_IO_unsave_markers) (fp);
|
||||
|
||||
close_status = _IO_SYSCLOSE (fp);
|
||||
|
||||
/* Free buffer. */
|
||||
_IO_setb (fp, NULL, NULL, 0);
|
||||
INTUSE(_IO_setb) (fp, NULL, NULL, 0);
|
||||
_IO_setg (fp, NULL, NULL, NULL);
|
||||
_IO_setp (fp, NULL, NULL);
|
||||
|
||||
_IO_un_link ((struct _IO_FILE_plus *) fp);
|
||||
INTUSE(_IO_un_link) ((struct _IO_FILE_plus *) fp);
|
||||
fp->_flags = _IO_MAGIC|CLOSED_FILEBUF_FLAGS;
|
||||
fp->_fileno = -1;
|
||||
fp->_old_offset = _IO_pos_BAD;
|
||||
@ -168,7 +168,7 @@ _IO_old_file_finish (fp, dummy)
|
||||
if (!(fp->_flags & _IO_DELETE_DONT_CLOSE))
|
||||
_IO_SYSCLOSE (fp);
|
||||
}
|
||||
_IO_default_finish (fp, 0);
|
||||
INTUSE(_IO_default_finish) (fp, 0);
|
||||
}
|
||||
|
||||
_IO_FILE *
|
||||
@ -216,7 +216,7 @@ _IO_old_file_fopen (fp, filename, mode)
|
||||
if (_IO_SEEKOFF (fp, (_IO_off_t)0, _IO_seek_end, _IOS_INPUT|_IOS_OUTPUT)
|
||||
== _IO_pos_BAD && errno != ESPIPE)
|
||||
return NULL;
|
||||
_IO_link_in ((struct _IO_FILE_plus *) fp);
|
||||
INTUSE(_IO_link_in) ((struct _IO_FILE_plus *) fp);
|
||||
return fp;
|
||||
}
|
||||
|
||||
@ -295,7 +295,8 @@ old_do_write (fp, data, to_do)
|
||||
}
|
||||
count = _IO_SYSWRITE (fp, data, to_do);
|
||||
if (fp->_cur_column && count)
|
||||
fp->_cur_column = _IO_adjust_column (fp->_cur_column - 1, data, count) + 1;
|
||||
fp->_cur_column = INTUSE(_IO_adjust_column) (fp->_cur_column - 1, data,
|
||||
count) + 1;
|
||||
_IO_setg (fp, fp->_IO_buf_base, fp->_IO_buf_base, fp->_IO_buf_base);
|
||||
fp->_IO_write_base = fp->_IO_write_ptr = fp->_IO_buf_base;
|
||||
fp->_IO_write_end = ((fp->_flags & (_IO_LINE_BUF+_IO_UNBUFFERED))
|
||||
@ -331,15 +332,15 @@ _IO_old_file_underflow (fp)
|
||||
free (fp->_IO_save_base);
|
||||
fp->_flags &= ~_IO_IN_BACKUP;
|
||||
}
|
||||
_IO_doallocbuf (fp);
|
||||
INTUSE(_IO_doallocbuf) (fp);
|
||||
}
|
||||
|
||||
/* Flush all line buffered files before reading. */
|
||||
/* FIXME This can/should be moved to genops ?? */
|
||||
if (fp->_flags & (_IO_LINE_BUF|_IO_UNBUFFERED))
|
||||
_IO_flush_all_linebuffered ();
|
||||
INTUSE(_IO_flush_all_linebuffered) ();
|
||||
|
||||
_IO_switch_to_get_mode (fp);
|
||||
INTUSE(_IO_switch_to_get_mode) (fp);
|
||||
|
||||
/* This is very tricky. We have to adjust those
|
||||
pointers before we call _IO_SYSREAD () since
|
||||
@ -384,7 +385,7 @@ _IO_old_file_overflow (f, ch)
|
||||
/* Allocate a buffer if needed. */
|
||||
if (f->_IO_write_base == 0)
|
||||
{
|
||||
_IO_doallocbuf (f);
|
||||
INTUSE(_IO_doallocbuf) (f);
|
||||
_IO_setg (f, f->_IO_buf_base, f->_IO_buf_base, f->_IO_buf_base);
|
||||
}
|
||||
/* Otherwise must be currently reading.
|
||||
@ -479,7 +480,7 @@ _IO_old_file_seekoff (fp, offset, dir, mode)
|
||||
FIXME: simulate mem-papped files. */
|
||||
|
||||
if (fp->_IO_write_ptr > fp->_IO_write_base || _IO_in_put_mode (fp))
|
||||
if (_IO_switch_to_get_mode (fp))
|
||||
if (INTUSE(_IO_switch_to_get_mode) (fp))
|
||||
return EOF;
|
||||
|
||||
if (fp->_IO_buf_base == NULL)
|
||||
@ -490,7 +491,7 @@ _IO_old_file_seekoff (fp, offset, dir, mode)
|
||||
free (fp->_IO_read_base);
|
||||
fp->_flags &= ~_IO_IN_BACKUP;
|
||||
}
|
||||
_IO_doallocbuf (fp);
|
||||
INTUSE(_IO_doallocbuf) (fp);
|
||||
_IO_setp (fp, fp->_IO_buf_base, fp->_IO_buf_base);
|
||||
_IO_setg (fp, fp->_IO_buf_base, fp->_IO_buf_base, fp->_IO_buf_base);
|
||||
}
|
||||
@ -576,7 +577,7 @@ _IO_old_file_seekoff (fp, offset, dir, mode)
|
||||
}
|
||||
|
||||
#ifdef TODO
|
||||
_IO_unsave_markers (fp);
|
||||
INTUSE(_IO_unsave_markers) (fp);
|
||||
#endif
|
||||
|
||||
if (fp->_flags & _IO_NO_READS)
|
||||
@ -616,7 +617,7 @@ _IO_old_file_seekoff (fp, offset, dir, mode)
|
||||
return offset;
|
||||
dumb:
|
||||
|
||||
_IO_unsave_markers (fp);
|
||||
INTUSE(_IO_unsave_markers) (fp);
|
||||
result = _IO_SYSSEEK (fp, offset, dir);
|
||||
if (result != EOF)
|
||||
{
|
||||
@ -747,7 +748,7 @@ _IO_old_file_xsputn (f, data, n)
|
||||
buffer, but it's somewhat messier for line-buffered files,
|
||||
so we let _IO_default_xsputn handle the general case. */
|
||||
if (to_do)
|
||||
to_do -= _IO_default_xsputn (f, s+do_write, to_do);
|
||||
to_do -= INTUSE(_IO_default_xsputn) (f, s+do_write, to_do);
|
||||
}
|
||||
return n - to_do;
|
||||
}
|
||||
@ -759,20 +760,20 @@ struct _IO_jump_t _IO_old_file_jumps =
|
||||
JUMP_INIT(finish, _IO_old_file_finish),
|
||||
JUMP_INIT(overflow, _IO_old_file_overflow),
|
||||
JUMP_INIT(underflow, _IO_old_file_underflow),
|
||||
JUMP_INIT(uflow, _IO_default_uflow),
|
||||
JUMP_INIT(pbackfail, _IO_default_pbackfail),
|
||||
JUMP_INIT(uflow, INTUSE(_IO_default_uflow)),
|
||||
JUMP_INIT(pbackfail, INTUSE(_IO_default_pbackfail)),
|
||||
JUMP_INIT(xsputn, _IO_old_file_xsputn),
|
||||
JUMP_INIT(xsgetn, _IO_default_xsgetn),
|
||||
JUMP_INIT(xsgetn, INTUSE(_IO_default_xsgetn)),
|
||||
JUMP_INIT(seekoff, _IO_old_file_seekoff),
|
||||
JUMP_INIT(seekpos, _IO_default_seekpos),
|
||||
JUMP_INIT(setbuf, _IO_old_file_setbuf),
|
||||
JUMP_INIT(sync, _IO_old_file_sync),
|
||||
JUMP_INIT(doallocate, _IO_file_doallocate),
|
||||
JUMP_INIT(read, _IO_file_read),
|
||||
JUMP_INIT(doallocate, INTUSE(_IO_file_doallocate)),
|
||||
JUMP_INIT(read, INTUSE(_IO_file_read)),
|
||||
JUMP_INIT(write, _IO_old_file_write),
|
||||
JUMP_INIT(seek, _IO_file_seek),
|
||||
JUMP_INIT(close, _IO_file_close),
|
||||
JUMP_INIT(stat, _IO_file_stat)
|
||||
JUMP_INIT(seek, INTUSE(_IO_file_seek)),
|
||||
JUMP_INIT(close, INTUSE(_IO_file_close)),
|
||||
JUMP_INIT(stat, INTUSE(_IO_file_stat))
|
||||
};
|
||||
|
||||
compat_symbol (libc, _IO_old_do_write, _IO_do_write, GLIBC_2_0);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1993, 1995, 1997-2000, 2001 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1993, 1995, 1997-2001, 2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -50,7 +50,7 @@ _IO_old_fclose (fp)
|
||||
|
||||
/* First unlink the stream. */
|
||||
if (fp->_IO_file_flags & _IO_IS_FILEBUF)
|
||||
_IO_un_link ((struct _IO_FILE_plus *) fp);
|
||||
INTUSE(_IO_un_link) ((struct _IO_FILE_plus *) fp);
|
||||
|
||||
_IO_cleanup_region_start ((void (*) (void *)) _IO_funlockfile, fp);
|
||||
_IO_flockfile (fp);
|
||||
@ -62,7 +62,7 @@ _IO_old_fclose (fp)
|
||||
_IO_funlockfile (fp);
|
||||
_IO_cleanup_region_end (0);
|
||||
if (_IO_have_backup (fp))
|
||||
_IO_free_backup_area (fp);
|
||||
INTUSE(_IO_free_backup_area) (fp);
|
||||
if (fp != _IO_stdin && fp != _IO_stdout && fp != _IO_stderr)
|
||||
{
|
||||
fp->_IO_file_flags = 0;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1993,94,97,99,2000 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1993,94,97,99,2000,2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -114,7 +114,7 @@ _IO_old_fdopen (fd, mode)
|
||||
#ifdef _IO_MTSAFE_IO
|
||||
new_f->fp.file._lock = &new_f->lock;
|
||||
#endif
|
||||
_IO_init (&new_f->fp.file, 0);
|
||||
INTUSE(_IO_init) (&new_f->fp.file, 0);
|
||||
_IO_JUMPS (&new_f->fp) = &_IO_old_file_jumps;
|
||||
_IO_old_file_init (&new_f->fp);
|
||||
#if !_IO_UNIFIED_JUMPTABLES
|
||||
@ -122,7 +122,7 @@ _IO_old_fdopen (fd, mode)
|
||||
#endif
|
||||
if (_IO_old_file_attach (&new_f->fp.file, fd) == NULL)
|
||||
{
|
||||
_IO_un_link (&new_f->fp);
|
||||
INTUSE(_IO_un_link) (&new_f->fp);
|
||||
free (new_f);
|
||||
return NULL;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1993,95,96,97,98,99,2000 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1993,95,96,97,98,99,2000, 2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -40,7 +40,7 @@ _IO_old_fgetpos (fp, posp)
|
||||
CHECK_FILE (fp, EOF);
|
||||
_IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
|
||||
_IO_flockfile (fp);
|
||||
pos = _IO_seekoff (fp, 0, _IO_seek_cur, 0);
|
||||
pos = INTUSE(_IO_seekoff) (fp, 0, _IO_seek_cur, 0);
|
||||
if (_IO_in_backup (fp))
|
||||
pos -= fp->_IO_save_end - fp->_IO_save_base;
|
||||
_IO_funlockfile (fp);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1993,95,96,97,98,99,2000 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1993,95,96,97,98,99,2000, 2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -41,7 +41,7 @@ _IO_old_fgetpos64 (fp, posp)
|
||||
CHECK_FILE (fp, EOF);
|
||||
_IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
|
||||
_IO_flockfile (fp);
|
||||
pos = _IO_seekoff (fp, 0, _IO_seek_cur, 0);
|
||||
pos = INTUSE(_IO_seekoff) (fp, 0, _IO_seek_cur, 0);
|
||||
if (_IO_in_backup (fp))
|
||||
pos -= fp->_IO_save_end - fp->_IO_save_base;
|
||||
_IO_funlockfile (fp);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1993, 1997, 1999, 2000 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1993, 1997, 1999, 2000, 2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -53,7 +53,7 @@ _IO_old_fopen (filename, mode)
|
||||
#ifdef _IO_MTSAFE_IO
|
||||
new_f->fp.file._lock = &new_f->lock;
|
||||
#endif
|
||||
_IO_init (&new_f->fp.file, 0);
|
||||
INTUSE(_IO_init) (&new_f->fp.file, 0);
|
||||
_IO_JUMPS (&new_f->fp) = &_IO_old_file_jumps;
|
||||
_IO_old_file_init (&new_f->fp);
|
||||
#if !_IO_UNIFIED_JUMPTABLES
|
||||
@ -61,7 +61,7 @@ _IO_old_fopen (filename, mode)
|
||||
#endif
|
||||
if (_IO_old_file_fopen ((_IO_FILE *) &new_f->fp, filename, mode) != NULL)
|
||||
return (_IO_FILE *) &new_f->fp;
|
||||
_IO_un_link (&new_f->fp);
|
||||
INTUSE(_IO_un_link) (&new_f->fp);
|
||||
free (new_f);
|
||||
return NULL;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1993,95,97,98,99,2000 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1993,95,97,98,99,2000,2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -39,7 +39,8 @@ _IO_old_fsetpos (fp, posp)
|
||||
CHECK_FILE (fp, EOF);
|
||||
_IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
|
||||
_IO_flockfile (fp);
|
||||
if (_IO_seekpos (fp, posp->__pos, _IOS_INPUT|_IOS_OUTPUT) == _IO_pos_BAD)
|
||||
if (INTUSE(_IO_seekpos) (fp, posp->__pos, _IOS_INPUT|_IOS_OUTPUT)
|
||||
== _IO_pos_BAD)
|
||||
{
|
||||
/* ANSI explicitly requires setting errno to a positive value on
|
||||
failure. */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1993,95,97,98,99,2000 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1993,95,97,98,99,2000,2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -41,7 +41,8 @@ _IO_old_fsetpos64 (fp, posp)
|
||||
CHECK_FILE (fp, EOF);
|
||||
_IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
|
||||
_IO_flockfile (fp);
|
||||
if (_IO_seekpos (fp, posp->__pos, _IOS_INPUT|_IOS_OUTPUT) == _IO_pos_BAD)
|
||||
if (INTUSE(_IO_seekpos) (fp, posp->__pos, _IOS_INPUT|_IOS_OUTPUT)
|
||||
== _IO_pos_BAD)
|
||||
{
|
||||
/* ANSI explicitly requires setting errno to a positive value on
|
||||
failure. */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Written by Per Bothner <bothner@cygnus.com>.
|
||||
|
||||
@ -222,7 +222,7 @@ _IO_old_popen (command, mode)
|
||||
new_f->fpx.file.file._lock = &new_f->lock;
|
||||
#endif
|
||||
fp = &new_f->fpx.file.file;
|
||||
_IO_init (fp, 0);
|
||||
INTUSE(_IO_init) (fp, 0);
|
||||
_IO_JUMPS (&new_f->fpx.file) = &_IO_old_proc_jumps;
|
||||
_IO_old_file_init (&new_f->fpx.file);
|
||||
#if !_IO_UNIFIED_JUMPTABLES
|
||||
@ -230,7 +230,7 @@ _IO_old_popen (command, mode)
|
||||
#endif
|
||||
if (_IO_old_proc_open (fp, command, mode) != NULL)
|
||||
return fp;
|
||||
_IO_un_link (&new_f->fpx.file);
|
||||
INTUSE(_IO_un_link) (&new_f->fpx.file);
|
||||
free (new_f);
|
||||
return NULL;
|
||||
}
|
||||
@ -289,20 +289,20 @@ struct _IO_jump_t _IO_old_proc_jumps = {
|
||||
JUMP_INIT(finish, _IO_old_file_finish),
|
||||
JUMP_INIT(overflow, _IO_old_file_overflow),
|
||||
JUMP_INIT(underflow, _IO_old_file_underflow),
|
||||
JUMP_INIT(uflow, _IO_default_uflow),
|
||||
JUMP_INIT(pbackfail, _IO_default_pbackfail),
|
||||
JUMP_INIT(uflow, INTUSE(_IO_default_uflow)),
|
||||
JUMP_INIT(pbackfail, INTUSE(_IO_default_pbackfail)),
|
||||
JUMP_INIT(xsputn, _IO_old_file_xsputn),
|
||||
JUMP_INIT(xsgetn, _IO_default_xsgetn),
|
||||
JUMP_INIT(xsgetn, INTUSE(_IO_default_xsgetn)),
|
||||
JUMP_INIT(seekoff, _IO_old_file_seekoff),
|
||||
JUMP_INIT(seekpos, _IO_default_seekpos),
|
||||
JUMP_INIT(setbuf, _IO_old_file_setbuf),
|
||||
JUMP_INIT(sync, _IO_old_file_sync),
|
||||
JUMP_INIT(doallocate, _IO_file_doallocate),
|
||||
JUMP_INIT(read, _IO_file_read),
|
||||
JUMP_INIT(doallocate, INTUSE(_IO_file_doallocate)),
|
||||
JUMP_INIT(read, INTUSE(_IO_file_read)),
|
||||
JUMP_INIT(write, _IO_old_file_write),
|
||||
JUMP_INIT(seek, _IO_file_seek),
|
||||
JUMP_INIT(seek, INTUSE(_IO_file_seek)),
|
||||
JUMP_INIT(close, _IO_old_proc_close),
|
||||
JUMP_INIT(stat, _IO_file_stat),
|
||||
JUMP_INIT(stat, INTUSE(_IO_file_stat)),
|
||||
JUMP_INIT(showmanyc, _IO_default_showmanyc),
|
||||
JUMP_INIT(imbue, _IO_default_imbue)
|
||||
};
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1993,94,96,97,99,2000 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1993,94,96,97,99,2000,2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -68,8 +68,6 @@ extern FILE *stdin;
|
||||
extern FILE *stdout;
|
||||
extern FILE *stderr;
|
||||
|
||||
extern struct _IO_FILE_plus *_IO_list_all;
|
||||
|
||||
static void _IO_check_libio __P ((void)) __attribute__ ((constructor));
|
||||
|
||||
/* This function determines which shared C library the application
|
||||
@ -85,7 +83,7 @@ _IO_check_libio ()
|
||||
_IO_stdin = stdin = (_IO_FILE *) &_IO_stdin_;
|
||||
_IO_stdout = stdout = (_IO_FILE *) &_IO_stdout_;
|
||||
_IO_stderr = stderr = (_IO_FILE *) &_IO_stderr_;
|
||||
_IO_list_all = &_IO_stderr_;
|
||||
INTUSE(_IO_list_all) = &_IO_stderr_;
|
||||
_IO_stdin->_vtable_offset = _IO_stdout->_vtable_offset =
|
||||
_IO_stderr->_vtable_offset = stdin->_vtable_offset =
|
||||
stdout->_vtable_offset = stderr->_vtable_offset =
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1991, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991,1995,1996,1997,1998,2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -35,6 +35,7 @@ _IO_putc (c, fp)
|
||||
_IO_cleanup_region_end (0);
|
||||
return result;
|
||||
}
|
||||
INTDEF(_IO_putc)
|
||||
|
||||
#undef putc
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1993, 1997 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1993, 1997, 2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -33,5 +33,5 @@ setbuf (fp, buf)
|
||||
_IO_FILE *fp;
|
||||
char *buf;
|
||||
{
|
||||
_IO_setbuffer (fp, buf, _IO_BUFSIZ);
|
||||
INTUSE(_IO_setbuffer) (fp, buf, _IO_BUFSIZ);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1993, 1997 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1993, 1997, 2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -34,5 +34,5 @@ void
|
||||
setlinebuf (stream)
|
||||
_IO_FILE *stream;
|
||||
{
|
||||
_IO_setvbuf (stream, NULL, 1, 0);
|
||||
INTUSE(_IO_setvbuf) (stream, NULL, 1, 0);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1993, 1994, 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1993-1997,1999,2000,2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -39,30 +39,30 @@
|
||||
# define DEF_STDFILE(NAME, FD, CHAIN, FLAGS) \
|
||||
static _IO_lock_t _IO_stdfile_##FD##_lock = _IO_lock_initializer; \
|
||||
static struct _IO_wide_data _IO_wide_data_##FD \
|
||||
= { ._wide_vtable = &_IO_wfile_jumps }; \
|
||||
= { ._wide_vtable = &INTUSE(_IO_wfile_jumps) }; \
|
||||
struct _IO_FILE_plus NAME \
|
||||
= {FILEBUF_LITERAL(CHAIN, FLAGS, FD, &_IO_wide_data_##FD), \
|
||||
&_IO_file_jumps};
|
||||
&INTUSE(_IO_file_jumps)};
|
||||
# else
|
||||
# define DEF_STDFILE(NAME, FD, CHAIN, FLAGS) \
|
||||
static _IO_lock_t _IO_stdfile_##FD##_lock = _IO_lock_initializer; \
|
||||
struct _IO_FILE_plus NAME \
|
||||
= {FILEBUF_LITERAL(CHAIN, FLAGS, FD, NULL), \
|
||||
&_IO_file_jumps};
|
||||
&INTUSE(_IO_file_jumps)};
|
||||
# endif
|
||||
#else
|
||||
# if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
|
||||
# define DEF_STDFILE(NAME, FD, CHAIN, FLAGS) \
|
||||
static struct _IO_wide_data _IO_wide_data_##FD \
|
||||
= { ._wide_vtable = &_IO_wfile_jumps }; \
|
||||
= { ._wide_vtable = &INTUSE(_IO_wfile_jumps) }; \
|
||||
struct _IO_FILE_plus NAME \
|
||||
= {FILEBUF_LITERAL(CHAIN, FLAGS, FD, &_IO_wide_data_##FD), \
|
||||
&_IO_file_jumps};
|
||||
&INTUSE(_IO_file_jumps)};
|
||||
# else
|
||||
# define DEF_STDFILE(NAME, FD, CHAIN, FLAGS) \
|
||||
struct _IO_FILE_plus NAME \
|
||||
= {FILEBUF_LITERAL(CHAIN, FLAGS, FD, NULL), \
|
||||
&_IO_file_jumps};
|
||||
&INTUSE(_IO_file_jumps)};
|
||||
# endif
|
||||
#endif
|
||||
|
||||
@ -71,3 +71,4 @@ DEF_STDFILE(_IO_2_1_stdout_, 1, &_IO_2_1_stdin_, _IO_NO_READS);
|
||||
DEF_STDFILE(_IO_2_1_stderr_, 2, &_IO_2_1_stdout_, _IO_NO_READS+_IO_UNBUFFERED);
|
||||
|
||||
struct _IO_FILE_plus *_IO_list_all = &_IO_2_1_stderr_;
|
||||
INTDEF(_IO_list_all)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1993, 1994, 1996, 1997, 2000 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1993,1994,1996,1997,2000,2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1993, 1997-2000, 2001 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1993, 1997-2000, 2001, 2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -89,7 +89,7 @@ _IO_str_init_static (sf, ptr, size, pstart)
|
||||
size += s;
|
||||
}
|
||||
}
|
||||
_IO_setb (fp, ptr, ptr + size, 0);
|
||||
INTUSE(_IO_setb) (fp, ptr, ptr + size, 0);
|
||||
|
||||
fp->_IO_write_base = ptr;
|
||||
fp->_IO_read_base = ptr;
|
||||
@ -109,6 +109,7 @@ _IO_str_init_static (sf, ptr, size, pstart)
|
||||
/* A null _allocate_buffer function flags the strfile as being static. */
|
||||
sf->_s._allocate_buffer = (_IO_alloc_type) 0;
|
||||
}
|
||||
INTDEF(_IO_str_init_static)
|
||||
|
||||
void
|
||||
_IO_str_init_readonly (sf, ptr, size)
|
||||
@ -116,7 +117,7 @@ _IO_str_init_readonly (sf, ptr, size)
|
||||
const char *ptr;
|
||||
int size;
|
||||
{
|
||||
_IO_str_init_static (sf, (char *) ptr, size, NULL);
|
||||
INTUSE(_IO_str_init_static) (sf, (char *) ptr, size, NULL);
|
||||
sf->_sbf._f._IO_file_flags |= _IO_NO_WRITES;
|
||||
}
|
||||
|
||||
@ -163,7 +164,7 @@ _IO_str_overflow (fp, c)
|
||||
if (lenp == &LEN(fp)) /* use '\0'-filling */
|
||||
memset (new_buf + pos, 0, blen() - pos);
|
||||
#endif
|
||||
_IO_setb (fp, new_buf, new_buf + new_size, 1);
|
||||
INTUSE(_IO_setb) (fp, new_buf, new_buf + new_size, 1);
|
||||
fp->_IO_read_base = new_buf + (fp->_IO_read_base - old_buf);
|
||||
fp->_IO_read_ptr = new_buf + (fp->_IO_read_ptr - old_buf);
|
||||
fp->_IO_read_end = new_buf + (fp->_IO_read_end - old_buf);
|
||||
@ -180,6 +181,7 @@ _IO_str_overflow (fp, c)
|
||||
fp->_IO_read_end = fp->_IO_write_ptr;
|
||||
return c;
|
||||
}
|
||||
INTDEF(_IO_str_overflow)
|
||||
|
||||
int
|
||||
_IO_str_underflow (fp)
|
||||
@ -198,6 +200,7 @@ _IO_str_underflow (fp)
|
||||
else
|
||||
return EOF;
|
||||
}
|
||||
INTDEF(_IO_str_underflow)
|
||||
|
||||
/* The size of the valid part of the buffer. */
|
||||
|
||||
@ -279,6 +282,7 @@ _IO_str_seekoff (fp, offset, dir, mode)
|
||||
}
|
||||
return new_pos;
|
||||
}
|
||||
INTDEF(_IO_str_seekoff)
|
||||
|
||||
int
|
||||
_IO_str_pbackfail (fp, c)
|
||||
@ -287,8 +291,9 @@ _IO_str_pbackfail (fp, c)
|
||||
{
|
||||
if ((fp->_flags & _IO_NO_WRITES) && c != EOF)
|
||||
return EOF;
|
||||
return _IO_default_pbackfail (fp, c);
|
||||
return INTUSE(_IO_default_pbackfail) (fp, c);
|
||||
}
|
||||
INTDEF(_IO_str_pbackfail)
|
||||
|
||||
void
|
||||
_IO_str_finish (fp, dummy)
|
||||
@ -299,24 +304,24 @@ _IO_str_finish (fp, dummy)
|
||||
(((_IO_strfile *) fp)->_s._free_buffer) (fp->_IO_buf_base);
|
||||
fp->_IO_buf_base = NULL;
|
||||
|
||||
_IO_default_finish (fp, 0);
|
||||
INTUSE(_IO_default_finish) (fp, 0);
|
||||
}
|
||||
|
||||
struct _IO_jump_t _IO_str_jumps =
|
||||
{
|
||||
JUMP_INIT_DUMMY,
|
||||
JUMP_INIT(finish, _IO_str_finish),
|
||||
JUMP_INIT(overflow, _IO_str_overflow),
|
||||
JUMP_INIT(underflow, _IO_str_underflow),
|
||||
JUMP_INIT(uflow, _IO_default_uflow),
|
||||
JUMP_INIT(pbackfail, _IO_str_pbackfail),
|
||||
JUMP_INIT(xsputn, _IO_default_xsputn),
|
||||
JUMP_INIT(xsgetn, _IO_default_xsgetn),
|
||||
JUMP_INIT(seekoff, _IO_str_seekoff),
|
||||
JUMP_INIT(overflow, INTUSE(_IO_str_overflow)),
|
||||
JUMP_INIT(underflow, INTUSE(_IO_str_underflow)),
|
||||
JUMP_INIT(uflow, INTUSE(_IO_default_uflow)),
|
||||
JUMP_INIT(pbackfail, INTUSE(_IO_str_pbackfail)),
|
||||
JUMP_INIT(xsputn, INTUSE(_IO_default_xsputn)),
|
||||
JUMP_INIT(xsgetn, INTUSE(_IO_default_xsgetn)),
|
||||
JUMP_INIT(seekoff, INTUSE(_IO_str_seekoff)),
|
||||
JUMP_INIT(seekpos, _IO_default_seekpos),
|
||||
JUMP_INIT(setbuf, _IO_default_setbuf),
|
||||
JUMP_INIT(sync, _IO_default_sync),
|
||||
JUMP_INIT(doallocate, _IO_default_doallocate),
|
||||
JUMP_INIT(doallocate, INTUSE(_IO_default_doallocate)),
|
||||
JUMP_INIT(read, _IO_default_read),
|
||||
JUMP_INIT(write, _IO_default_write),
|
||||
JUMP_INIT(seek, _IO_default_seek),
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1995, 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1995,1997,1999,2000,2001,2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -54,11 +54,11 @@ _IO_vasprintf (result_ptr, format, args)
|
||||
#endif
|
||||
_IO_no_init ((_IO_FILE *) &sf._sbf, _IO_USER_LOCK, -1, NULL, NULL);
|
||||
_IO_JUMPS ((struct _IO_FILE_plus *) &sf._sbf) = &_IO_str_jumps;
|
||||
_IO_str_init_static (&sf, string, init_string_size, string);
|
||||
INTUSE(_IO_str_init_static) (&sf, string, init_string_size, string);
|
||||
sf._sbf._f._flags &= ~_IO_USER_BUF;
|
||||
sf._s._allocate_buffer = (_IO_alloc_type) malloc;
|
||||
sf._s._free_buffer = (_IO_free_type) free;
|
||||
ret = _IO_vfprintf (&sf._sbf._f, format, args);
|
||||
ret = INTUSE(_IO_vfprintf) (&sf._sbf._f, format, args);
|
||||
if (ret < 0)
|
||||
{
|
||||
free (sf._sbf._f._IO_buf_base);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1993, 1997 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1993, 1997, 2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -35,7 +35,7 @@ _IO_vscanf (format, args)
|
||||
const char *format;
|
||||
_IO_va_list args;
|
||||
{
|
||||
return _IO_vfscanf (_IO_stdin, format, args, NULL);
|
||||
return INTUSE(_IO_vfscanf) (_IO_stdin, format, args, NULL);
|
||||
}
|
||||
|
||||
#ifdef weak_alias
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1994, 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1994,1997,1999,2000,2001,2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -59,8 +59,8 @@ _IO_strn_overflow (fp, c)
|
||||
a size to make this possible. */
|
||||
*fp->_IO_write_ptr = '\0';
|
||||
|
||||
_IO_setb (fp, snf->overflow_buf,
|
||||
snf->overflow_buf + sizeof (snf->overflow_buf), 0);
|
||||
INTUSE(_IO_setb) (fp, snf->overflow_buf,
|
||||
snf->overflow_buf + sizeof (snf->overflow_buf), 0);
|
||||
|
||||
fp->_IO_write_base = snf->overflow_buf;
|
||||
fp->_IO_read_base = snf->overflow_buf;
|
||||
@ -82,16 +82,16 @@ static struct _IO_jump_t _IO_strn_jumps =
|
||||
JUMP_INIT_DUMMY,
|
||||
JUMP_INIT(finish, _IO_str_finish),
|
||||
JUMP_INIT(overflow, _IO_strn_overflow),
|
||||
JUMP_INIT(underflow, _IO_str_underflow),
|
||||
JUMP_INIT(uflow, _IO_default_uflow),
|
||||
JUMP_INIT(pbackfail, _IO_str_pbackfail),
|
||||
JUMP_INIT(xsputn, _IO_default_xsputn),
|
||||
JUMP_INIT(xsgetn, _IO_default_xsgetn),
|
||||
JUMP_INIT(seekoff, _IO_str_seekoff),
|
||||
JUMP_INIT(underflow, INTUSE(_IO_str_underflow)),
|
||||
JUMP_INIT(uflow, INTUSE(_IO_default_uflow)),
|
||||
JUMP_INIT(pbackfail, INTUSE(_IO_str_pbackfail)),
|
||||
JUMP_INIT(xsputn, INTUSE(_IO_default_xsputn)),
|
||||
JUMP_INIT(xsgetn, INTUSE(_IO_default_xsgetn)),
|
||||
JUMP_INIT(seekoff, INTUSE(_IO_str_seekoff)),
|
||||
JUMP_INIT(seekpos, _IO_default_seekpos),
|
||||
JUMP_INIT(setbuf, _IO_default_setbuf),
|
||||
JUMP_INIT(sync, _IO_default_sync),
|
||||
JUMP_INIT(doallocate, _IO_default_doallocate),
|
||||
JUMP_INIT(doallocate, INTUSE(_IO_default_doallocate)),
|
||||
JUMP_INIT(read, _IO_default_read),
|
||||
JUMP_INIT(write, _IO_default_write),
|
||||
JUMP_INIT(seek, _IO_default_seek),
|
||||
@ -126,8 +126,8 @@ _IO_vsnprintf (string, maxlen, format, args)
|
||||
_IO_no_init (&sf.f._sbf._f, _IO_USER_LOCK, -1, NULL, NULL);
|
||||
_IO_JUMPS ((struct _IO_FILE_plus *) &sf.f._sbf) = &_IO_strn_jumps;
|
||||
string[0] = '\0';
|
||||
_IO_str_init_static (&sf.f, string, maxlen - 1, string);
|
||||
ret = _IO_vfprintf ((_IO_FILE *) &sf.f._sbf, format, args);
|
||||
INTUSE(_IO_str_init_static) (&sf.f, string, maxlen - 1, string);
|
||||
ret = INTUSE(_IO_vfprintf) ((_IO_FILE *) &sf.f._sbf, format, args);
|
||||
|
||||
if (sf.f._sbf._f._IO_buf_base != sf.overflow_buf)
|
||||
*sf.f._sbf._f._IO_write_ptr = '\0';
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1994, 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1994,1997,1999,2000,2001,2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -54,9 +54,9 @@ _IO_wstrn_overflow (fp, c)
|
||||
|
||||
if (fp->_wide_data->_IO_buf_base != snf->overflow_buf)
|
||||
{
|
||||
_IO_wsetb (fp, snf->overflow_buf,
|
||||
snf->overflow_buf + (sizeof (snf->overflow_buf)
|
||||
/ sizeof (wchar_t)), 0);
|
||||
INTUSE(_IO_wsetb) (fp, snf->overflow_buf,
|
||||
snf->overflow_buf + (sizeof (snf->overflow_buf)
|
||||
/ sizeof (wchar_t)), 0);
|
||||
|
||||
fp->_wide_data->_IO_write_base = snf->overflow_buf;
|
||||
fp->_wide_data->_IO_read_base = snf->overflow_buf;
|
||||
@ -81,15 +81,15 @@ static struct _IO_jump_t _IO_wstrn_jumps =
|
||||
JUMP_INIT(finish, _IO_wstr_finish),
|
||||
JUMP_INIT(overflow, (_IO_overflow_t) _IO_wstrn_overflow),
|
||||
JUMP_INIT(underflow, (_IO_underflow_t) _IO_wstr_underflow),
|
||||
JUMP_INIT(uflow, (_IO_underflow_t) _IO_wdefault_uflow),
|
||||
JUMP_INIT(uflow, (_IO_underflow_t) INTUSE(_IO_wdefault_uflow)),
|
||||
JUMP_INIT(pbackfail, (_IO_pbackfail_t) _IO_wstr_pbackfail),
|
||||
JUMP_INIT(xsputn, _IO_wdefault_xsputn),
|
||||
JUMP_INIT(xsgetn, _IO_wdefault_xsgetn),
|
||||
JUMP_INIT(xsputn, INTUSE(_IO_wdefault_xsputn)),
|
||||
JUMP_INIT(xsgetn, INTUSE(_IO_wdefault_xsgetn)),
|
||||
JUMP_INIT(seekoff, _IO_wstr_seekoff),
|
||||
JUMP_INIT(seekpos, _IO_default_seekpos),
|
||||
JUMP_INIT(setbuf, (_IO_setbuf_t) _IO_wdefault_setbuf),
|
||||
JUMP_INIT(setbuf, (_IO_setbuf_t) INTUSE(_IO_wdefault_setbuf)),
|
||||
JUMP_INIT(sync, _IO_default_sync),
|
||||
JUMP_INIT(doallocate, _IO_wdefault_doallocate),
|
||||
JUMP_INIT(doallocate, INTUSE(_IO_wdefault_doallocate)),
|
||||
JUMP_INIT(read, _IO_default_read),
|
||||
JUMP_INIT(write, _IO_default_write),
|
||||
JUMP_INIT(seek, _IO_default_seek),
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1993, 1997, 1999, 2000 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1993, 1997, 1999, 2000, 2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -79,7 +79,7 @@ _IO_wfile_doallocate (fp)
|
||||
|
||||
/* Allocate room for the external buffer. */
|
||||
if (fp->_IO_buf_base == NULL)
|
||||
_IO_file_doallocate (fp);
|
||||
INTUSE(_IO_file_doallocate) (fp);
|
||||
|
||||
if (fp->_fileno < 0 || _IO_SYSSTAT (fp, &st) < 0)
|
||||
{
|
||||
@ -100,7 +100,7 @@ _IO_wfile_doallocate (fp)
|
||||
#endif
|
||||
}
|
||||
ALLOC_WBUF (p, size * sizeof (wchar_t), EOF);
|
||||
_IO_wsetb (fp, p, p + size, 1);
|
||||
INTUSE(_IO_wsetb) (fp, p, p + size, 1);
|
||||
if (couldbetty && isatty (fp->_fileno))
|
||||
fp->_flags |= _IO_LINE_BUF;
|
||||
return 1;
|
||||
|
@ -58,7 +58,7 @@ _IO_wfile_setbuf (fp, p, len)
|
||||
wchar_t *p;
|
||||
_IO_ssize_t len;
|
||||
{
|
||||
if (_IO_wdefault_setbuf (fp, p, len) == NULL)
|
||||
if (INTUSE(_IO_wdefault_setbuf) (fp, p, len) == NULL)
|
||||
return NULL;
|
||||
|
||||
fp->_wide_data->_IO_write_base = fp->_wide_data->_IO_write_ptr =
|
||||
@ -131,6 +131,7 @@ _IO_wdo_write (fp, data, to_do)
|
||||
|
||||
return to_do == 0 ? 0 : WEOF;
|
||||
}
|
||||
INTDEF(_IO_wdo_write)
|
||||
|
||||
|
||||
wint_t
|
||||
@ -202,7 +203,7 @@ _IO_wfile_underflow (fp)
|
||||
free (fp->_IO_save_base);
|
||||
fp->_flags &= ~_IO_IN_BACKUP;
|
||||
}
|
||||
_IO_doallocbuf (fp);
|
||||
INTUSE(_IO_doallocbuf) (fp);
|
||||
|
||||
fp->_IO_read_base = fp->_IO_read_ptr = fp->_IO_read_end =
|
||||
fp->_IO_buf_base;
|
||||
@ -219,7 +220,7 @@ _IO_wfile_underflow (fp)
|
||||
free (fp->_wide_data->_IO_save_base);
|
||||
fp->_flags &= ~_IO_IN_BACKUP;
|
||||
}
|
||||
_IO_wdoallocbuf (fp);
|
||||
INTUSE(_IO_wdoallocbuf) (fp);
|
||||
}
|
||||
|
||||
/* Flush all line buffered files before reading. */
|
||||
@ -227,7 +228,7 @@ _IO_wfile_underflow (fp)
|
||||
if (fp->_flags & (_IO_LINE_BUF|_IO_UNBUFFERED))
|
||||
{
|
||||
#if 0
|
||||
_IO_flush_all_linebuffered ();
|
||||
INTUSE(_IO_flush_all_linebuffered) ();
|
||||
#else
|
||||
/* We used to flush all line-buffered stream. This really isn't
|
||||
required by any standard. My recollection is that
|
||||
@ -247,7 +248,7 @@ _IO_wfile_underflow (fp)
|
||||
#endif
|
||||
}
|
||||
|
||||
_IO_switch_to_get_mode (fp);
|
||||
INTUSE(_IO_switch_to_get_mode) (fp);
|
||||
|
||||
fp->_wide_data->_IO_read_base = fp->_wide_data->_IO_read_ptr =
|
||||
fp->_wide_data->_IO_buf_base;
|
||||
@ -306,6 +307,7 @@ _IO_wfile_underflow (fp)
|
||||
|
||||
return *fp->_wide_data->_IO_read_ptr;
|
||||
}
|
||||
INTDEF(_IO_wfile_underflow)
|
||||
|
||||
|
||||
static wint_t
|
||||
@ -347,7 +349,7 @@ _IO_wfile_underflow_mmap (_IO_FILE *fp)
|
||||
free (fp->_wide_data->_IO_save_base);
|
||||
fp->_flags &= ~_IO_IN_BACKUP;
|
||||
}
|
||||
_IO_wdoallocbuf (fp);
|
||||
INTUSE(_IO_wdoallocbuf) (fp);
|
||||
}
|
||||
|
||||
fp->_wide_data->_IO_last_state = fp->_wide_data->_IO_state;
|
||||
@ -390,13 +392,13 @@ _IO_wfile_overflow (f, wch)
|
||||
/* Allocate a buffer if needed. */
|
||||
if (f->_wide_data->_IO_write_base == 0)
|
||||
{
|
||||
_IO_wdoallocbuf (f);
|
||||
INTUSE(_IO_wdoallocbuf) (f);
|
||||
_IO_wsetg (f, f->_wide_data->_IO_buf_base,
|
||||
f->_wide_data->_IO_buf_base, f->_wide_data->_IO_buf_base);
|
||||
|
||||
if (f->_IO_write_base == NULL)
|
||||
{
|
||||
_IO_doallocbuf (f);
|
||||
INTUSE(_IO_doallocbuf) (f);
|
||||
_IO_setg (f, f->_IO_buf_base, f->_IO_buf_base, f->_IO_buf_base);
|
||||
}
|
||||
}
|
||||
@ -445,6 +447,7 @@ _IO_wfile_overflow (f, wch)
|
||||
return WEOF;
|
||||
return wch;
|
||||
}
|
||||
INTDEF(_IO_wfile_overflow)
|
||||
|
||||
wint_t
|
||||
_IO_wfile_sync (fp)
|
||||
@ -506,6 +509,7 @@ _IO_wfile_sync (fp)
|
||||
/* setg(base(), ptr, ptr); */
|
||||
return retval;
|
||||
}
|
||||
INTDEF(_IO_wfile_sync)
|
||||
|
||||
_IO_off64_t
|
||||
_IO_wfile_seekoff (fp, offset, dir, mode)
|
||||
@ -542,7 +546,7 @@ _IO_wfile_seekoff (fp, offset, dir, mode)
|
||||
|
||||
/* There is no more data in the backup buffer. We can
|
||||
switch back. */
|
||||
_IO_switch_to_main_wget_area (fp);
|
||||
INTUSE(_IO_switch_to_main_wget_area) (fp);
|
||||
}
|
||||
|
||||
dir = _IO_seek_cur, offset = 0; /* Don't move any pointers. */
|
||||
@ -558,7 +562,7 @@ _IO_wfile_seekoff (fp, offset, dir, mode)
|
||||
|
||||
if (fp->_wide_data->_IO_write_ptr > fp->_wide_data->_IO_write_base
|
||||
|| _IO_in_put_mode (fp))
|
||||
if (_IO_switch_to_wget_mode (fp))
|
||||
if (INTUSE(_IO_switch_to_wget_mode) (fp))
|
||||
return WEOF;
|
||||
|
||||
if (fp->_wide_data->_IO_buf_base == NULL)
|
||||
@ -569,7 +573,7 @@ _IO_wfile_seekoff (fp, offset, dir, mode)
|
||||
free (fp->_wide_data->_IO_read_base);
|
||||
fp->_flags &= ~_IO_IN_BACKUP;
|
||||
}
|
||||
_IO_doallocbuf (fp);
|
||||
INTUSE(_IO_doallocbuf) (fp);
|
||||
_IO_setp (fp, fp->_IO_buf_base, fp->_IO_buf_base);
|
||||
_IO_setg (fp, fp->_IO_buf_base, fp->_IO_buf_base, fp->_IO_buf_base);
|
||||
_IO_wsetp (fp, fp->_wide_data->_IO_buf_base,
|
||||
@ -692,7 +696,7 @@ _IO_wfile_seekoff (fp, offset, dir, mode)
|
||||
}
|
||||
|
||||
#ifdef TODO
|
||||
_IO_unsave_markers (fp);
|
||||
INTUSE(_IO_unsave_markers) (fp);
|
||||
#endif
|
||||
|
||||
if (fp->_flags & _IO_NO_READS)
|
||||
@ -732,7 +736,7 @@ _IO_wfile_seekoff (fp, offset, dir, mode)
|
||||
return offset;
|
||||
dumb:
|
||||
|
||||
_IO_unsave_markers (fp);
|
||||
INTUSE(_IO_unsave_markers) (fp);
|
||||
result = _IO_SYSSEEK (fp, offset, dir);
|
||||
if (result != EOF)
|
||||
{
|
||||
@ -757,6 +761,7 @@ resync:
|
||||
|
||||
return offset;
|
||||
}
|
||||
INTDEF(_IO_wfile_seekoff)
|
||||
|
||||
|
||||
_IO_size_t
|
||||
@ -822,62 +827,64 @@ _IO_wfile_xsputn (f, data, n)
|
||||
to_do -= count;
|
||||
}
|
||||
if (to_do > 0)
|
||||
to_do -= _IO_wdefault_xsputn (f, s, to_do);
|
||||
to_do -= INTUSE(_IO_wdefault_xsputn) (f, s, to_do);
|
||||
if (must_flush
|
||||
&& f->_wide_data->_IO_write_ptr != f->_wide_data->_IO_write_base)
|
||||
_IO_wdo_write (f, f->_wide_data->_IO_write_base,
|
||||
f->_wide_data->_IO_write_ptr
|
||||
- f->_wide_data->_IO_write_base);
|
||||
INTUSE(_IO_wdo_write) (f, f->_wide_data->_IO_write_base,
|
||||
f->_wide_data->_IO_write_ptr
|
||||
- f->_wide_data->_IO_write_base);
|
||||
|
||||
return n - to_do;
|
||||
}
|
||||
INTDEF(_IO_wfile_xsputn)
|
||||
|
||||
|
||||
struct _IO_jump_t _IO_wfile_jumps =
|
||||
{
|
||||
JUMP_INIT_DUMMY,
|
||||
JUMP_INIT(finish, _IO_new_file_finish),
|
||||
JUMP_INIT(overflow, (_IO_overflow_t) _IO_wfile_overflow),
|
||||
JUMP_INIT(underflow, (_IO_underflow_t) _IO_wfile_underflow),
|
||||
JUMP_INIT(uflow, (_IO_underflow_t) _IO_wdefault_uflow),
|
||||
JUMP_INIT(pbackfail, (_IO_pbackfail_t) _IO_wdefault_pbackfail),
|
||||
JUMP_INIT(xsputn, _IO_wfile_xsputn),
|
||||
JUMP_INIT(xsgetn, _IO_file_xsgetn),
|
||||
JUMP_INIT(seekoff, _IO_wfile_seekoff),
|
||||
JUMP_INIT(overflow, (_IO_overflow_t) INTUSE(_IO_wfile_overflow)),
|
||||
JUMP_INIT(underflow, (_IO_underflow_t) INTUSE(_IO_wfile_underflow)),
|
||||
JUMP_INIT(uflow, (_IO_underflow_t) INTUSE(_IO_wdefault_uflow)),
|
||||
JUMP_INIT(pbackfail, (_IO_pbackfail_t) INTUSE(_IO_wdefault_pbackfail)),
|
||||
JUMP_INIT(xsputn, INTUSE(_IO_wfile_xsputn)),
|
||||
JUMP_INIT(xsgetn, INTUSE(_IO_file_xsgetn)),
|
||||
JUMP_INIT(seekoff, INTUSE(_IO_wfile_seekoff)),
|
||||
JUMP_INIT(seekpos, _IO_default_seekpos),
|
||||
JUMP_INIT(setbuf, _IO_new_file_setbuf),
|
||||
JUMP_INIT(sync, (_IO_sync_t) _IO_wfile_sync),
|
||||
JUMP_INIT(sync, (_IO_sync_t) INTUSE(_IO_wfile_sync)),
|
||||
JUMP_INIT(doallocate, _IO_wfile_doallocate),
|
||||
JUMP_INIT(read, _IO_file_read),
|
||||
JUMP_INIT(read, INTUSE(_IO_file_read)),
|
||||
JUMP_INIT(write, _IO_new_file_write),
|
||||
JUMP_INIT(seek, _IO_file_seek),
|
||||
JUMP_INIT(close, _IO_file_close),
|
||||
JUMP_INIT(stat, _IO_file_stat),
|
||||
JUMP_INIT(seek, INTUSE(_IO_file_seek)),
|
||||
JUMP_INIT(close, INTUSE(_IO_file_close)),
|
||||
JUMP_INIT(stat, INTUSE(_IO_file_stat)),
|
||||
JUMP_INIT(showmanyc, _IO_default_showmanyc),
|
||||
JUMP_INIT(imbue, _IO_default_imbue)
|
||||
};
|
||||
INTDEF(_IO_wfile_jumps)
|
||||
|
||||
|
||||
struct _IO_jump_t _IO_wfile_jumps_mmap =
|
||||
{
|
||||
JUMP_INIT_DUMMY,
|
||||
JUMP_INIT(finish, _IO_new_file_finish),
|
||||
JUMP_INIT(overflow, (_IO_overflow_t) _IO_wfile_overflow),
|
||||
JUMP_INIT(overflow, (_IO_overflow_t) INTUSE(_IO_wfile_overflow)),
|
||||
JUMP_INIT(underflow, (_IO_underflow_t) _IO_wfile_underflow_mmap),
|
||||
JUMP_INIT(uflow, (_IO_underflow_t) _IO_wdefault_uflow),
|
||||
JUMP_INIT(pbackfail, (_IO_pbackfail_t) _IO_wdefault_pbackfail),
|
||||
JUMP_INIT(xsputn, _IO_wfile_xsputn),
|
||||
JUMP_INIT(xsgetn, _IO_file_xsgetn),
|
||||
JUMP_INIT(seekoff, _IO_wfile_seekoff),
|
||||
JUMP_INIT(uflow, (_IO_underflow_t) INTUSE(_IO_wdefault_uflow)),
|
||||
JUMP_INIT(pbackfail, (_IO_pbackfail_t) INTUSE(_IO_wdefault_pbackfail)),
|
||||
JUMP_INIT(xsputn, INTUSE(_IO_wfile_xsputn)),
|
||||
JUMP_INIT(xsgetn, INTUSE(_IO_file_xsgetn)),
|
||||
JUMP_INIT(seekoff, INTUSE(_IO_wfile_seekoff)),
|
||||
JUMP_INIT(seekpos, _IO_default_seekpos),
|
||||
JUMP_INIT(setbuf, _IO_new_file_setbuf),
|
||||
JUMP_INIT(sync, (_IO_sync_t) _IO_wfile_sync),
|
||||
JUMP_INIT(sync, (_IO_sync_t) INTUSE(_IO_wfile_sync)),
|
||||
JUMP_INIT(doallocate, _IO_wfile_doallocate),
|
||||
JUMP_INIT(read, _IO_file_read),
|
||||
JUMP_INIT(read, INTUSE(_IO_file_read)),
|
||||
JUMP_INIT(write, _IO_new_file_write),
|
||||
JUMP_INIT(seek, _IO_file_seek),
|
||||
JUMP_INIT(seek, INTUSE(_IO_file_seek)),
|
||||
JUMP_INIT(close, _IO_file_close_mmap),
|
||||
JUMP_INIT(stat, _IO_file_stat),
|
||||
JUMP_INIT(stat, INTUSE(_IO_file_stat)),
|
||||
JUMP_INIT(showmanyc, _IO_default_showmanyc),
|
||||
JUMP_INIT(imbue, _IO_default_imbue)
|
||||
};
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1993,1995,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1993,1995,1997-2001,2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Written by Ulrich Drepper <drepper@cygnus.com>.
|
||||
Based on the single byte version by Per Bothner <bothner@cygnus.com>.
|
||||
@ -64,6 +64,7 @@ _IO_least_wmarker (fp, end_p)
|
||||
least_so_far = mark->_pos;
|
||||
return least_so_far;
|
||||
}
|
||||
INTDEF(_IO_least_wmarker)
|
||||
|
||||
/* Switch current get area from backup buffer to (start of) main get area. */
|
||||
void
|
||||
@ -83,6 +84,7 @@ _IO_switch_to_main_wget_area (fp)
|
||||
/* Set _IO_read_ptr. */
|
||||
fp->_wide_data->_IO_read_ptr = fp->_wide_data->_IO_read_base;
|
||||
}
|
||||
INTDEF(_IO_switch_to_main_wget_area)
|
||||
|
||||
|
||||
/* Switch current get area from main get area to (end of) backup area. */
|
||||
@ -103,6 +105,7 @@ _IO_switch_to_wbackup_area (fp)
|
||||
/* Set _IO_read_ptr. */
|
||||
fp->_wide_data->_IO_read_ptr = fp->_wide_data->_IO_read_end;
|
||||
}
|
||||
INTDEF(_IO_switch_to_wbackup_area)
|
||||
|
||||
|
||||
void
|
||||
@ -121,6 +124,7 @@ _IO_wsetb (f, b, eb, a)
|
||||
else
|
||||
f->_flags |= _IO_USER_BUF;
|
||||
}
|
||||
INTDEF(_IO_wsetb)
|
||||
|
||||
|
||||
wint_t
|
||||
@ -160,7 +164,7 @@ _IO_wdefault_pbackfail (fp, c)
|
||||
fp->_wide_data->_IO_backup_base = fp->_wide_data->_IO_save_end;
|
||||
}
|
||||
fp->_wide_data->_IO_read_base = fp->_wide_data->_IO_read_ptr;
|
||||
_IO_switch_to_wbackup_area (fp);
|
||||
INTUSE(_IO_switch_to_wbackup_area) (fp);
|
||||
}
|
||||
else if (fp->_wide_data->_IO_read_ptr <= fp->_wide_data->_IO_read_base)
|
||||
{
|
||||
@ -185,6 +189,7 @@ _IO_wdefault_pbackfail (fp, c)
|
||||
}
|
||||
return c;
|
||||
}
|
||||
INTDEF(_IO_wdefault_pbackfail)
|
||||
|
||||
|
||||
void
|
||||
@ -214,8 +219,9 @@ _IO_wdefault_finish (fp, dummy)
|
||||
_IO_lock_fini (*fp->_lock);
|
||||
#endif
|
||||
|
||||
_IO_un_link ((struct _IO_FILE_plus *) fp);
|
||||
INTUSE(_IO_un_link) ((struct _IO_FILE_plus *) fp);
|
||||
}
|
||||
INTDEF(_IO_wdefault_finish)
|
||||
|
||||
|
||||
wint_t
|
||||
@ -228,6 +234,7 @@ _IO_wdefault_uflow (fp)
|
||||
return WEOF;
|
||||
return *fp->_wide_data->_IO_read_ptr++;
|
||||
}
|
||||
INTDEF(_IO_wdefault_uflow)
|
||||
|
||||
|
||||
wint_t
|
||||
@ -251,13 +258,13 @@ __wuflow (fp)
|
||||
if (fp->_mode == 0)
|
||||
_IO_fwide (fp, 1);
|
||||
if (_IO_in_put_mode (fp))
|
||||
if (_IO_switch_to_wget_mode (fp) == EOF)
|
||||
if (INTUSE(_IO_switch_to_wget_mode) (fp) == EOF)
|
||||
return WEOF;
|
||||
if (fp->_wide_data->_IO_read_ptr < fp->_wide_data->_IO_read_end)
|
||||
return *fp->_wide_data->_IO_read_ptr++;
|
||||
if (_IO_in_backup (fp))
|
||||
{
|
||||
_IO_switch_to_main_wget_area (fp);
|
||||
INTUSE(_IO_switch_to_main_wget_area) (fp);
|
||||
if (fp->_wide_data->_IO_read_ptr < fp->_wide_data->_IO_read_end)
|
||||
return *fp->_wide_data->_IO_read_ptr++;
|
||||
}
|
||||
@ -267,7 +274,7 @@ __wuflow (fp)
|
||||
return WEOF;
|
||||
}
|
||||
else if (_IO_have_wbackup (fp))
|
||||
_IO_free_wbackup_area (fp);
|
||||
INTUSE(_IO_free_wbackup_area) (fp);
|
||||
return _IO_UFLOW (fp);
|
||||
}
|
||||
|
||||
@ -282,13 +289,13 @@ __wunderflow (fp)
|
||||
if (fp->_mode == 0)
|
||||
_IO_fwide (fp, 1);
|
||||
if (_IO_in_put_mode (fp))
|
||||
if (_IO_switch_to_wget_mode (fp) == EOF)
|
||||
if (INTUSE(_IO_switch_to_wget_mode) (fp) == EOF)
|
||||
return WEOF;
|
||||
if (fp->_wide_data->_IO_read_ptr < fp->_wide_data->_IO_read_end)
|
||||
return *fp->_wide_data->_IO_read_ptr;
|
||||
if (_IO_in_backup (fp))
|
||||
{
|
||||
_IO_switch_to_main_wget_area (fp);
|
||||
INTUSE(_IO_switch_to_main_wget_area) (fp);
|
||||
if (fp->_wide_data->_IO_read_ptr < fp->_wide_data->_IO_read_end)
|
||||
return *fp->_wide_data->_IO_read_ptr;
|
||||
}
|
||||
@ -298,7 +305,7 @@ __wunderflow (fp)
|
||||
return WEOF;
|
||||
}
|
||||
else if (_IO_have_backup (fp))
|
||||
_IO_free_wbackup_area (fp);
|
||||
INTUSE(_IO_free_wbackup_area) (fp);
|
||||
return _IO_UNDERFLOW (fp);
|
||||
}
|
||||
|
||||
@ -351,6 +358,7 @@ _IO_wdefault_xsputn (f, data, n)
|
||||
}
|
||||
return n - more;
|
||||
}
|
||||
INTDEF(_IO_wdefault_xsputn)
|
||||
|
||||
|
||||
_IO_size_t
|
||||
@ -397,6 +405,7 @@ _IO_wdefault_xsgetn (fp, data, n)
|
||||
}
|
||||
return n - more;
|
||||
}
|
||||
INTDEF(_IO_wdefault_xsgetn)
|
||||
|
||||
|
||||
void
|
||||
@ -408,8 +417,10 @@ _IO_wdoallocbuf (fp)
|
||||
if (!(fp->_flags & _IO_UNBUFFERED))
|
||||
if ((wint_t)_IO_WDOALLOCATE (fp) != WEOF)
|
||||
return;
|
||||
_IO_wsetb (fp, fp->_wide_data->_shortbuf, fp->_wide_data->_shortbuf + 1, 0);
|
||||
INTUSE(_IO_wsetb) (fp, fp->_wide_data->_shortbuf,
|
||||
fp->_wide_data->_shortbuf + 1, 0);
|
||||
}
|
||||
INTDEF(_IO_wdoallocbuf)
|
||||
|
||||
|
||||
_IO_FILE *
|
||||
@ -423,13 +434,13 @@ _IO_wdefault_setbuf (fp, p, len)
|
||||
if (p == NULL || len == 0)
|
||||
{
|
||||
fp->_flags |= _IO_UNBUFFERED;
|
||||
_IO_wsetb (fp, fp->_wide_data->_shortbuf, fp->_wide_data->_shortbuf + 1,
|
||||
0);
|
||||
INTUSE(_IO_wsetb) (fp, fp->_wide_data->_shortbuf,
|
||||
fp->_wide_data->_shortbuf + 1, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
fp->_flags &= ~_IO_UNBUFFERED;
|
||||
_IO_wsetb (fp, p, p + len, 0);
|
||||
INTUSE(_IO_wsetb) (fp, p, p + len, 0);
|
||||
}
|
||||
fp->_wide_data->_IO_write_base = fp->_wide_data->_IO_write_ptr
|
||||
= fp->_wide_data->_IO_write_end = 0;
|
||||
@ -437,6 +448,7 @@ _IO_wdefault_setbuf (fp, p, len)
|
||||
= fp->_wide_data->_IO_read_end = 0;
|
||||
return fp;
|
||||
}
|
||||
INTDEF(_IO_wdefault_setbuf)
|
||||
|
||||
|
||||
int
|
||||
@ -446,9 +458,10 @@ _IO_wdefault_doallocate (fp)
|
||||
wchar_t *buf;
|
||||
|
||||
ALLOC_WBUF (buf, _IO_BUFSIZ, EOF);
|
||||
_IO_wsetb (fp, buf, buf + _IO_BUFSIZ, 1);
|
||||
INTUSE(_IO_wsetb) (fp, buf, buf + _IO_BUFSIZ, 1);
|
||||
return 1;
|
||||
}
|
||||
INTDEF(_IO_wdefault_doallocate)
|
||||
|
||||
|
||||
int
|
||||
@ -474,18 +487,20 @@ _IO_switch_to_wget_mode (fp)
|
||||
fp->_flags &= ~_IO_CURRENTLY_PUTTING;
|
||||
return 0;
|
||||
}
|
||||
INTDEF(_IO_switch_to_wget_mode)
|
||||
|
||||
void
|
||||
_IO_free_wbackup_area (fp)
|
||||
_IO_FILE *fp;
|
||||
{
|
||||
if (_IO_in_backup (fp))
|
||||
_IO_switch_to_main_wget_area (fp); /* Just in case. */
|
||||
INTUSE(_IO_switch_to_main_wget_area) (fp); /* Just in case. */
|
||||
free (fp->_wide_data->_IO_save_base);
|
||||
fp->_wide_data->_IO_save_base = NULL;
|
||||
fp->_wide_data->_IO_save_end = NULL;
|
||||
fp->_wide_data->_IO_backup_base = NULL;
|
||||
}
|
||||
INTDEF(_IO_free_wbackup_area)
|
||||
|
||||
#if 0
|
||||
int
|
||||
@ -517,7 +532,7 @@ save_for_wbackup (fp, end_p)
|
||||
wchar_t *end_p;
|
||||
{
|
||||
/* Append [_IO_read_base..end_p] to backup area. */
|
||||
_IO_ssize_t least_mark = _IO_least_wmarker (fp, end_p);
|
||||
_IO_ssize_t least_mark = INTUSE(_IO_least_wmarker) (fp, end_p);
|
||||
/* needed_size is how much space we need in the backup area. */
|
||||
_IO_size_t needed_size = ((end_p - fp->_wide_data->_IO_read_base)
|
||||
- least_mark);
|
||||
@ -630,6 +645,7 @@ _IO_sputbackwc (fp, c)
|
||||
|
||||
return result;
|
||||
}
|
||||
INTDEF(_IO_sputbackwc)
|
||||
|
||||
wint_t
|
||||
_IO_sungetwc (fp)
|
||||
@ -672,7 +688,7 @@ _IO_init_wmarker (marker, fp)
|
||||
{
|
||||
marker->_sbuf = fp;
|
||||
if (_IO_in_put_mode (fp))
|
||||
_IO_switch_to_wget_mode (fp);
|
||||
INTUSE(_IO_switch_to_wget_mode) (fp);
|
||||
if (_IO_in_backup (fp))
|
||||
marker->_pos = fp->_wide_data->_IO_read_ptr - fp->_wide_data->_IO_read_end;
|
||||
else
|
||||
@ -714,14 +730,14 @@ _IO_seekwmark (fp, mark, delta)
|
||||
if (mark->_pos >= 0)
|
||||
{
|
||||
if (_IO_in_backup (fp))
|
||||
_IO_switch_to_main_wget_area (fp);
|
||||
INTUSE(_IO_switch_to_main_wget_area) (fp);
|
||||
fp->_wide_data->_IO_read_ptr = (fp->_wide_data->_IO_read_base
|
||||
+ mark->_pos);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!_IO_in_backup (fp))
|
||||
_IO_switch_to_wbackup_area (fp);
|
||||
INTUSE(_IO_switch_to_wbackup_area) (fp);
|
||||
fp->_wide_data->_IO_read_ptr = fp->_wide_data->_IO_read_end + mark->_pos;
|
||||
}
|
||||
return 0;
|
||||
@ -752,5 +768,5 @@ _IO_unsave_wmarkers (fp)
|
||||
}
|
||||
|
||||
if (_IO_have_backup (fp))
|
||||
_IO_free_wbackup_area (fp);
|
||||
INTUSE(_IO_free_wbackup_area) (fp);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1993, 1997, 1998, 1999, 2001 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1993,1997,1998,1999,2001,2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -88,7 +88,7 @@ _IO_wstr_init_static (fp, ptr, size, pstart)
|
||||
size += s;
|
||||
}
|
||||
}
|
||||
_IO_wsetb (fp, ptr, ptr + size, 0);
|
||||
INTUSE(_IO_wsetb) (fp, ptr, ptr + size, 0);
|
||||
|
||||
fp->_wide_data->_IO_write_base = ptr;
|
||||
fp->_wide_data->_IO_read_base = ptr;
|
||||
@ -159,7 +159,7 @@ _IO_wstr_overflow (fp, c)
|
||||
/* Make sure _IO_setb won't try to delete _IO_buf_base. */
|
||||
fp->_wide_data->_IO_buf_base = NULL;
|
||||
}
|
||||
_IO_wsetb (fp, new_buf, new_buf + new_size, 1);
|
||||
INTUSE(_IO_wsetb) (fp, new_buf, new_buf + new_size, 1);
|
||||
fp->_wide_data->_IO_read_base =
|
||||
new_buf + (fp->_wide_data->_IO_read_base - old_buf);
|
||||
fp->_wide_data->_IO_read_ptr =
|
||||
@ -293,7 +293,7 @@ _IO_wstr_pbackfail (fp, c)
|
||||
{
|
||||
if ((fp->_flags & _IO_NO_WRITES) && c != EOF)
|
||||
return WEOF;
|
||||
return _IO_wdefault_pbackfail (fp, c);
|
||||
return INTUSE(_IO_wdefault_pbackfail) (fp, c);
|
||||
}
|
||||
|
||||
void
|
||||
@ -305,7 +305,7 @@ _IO_wstr_finish (fp, dummy)
|
||||
(((_IO_strfile *) fp)->_s._free_buffer) (fp->_wide_data->_IO_buf_base);
|
||||
fp->_wide_data->_IO_buf_base = NULL;
|
||||
|
||||
_IO_wdefault_finish (fp, 0);
|
||||
INTUSE(_IO_wdefault_finish) (fp, 0);
|
||||
}
|
||||
|
||||
struct _IO_jump_t _IO_wstr_jumps =
|
||||
@ -314,15 +314,15 @@ struct _IO_jump_t _IO_wstr_jumps =
|
||||
JUMP_INIT(finish, _IO_wstr_finish),
|
||||
JUMP_INIT(overflow, (_IO_overflow_t) _IO_wstr_overflow),
|
||||
JUMP_INIT(underflow, (_IO_underflow_t) _IO_wstr_underflow),
|
||||
JUMP_INIT(uflow, (_IO_underflow_t) _IO_wdefault_uflow),
|
||||
JUMP_INIT(uflow, (_IO_underflow_t) INTUSE(_IO_wdefault_uflow)),
|
||||
JUMP_INIT(pbackfail, (_IO_pbackfail_t) _IO_wstr_pbackfail),
|
||||
JUMP_INIT(xsputn, _IO_wdefault_xsputn),
|
||||
JUMP_INIT(xsgetn, _IO_wdefault_xsgetn),
|
||||
JUMP_INIT(xsputn, INTUSE(_IO_wdefault_xsputn)),
|
||||
JUMP_INIT(xsgetn, INTUSE(_IO_wdefault_xsgetn)),
|
||||
JUMP_INIT(seekoff, _IO_wstr_seekoff),
|
||||
JUMP_INIT(seekpos, _IO_default_seekpos),
|
||||
JUMP_INIT(setbuf, (_IO_setbuf_t) _IO_wdefault_setbuf),
|
||||
JUMP_INIT(setbuf, (_IO_setbuf_t) INTUSE(_IO_wdefault_setbuf)),
|
||||
JUMP_INIT(sync, _IO_default_sync),
|
||||
JUMP_INIT(doallocate, _IO_wdefault_doallocate),
|
||||
JUMP_INIT(doallocate, INTUSE(_IO_wdefault_doallocate)),
|
||||
JUMP_INIT(read, _IO_default_read),
|
||||
JUMP_INIT(write, _IO_default_write),
|
||||
JUMP_INIT(seek, _IO_default_seek),
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* More debugging hooks for `malloc'.
|
||||
Copyright (C) 1991-1994,1996-1999,2000,2001 Free Software Foundation, Inc.
|
||||
Copyright (C) 1991-1994,1996-2001,2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Written April 2, 1991 by John Gilmore of Cygnus Support.
|
||||
Based on mcheck.c by Mike Haertel.
|
||||
@ -41,7 +41,7 @@
|
||||
#ifdef USE_IN_LIBIO
|
||||
# include <libio/iolibio.h>
|
||||
# define fopen(f, n) _IO_fopen64 (f, n)
|
||||
# define setvbuf(s, b, f, l) _IO_setvbuf (s, b, f, l)
|
||||
# define setvbuf(s, b, f, l) INTUSE(_IO_setvbuf) (s, b, f, l)
|
||||
#endif
|
||||
|
||||
#define TRACE_BUFFER_SIZE 512
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Error handler for noninteractive utilities
|
||||
Copyright (C) 1990-1998, 2000, 2001 Free Software Foundation, Inc.
|
||||
Copyright (C) 1990-1998, 2000, 2001, 2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library. Its master source is NOT part of
|
||||
the C library, however. The master source lives in /gd/gnu/lib.
|
||||
|
||||
@ -88,7 +88,9 @@ extern void __error_at_line (int status, int errnum, const char *file_name,
|
||||
|
||||
# ifdef USE_IN_LIBIO
|
||||
# include <libio/iolibio.h>
|
||||
# define fflush(s) _IO_fflush (s)
|
||||
# define fflush(s) INTUSE(_IO_fflush) (s)
|
||||
# undef putc
|
||||
# define putc(c, fp) INTUSE(_IO_putc) (c, fp)
|
||||
# endif
|
||||
|
||||
#else /* not _LIBC */
|
||||
|
@ -56,7 +56,7 @@ static char sccsid[] = "@(#)syslog.c 8.4 (Berkeley) 3/18/94";
|
||||
|
||||
#ifdef USE_IN_LIBIO
|
||||
# include <libio/iolibio.h>
|
||||
# define ftell(s) _IO_ftell (s)
|
||||
# define ftell(s) INTUSE(_IO_ftell) (s)
|
||||
#endif
|
||||
|
||||
static int LogType = SOCK_DGRAM; /* type of socket connection */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1996,97,98,99,2000,2001 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1996,97,98,99,2000,2001,2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
|
||||
|
||||
@ -79,9 +79,11 @@
|
||||
#define STRINGIZE(name) STRINGIZE1 (name)
|
||||
#define STRINGIZE1(name) #name
|
||||
|
||||
#define DB_LOOKUP_FCT CONCAT3_1 (__nss_, DATABASE_NAME, _lookup)
|
||||
#define CONCAT3_1(Pre, Name, Post) CONCAT3_2 (Pre, Name, Post)
|
||||
#define CONCAT3_2(Pre, Name, Post) Pre##Name##Post
|
||||
#ifndef DB_LOOKUP_FCT
|
||||
# define DB_LOOKUP_FCT CONCAT3_1 (__nss_, DATABASE_NAME, _lookup)
|
||||
# define CONCAT3_1(Pre, Name, Post) CONCAT3_2 (Pre, Name, Post)
|
||||
# define CONCAT3_2(Pre, Name, Post) Pre##Name##Post
|
||||
#endif
|
||||
|
||||
/* Sometimes we need to store error codes in the `h_errno' variable. */
|
||||
#ifdef NEED_H_ERRNO
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1996,97,98,99,2000 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1996,97,98,99,2000,2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
|
||||
|
||||
@ -61,9 +61,11 @@
|
||||
#define STRINGIZE(Name) STRINGIZE1 (Name)
|
||||
#define STRINGIZE1(Name) #Name
|
||||
|
||||
#define DB_LOOKUP_FCT CONCAT3_1 (__nss_, DATABASE_NAME, _lookup)
|
||||
#define CONCAT3_1(Pre, Name, Post) CONCAT3_2 (Pre, Name, Post)
|
||||
#define CONCAT3_2(Pre, Name, Post) Pre##Name##Post
|
||||
#ifndef DB_LOOKUP_FCT
|
||||
# define DB_LOOKUP_FCT CONCAT3_1 (__nss_, DATABASE_NAME, _lookup)
|
||||
# define CONCAT3_1(Pre, Name, Post) CONCAT3_2 (Pre, Name, Post)
|
||||
# define CONCAT3_2(Pre, Name, Post) Pre##Name##Post
|
||||
#endif
|
||||
|
||||
/* Sometimes we need to store error codes in the `h_errno' variable. */
|
||||
#ifdef NEED_H_ERRNO
|
||||
|
@ -21,3 +21,5 @@
|
||||
#define DEFAULT_CONFIG "dns [!UNAVAIL=return] files"
|
||||
|
||||
#include "XXX-lookup.c"
|
||||
|
||||
INTDEF(__nss_hosts_lookup)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1991, 1997, 1998 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991, 1997, 1998, 2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -20,7 +20,7 @@
|
||||
|
||||
#ifdef USE_IN_LIBIO
|
||||
# include <libio/iolibio.h>
|
||||
# define fread(p, m, n, s) _IO_fread (p, m, n, s)
|
||||
# define fread(p, m, n, s) INTUSE(_IO_fread) (p, m, n, s)
|
||||
#endif
|
||||
|
||||
/* Read a word (int) from STREAM. */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1991,1992,1995,1996,1999,2000 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991,92,95,96,99,2000,2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -36,7 +36,7 @@
|
||||
# define PUT(F, S, N) _IO_sputn (F, S, N)
|
||||
# define PAD(Padchar) \
|
||||
if (width > 0) \
|
||||
done += _IO_padn (s, Padchar, width)
|
||||
done += INTUSE(_IO_padn) (s, Padchar, width)
|
||||
# else
|
||||
# define PUTC(C, F) putc (C, F)
|
||||
ssize_t __printf_pad __P ((FILE *, char pad, size_t n));
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Floating point output for `printf'.
|
||||
Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995-1999, 2000, 2001, 2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
|
||||
|
||||
@ -52,7 +52,7 @@
|
||||
the GNU I/O library. */
|
||||
#ifdef USE_IN_LIBIO
|
||||
# define PUT(f, s, n) _IO_sputn (f, s, n)
|
||||
# define PAD(f, c, n) (wide ? _IO_wpadn (f, c, n) : _IO_padn (f, c, n))
|
||||
# define PAD(f, c, n) (wide ? _IO_wpadn (f, c, n) : INTUSE(_IO_padn) (f, c, n))
|
||||
/* We use this file GNU C library and GNU I/O library. So make
|
||||
names equal. */
|
||||
# undef putc
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Print size value using units for orders of magnitude.
|
||||
Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
|
||||
Copyright (C) 1997,1998,1999,2000,2001,2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
|
||||
Based on a proposal by Larry McVoy <lm@sgi.com>.
|
||||
@ -34,7 +34,7 @@
|
||||
the GNU I/O library. */
|
||||
#ifdef USE_IN_LIBIO
|
||||
# define PUT(f, s, n) _IO_sputn (f, s, n)
|
||||
# define PAD(f, c, n) (wide ? _IO_wpadn (f, c, n) : _IO_padn (f, c, n))
|
||||
# define PAD(f, c, n) (wide ? _IO_wpadn (f, c, n) : INTUSE(_IO_padn) (f, c, n))
|
||||
/* We use this file GNU C library and GNU I/O library. So make
|
||||
names equal. */
|
||||
# undef putc
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1991, 1997, 1998 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991, 1997, 1998, 2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -20,7 +20,7 @@
|
||||
|
||||
#ifdef USE_IN_LIBIO
|
||||
# include <libio/iolibio.h>
|
||||
# define fwrite(p, n, m, s) _IO_fwrite (p, n, m, s)
|
||||
# define fwrite(p, n, m, s) INTUSE(_IO_fwrite) (p, n, m, s)
|
||||
#endif
|
||||
|
||||
/* Write the word (int) W to STREAM. */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1991, 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991, 1995, 1996, 1997, 2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -19,6 +19,10 @@
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef USE_IN_LIBIO
|
||||
# include <libioP.h>
|
||||
#endif
|
||||
|
||||
|
||||
/* Read formatted input from stdin according to the format string FORMAT. */
|
||||
/* VARARGS1 */
|
||||
@ -30,7 +34,7 @@ scanf (const char *format, ...)
|
||||
|
||||
va_start (arg, format);
|
||||
#ifdef USE_IN_LIBIO
|
||||
done = _IO_vfscanf (stdin, format, arg, NULL);
|
||||
done = INTUSE(_IO_vfscanf) (stdin, format, arg, NULL);
|
||||
#else
|
||||
done = vfscanf (stdin, format, arg);
|
||||
#endif
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1991, 1995, 1997, 1998 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991, 1995, 1997, 1998, 2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -21,15 +21,13 @@
|
||||
|
||||
#ifdef USE_IN_LIBIO
|
||||
# include <libio/iolibio.h>
|
||||
# define vsprintf(s, f, a) _IO_vsprintf (s, f, a)
|
||||
# define vsprintf(s, f, a) INTUSE(_IO_vsprintf) (s, f, a)
|
||||
#endif
|
||||
|
||||
/* Write formatted output into S, according to the format string FORMAT. */
|
||||
/* VARARGS2 */
|
||||
int
|
||||
sprintf (s, format)
|
||||
char *s;
|
||||
const char *format;
|
||||
sprintf (char *s, const char *format, ...)
|
||||
{
|
||||
va_list arg;
|
||||
int done;
|
||||
@ -40,3 +38,7 @@ sprintf (s, format)
|
||||
|
||||
return done;
|
||||
}
|
||||
|
||||
#ifdef USE_IN_LIBIO
|
||||
strong_alias(sprintf, _IO_sprintf)
|
||||
#endif
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1991,1993,1996,1997,1998,1999 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991,1993,1996-1999,2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -21,7 +21,7 @@
|
||||
|
||||
#ifdef USE_IN_LIBIO
|
||||
# include <iolibio.h>
|
||||
# define __fdopen _IO_fdopen
|
||||
# define __fdopen INTUSE(_IO_fdopen)
|
||||
#endif
|
||||
|
||||
/* This returns a new stream opened on a temporary file (generated
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user