From 77fe0b9cd86ccba7349921082d886cbca613404c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 26 Feb 2002 01:45:59 +0000 Subject: Update. 2002-02-25 Ulrich Drepper * 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 --- ChangeLog | 146 +++++++++++++++++++++++++++++++++++++++++ assert/assert-perr.c | 4 +- assert/assert.c | 4 +- configure | 6 +- include/libc-symbols.h | 2 + include/netinet/in.h | 2 + include/rpc/auth.h | 3 + include/rpc/auth_unix.h | 3 + include/rpc/key_prot.h | 10 +++ include/rpc/pmap_prot.h | 4 ++ include/rpc/pmap_rmt.h | 4 ++ include/rpc/rpc_msg.h | 4 +- include/rpc/xdr.h | 33 ++++++++++ include/stdio.h | 3 + inet/gethstbyad_r.c | 7 +- inet/gethstbynm2_r.c | 5 +- inet/gethstbynm_r.c | 5 +- inet/gethstent_r.c | 5 +- inet/in6_addr.c | 3 +- libio/Makefile | 4 +- libio/__fpurge.c | 6 +- libio/filedoalloc.c | 5 +- libio/fileops.c | 95 ++++++++++++++++----------- libio/ftello.c | 4 +- libio/ftello64.c | 4 +- libio/genops.c | 64 +++++++++++------- libio/iofclose.c | 18 +++-- libio/iofdopen.c | 11 ++-- libio/iofflush.c | 5 +- libio/iofflush_u.c | 4 +- libio/iofgetpos.c | 4 +- libio/iofgetpos64.c | 4 +- libio/iofgets.c | 4 +- libio/iofgets_u.c | 4 +- libio/iofopen.c | 13 ++-- libio/iofopncook.c | 50 +++++++------- libio/iofputs.c | 3 +- libio/iofread.c | 5 +- libio/iofread_u.c | 4 +- libio/iofsetpos.c | 5 +- libio/iofsetpos64.c | 5 +- libio/ioftell.c | 5 +- libio/iofwrite.c | 3 +- libio/iogetline.c | 9 ++- libio/iogets.c | 4 +- libio/iogetwline.c | 4 +- libio/iolibio.h | 32 +++++++-- libio/iopadn.c | 3 +- libio/iopopen.c | 32 ++++----- libio/ioseekoff.c | 11 +++- libio/ioseekpos.c | 16 ++++- libio/iosetbuffer.c | 3 +- libio/iosetvbuf.c | 3 +- libio/iosprintf.c | 52 --------------- libio/ioungetc.c | 4 +- libio/ioungetwc.c | 4 +- libio/iovdprintf.c | 14 ++-- libio/iovsprintf.c | 7 +- libio/iovsscanf.c | 6 +- libio/libioP.h | 129 ++++++++++++++++++++++++++++++++++-- libio/memstream.c | 36 +++++----- libio/obprintf.c | 10 +-- libio/oldfileops.c | 51 +++++++------- libio/oldiofclose.c | 6 +- libio/oldiofdopen.c | 6 +- libio/oldiofgetpos.c | 4 +- libio/oldiofgetpos64.c | 4 +- libio/oldiofopen.c | 6 +- libio/oldiofsetpos.c | 5 +- libio/oldiofsetpos64.c | 5 +- libio/oldiopopen.c | 20 +++--- libio/oldstdfiles.c | 6 +- libio/putc.c | 3 +- libio/setbuf.c | 4 +- libio/setlinebuf.c | 4 +- libio/stdfiles.c | 15 +++-- libio/stdio.c | 2 +- libio/strops.c | 33 ++++++---- libio/vasprintf.c | 6 +- libio/vscanf.c | 4 +- libio/vsnprintf.c | 24 +++---- libio/vswprintf.c | 18 ++--- libio/wfiledoalloc.c | 6 +- libio/wfileops.c | 85 +++++++++++++----------- libio/wgenops.c | 56 ++++++++++------ libio/wstrops.c | 20 +++--- malloc/mtrace.c | 4 +- misc/error.c | 6 +- misc/syslog.c | 2 +- nss/getXXbyYY_r.c | 10 +-- nss/getXXent_r.c | 10 +-- nss/hosts-lookup.c | 2 + stdio-common/getw.c | 4 +- stdio-common/printf-prs.c | 4 +- stdio-common/printf_fp.c | 4 +- stdio-common/printf_size.c | 4 +- stdio-common/putw.c | 4 +- stdio-common/scanf.c | 8 ++- stdio-common/sprintf.c | 12 ++-- stdio-common/tmpfile64.c | 4 +- stdio-common/vfprintf.c | 35 +++++----- stdio-common/vfscanf.c | 13 ++-- stdlib/strfmon.c | 7 +- sunrpc/auth_des.c | 8 +-- sunrpc/auth_none.c | 8 +-- sunrpc/auth_unix.c | 28 ++++---- sunrpc/authdes_prot.c | 24 ++++--- sunrpc/authuxprot.c | 22 ++++--- sunrpc/clnt_perr.c | 2 +- sunrpc/clnt_raw.c | 10 +-- sunrpc/clnt_tcp.c | 21 +++--- sunrpc/clnt_udp.c | 13 ++-- sunrpc/clnt_unix.c | 22 ++++--- sunrpc/key_call.c | 52 ++++++++------- sunrpc/key_prot.c | 53 ++++++++------- sunrpc/openchild.c | 4 +- sunrpc/pm_getmaps.c | 4 +- sunrpc/pm_getport.c | 4 +- sunrpc/pmap_clnt.c | 9 +-- sunrpc/pmap_prot.c | 9 +-- sunrpc/pmap_prot2.c | 9 +-- sunrpc/pmap_rmt.c | 37 ++++++----- sunrpc/rpc_cmsg.c | 29 ++++---- sunrpc/rpc_prot.c | 52 ++++++++------- sunrpc/svc_authux.c | 7 +- sunrpc/svc_raw.c | 7 +- sunrpc/svc_simple.c | 7 +- sunrpc/svc_tcp.c | 16 ++--- sunrpc/svc_udp.c | 12 ++-- sunrpc/svc_unix.c | 14 ++-- sunrpc/xdr.c | 50 +++++++++----- sunrpc/xdr_array.c | 3 +- sunrpc/xdr_mem.c | 1 + sunrpc/xdr_rec.c | 6 +- sunrpc/xdr_ref.c | 7 +- sunrpc/xdr_stdio.c | 8 +-- sysdeps/generic/_strerror.c | 7 +- sysdeps/generic/printf_fphex.c | 4 +- sysdeps/generic/tmpfile.c | 4 +- sysdeps/gnu/errlist.awk | 2 + sysdeps/gnu/errlist.c | 2 + 141 files changed, 1287 insertions(+), 777 deletions(-) delete mode 100644 libio/iosprintf.c diff --git a/ChangeLog b/ChangeLog index ae639c2..1e88113 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,149 @@ +2002-02-25 Ulrich Drepper + + * 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 * elf/dl-support.c (_dl_non_dynamic_init): Renamed from diff --git a/assert/assert-perr.c b/assert/assert-perr.c index 1342207..3846529 100644 --- a/assert/assert-perr.c +++ b/assert/assert-perr.c @@ -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 # include -# 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 diff --git a/assert/assert.c b/assert/assert.c index 6a9c4de..aa20f1f 100644 --- a/assert/assert.c +++ b/assert/assert.c @@ -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 # include -# define fflush(s) _IO_fflush (s) +# define fflush(s) INTUSE(_IO_fflush) (s) #endif /* This function, when passed a string containing an asserted diff --git a/configure b/configure index f25a17d..e646030 100755 --- a/configure +++ b/configure @@ -3500,12 +3500,12 @@ else #line 3501 "configure" #include "confdefs.h" #include -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 diff --git a/include/libc-symbols.h b/include/libc-symbols.h index 8ef9f23..22f7d85 100644 --- a/include/libc-symbols.h +++ b/include/libc-symbols.h @@ -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 */ diff --git a/include/netinet/in.h b/include/netinet/in.h index 9139cfa..674fc2b 100644 --- a/include/netinet/in.h +++ b/include/netinet/in.h @@ -1 +1,3 @@ #include + +extern const struct in6_addr in6addr_any_internal; diff --git a/include/rpc/auth.h b/include/rpc/auth.h index 87fcd36..bc19049 100644 --- a/include/rpc/auth.h +++ b/include/rpc/auth.h @@ -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 diff --git a/include/rpc/auth_unix.h b/include/rpc/auth_unix.h index 3629939..14928cc 100644 --- a/include/rpc/auth_unix.h +++ b/include/rpc/auth_unix.h @@ -1 +1,4 @@ #include + +extern bool_t xdr_authunix_parms_internal (XDR *__xdrs, + struct authunix_parms *__p); diff --git a/include/rpc/key_prot.h b/include/rpc/key_prot.h index 2baa99d..ee30c65 100644 --- a/include/rpc/key_prot.h +++ b/include/rpc/key_prot.h @@ -1 +1,11 @@ #include + +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*); diff --git a/include/rpc/pmap_prot.h b/include/rpc/pmap_prot.h index 06d7d37..e50d5e0 100644 --- a/include/rpc/pmap_prot.h +++ b/include/rpc/pmap_prot.h @@ -1 +1,5 @@ #include + + +extern bool_t xdr_pmap_internal (XDR *__xdrs, struct pmap *__regs); +extern bool_t xdr_pmaplist_internal (XDR *__xdrs, struct pmaplist **__rp); diff --git a/include/rpc/pmap_rmt.h b/include/rpc/pmap_rmt.h index 1585c13..f8e586c 100644 --- a/include/rpc/pmap_rmt.h +++ b/include/rpc/pmap_rmt.h @@ -1 +1,5 @@ #include + +extern bool_t xdr_rmtcall_args_internal (XDR *__xdrs, + struct rmtcallargs *__crp); +extern bool_t xdr_rmtcallres_internal (XDR *__xdrs, struct rmtcallres *__crp); diff --git a/include/rpc/rpc_msg.h b/include/rpc/rpc_msg.h index 48fc533..ab2e775 100644 --- a/include/rpc/rpc_msg.h +++ b/include/rpc/rpc_msg.h @@ -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 diff --git a/include/rpc/xdr.h b/include/rpc/xdr.h index 4c9083d..40855c9 100644 --- a/include/rpc/xdr.h +++ b/include/rpc/xdr.h @@ -1 +1,34 @@ #include + +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); diff --git a/include/stdio.h b/include/stdio.h index 7619108..32547b9 100644 --- a/include/stdio.h +++ b/include/stdio.h @@ -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 diff --git a/inet/gethstbyad_r.c b/inet/gethstbyad_r.c index b481d96..5de022f 100644 --- a/inet/gethstbyad_r.c +++ b/inet/gethstbyad_r.c @@ -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 , 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" diff --git a/inet/gethstbynm2_r.c b/inet/gethstbynm2_r.c index f32c8f2..f927c77 100644 --- a/inet/gethstbynm2_r.c +++ b/inet/gethstbynm2_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 , 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" diff --git a/inet/gethstbynm_r.c b/inet/gethstbynm_r.c index 0ee8af3..9968c67 100644 --- a/inet/gethstbynm_r.c +++ b/inet/gethstbynm_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 , 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" diff --git a/inet/gethstent_r.c b/inet/gethstent_r.c index 1a4d380..9122487 100644 --- a/inet/gethstent_r.c +++ b/inet/gethstent_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" diff --git a/inet/in6_addr.c b/inet/in6_addr.c index ad69c87..5f004fb 100644 --- a/inet/in6_addr.c +++ b/inet/in6_addr.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 , 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 } } }; diff --git a/libio/Makefile b/libio/Makefile index a10b7df..af91ef2 100644 --- a/libio/Makefile +++ b/libio/Makefile @@ -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 \ diff --git a/libio/__fpurge.c b/libio/__fpurge.c index 09e5546..50ba281 100644 --- a/libio/__fpurge.c +++ b/libio/__fpurge.c @@ -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; diff --git a/libio/filedoalloc.c b/libio/filedoalloc.c index 3621e43..e7a94ff 100644 --- a/libio/filedoalloc.c +++ b/libio/filedoalloc.c @@ -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) diff --git a/libio/fileops.c b/libio/fileops.c index 0d02fca..92f1be4 100644 --- a/libio/fileops.c +++ b/libio/fileops.c @@ -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) }; diff --git a/libio/ftello.c b/libio/ftello.c index 6c1f1a6..dcecf5e 100644 --- a/libio/ftello.c +++ b/libio/ftello.c @@ -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) diff --git a/libio/ftello64.c b/libio/ftello64.c index cd0670f..bbf7767 100644 --- a/libio/ftello64.c +++ b/libio/ftello64.c @@ -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) diff --git a/libio/genops.c b/libio/genops.c index 2398cff..5f16894 100644 --- a/libio/genops.c +++ b/libio/genops.c @@ -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 diff --git a/libio/iofclose.c b/libio/iofclose.c index 45bd0af..fb0f7ce 100644 --- a/libio/iofclose.c +++ b/libio/iofclose.c @@ -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; diff --git a/libio/iofdopen.c b/libio/iofdopen.c index 2c73bda..a4ac03f 100644 --- a/libio/iofdopen.c +++ b/libio/iofdopen.c @@ -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); diff --git a/libio/iofflush.c b/libio/iofflush.c index c45023c..6f12e9b 100644 --- a/libio/iofflush.c +++ b/libio/iofflush.c @@ -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) diff --git a/libio/iofflush_u.c b/libio/iofflush_u.c index 4576cf0..4603ec3 100644 --- a/libio/iofflush_u.c +++ b/libio/iofflush_u.c @@ -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); diff --git a/libio/iofgetpos.c b/libio/iofgetpos.c index cc7d9e9..c8eea79 100644 --- a/libio/iofgetpos.c +++ b/libio/iofgetpos.c @@ -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) diff --git a/libio/iofgetpos64.c b/libio/iofgetpos64.c index 1790718..525a75c 100644 --- a/libio/iofgetpos64.c +++ b/libio/iofgetpos64.c @@ -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) diff --git a/libio/iofgets.c b/libio/iofgets.c index 69befc7..d61dd06 100644 --- a/libio/iofgets.c +++ b/libio/iofgets.c @@ -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) diff --git a/libio/iofgets_u.c b/libio/iofgets_u.c index f62f6c6..bf5bb09 100644 --- a/libio/iofgets_u.c +++ b/libio/iofgets_u.c @@ -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) diff --git a/libio/iofopen.c b/libio/iofopen.c index e3b9838..4bb780d 100644 --- a/libio/iofopen.c +++ b/libio/iofopen.c @@ -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; } diff --git a/libio/iofopncook.c b/libio/iofopncook.c index 39f83db..b35b56d 100644 --- a/libio/iofopncook.c +++ b/libio/iofopncook.c @@ -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), diff --git a/libio/iofputs.c b/libio/iofputs.c index 9187d30..0835e84 100644 --- a/libio/iofputs.c +++ b/libio/iofputs.c @@ -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) diff --git a/libio/iofread.c b/libio/iofread.c index 66b80c1..08f6ab0 100644 --- a/libio/iofread.c +++ b/libio/iofread.c @@ -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) diff --git a/libio/iofread_u.c b/libio/iofread_u.c index d6c3484..527af10 100644 --- a/libio/iofread_u.c +++ b/libio/iofread_u.c @@ -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; } diff --git a/libio/iofsetpos.c b/libio/iofsetpos.c index 7cf82a3..3c3e61d 100644 --- a/libio/iofsetpos.c +++ b/libio/iofsetpos.c @@ -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. */ diff --git a/libio/iofsetpos64.c b/libio/iofsetpos64.c index c3eec37..f8c5374 100644 --- a/libio/iofsetpos64.c +++ b/libio/iofsetpos64.c @@ -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. */ diff --git a/libio/ioftell.c b/libio/ioftell.c index f2abd62..8328c5b 100644 --- a/libio/ioftell.c +++ b/libio/ioftell.c @@ -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) diff --git a/libio/iofwrite.c b/libio/iofwrite.c index b381882..9a4016f 100644 --- a/libio/iofwrite.c +++ b/libio/iofwrite.c @@ -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) diff --git a/libio/iogetline.c b/libio/iogetline.c index 4b8ecd0..eca38cf 100644 --- a/libio/iogetline.c +++ b/libio/iogetline.c @@ -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 */ diff --git a/libio/iogets.c b/libio/iogets.c index eb89df3..95e8368 100644 --- a/libio/iogets.c +++ b/libio/iogets.c @@ -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; diff --git a/libio/iogetwline.c b/libio/iogetwline.c index 4092745..e529b7d 100644 --- a/libio/iogetwline.c +++ b/libio/iogetwline.c @@ -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; diff --git a/libio/iolibio.h b/libio/iolibio.h index 7097606..e15523e 100644 --- a/libio/iolibio.h +++ b/libio/iolibio.h @@ -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 diff --git a/libio/iopadn.c b/libio/iopadn.c index f5c89d9..b957394 100644 --- a/libio/iopadn.c +++ b/libio/iopadn.c @@ -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) diff --git a/libio/iopopen.c b/libio/iopopen.c index f4b65fd..d6a6f6a 100644 --- a/libio/iopopen.c +++ b/libio/iopopen.c @@ -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 . @@ -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) }; diff --git a/libio/ioseekoff.c b/libio/ioseekoff.c index 2111bec..eff6d38 100644 --- a/libio/ioseekoff.c +++ b/libio/ioseekoff.c @@ -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) diff --git a/libio/ioseekpos.c b/libio/ioseekpos.c index 4799404..8aa151a 100644 --- a/libio/ioseekpos.c +++ b/libio/ioseekpos.c @@ -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) diff --git a/libio/iosetbuffer.c b/libio/iosetbuffer.c index 49c0def..785fcab 100644 --- a/libio/iosetbuffer.c +++ b/libio/iosetbuffer.c @@ -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) diff --git a/libio/iosetvbuf.c b/libio/iosetvbuf.c index c7ee6ef..addf4ed 100644 --- a/libio/iosetvbuf.c +++ b/libio/iosetvbuf.c @@ -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) diff --git a/libio/iosprintf.c b/libio/iosprintf.c deleted file mode 100644 index 21376a6..0000000 --- a/libio/iosprintf.c +++ /dev/null @@ -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 -#else -#include -#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; -} diff --git a/libio/ioungetc.c b/libio/ioungetc.c index 7c4e0e7..d32359b 100644 --- a/libio/ioungetc.c +++ b/libio/ioungetc.c @@ -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; diff --git a/libio/ioungetwc.c b/libio/ioungetwc.c index 542b7b1..1bff412 100644 --- a/libio/ioungetwc.c +++ b/libio/ioungetwc.c @@ -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; diff --git a/libio/iovdprintf.c b/libio/iovdprintf.c index 636259e..dab9a17 100644 --- a/libio/iovdprintf.c +++ b/libio/iovdprintf.c @@ -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); diff --git a/libio/iovsprintf.c b/libio/iovsprintf.c index ac1d9bd..dbaa53f 100644 --- a/libio/iovsprintf.c +++ b/libio/iovsprintf.c @@ -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) diff --git a/libio/iovsscanf.c b/libio/iovsscanf.c index 2653b47..1bb4755 100644 --- a/libio/iovsscanf.c +++ b/libio/iovsscanf.c @@ -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; } diff --git a/libio/libioP.h b/libio/libioP.h index e25a6e7..b40e9e6 100644 --- a/libio/libioP.h +++ b/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 diff --git a/libio/memstream.c b/libio/memstream.c index a6a54e1..2f7d834 100644 --- a/libio/memstream.c +++ b/libio/memstream.c @@ -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); } diff --git a/libio/obprintf.c b/libio/obprintf.c index 9ef90bb..aa59145 100644 --- a/libio/obprintf.c +++ b/libio/obprintf.c @@ -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 , 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 diff --git a/libio/oldfileops.c b/libio/oldfileops.c index 3d772fd..8998ee9 100644 --- a/libio/oldfileops.c +++ b/libio/oldfileops.c @@ -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 . @@ -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); diff --git a/libio/oldiofclose.c b/libio/oldiofclose.c index c42e2f4..18db7b8 100644 --- a/libio/oldiofclose.c +++ b/libio/oldiofclose.c @@ -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; diff --git a/libio/oldiofdopen.c b/libio/oldiofdopen.c index da8eaaf..9015504 100644 --- a/libio/oldiofdopen.c +++ b/libio/oldiofdopen.c @@ -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; } diff --git a/libio/oldiofgetpos.c b/libio/oldiofgetpos.c index b175b6b..0d6d187 100644 --- a/libio/oldiofgetpos.c +++ b/libio/oldiofgetpos.c @@ -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); diff --git a/libio/oldiofgetpos64.c b/libio/oldiofgetpos64.c index a398fef..b7fecbd 100644 --- a/libio/oldiofgetpos64.c +++ b/libio/oldiofgetpos64.c @@ -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); diff --git a/libio/oldiofopen.c b/libio/oldiofopen.c index 238f1d0..67a9eba 100644 --- a/libio/oldiofopen.c +++ b/libio/oldiofopen.c @@ -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; } diff --git a/libio/oldiofsetpos.c b/libio/oldiofsetpos.c index 66bece2..39adc5f 100644 --- a/libio/oldiofsetpos.c +++ b/libio/oldiofsetpos.c @@ -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. */ diff --git a/libio/oldiofsetpos64.c b/libio/oldiofsetpos64.c index 6a55d8c..8807133 100644 --- a/libio/oldiofsetpos64.c +++ b/libio/oldiofsetpos64.c @@ -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. */ diff --git a/libio/oldiopopen.c b/libio/oldiopopen.c index c00e942..878fdc0 100644 --- a/libio/oldiopopen.c +++ b/libio/oldiopopen.c @@ -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 . @@ -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) }; diff --git a/libio/oldstdfiles.c b/libio/oldstdfiles.c index 2c6ae18..d67ae27 100644 --- a/libio/oldstdfiles.c +++ b/libio/oldstdfiles.c @@ -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 = diff --git a/libio/putc.c b/libio/putc.c index 885964c..6495744 100644 --- a/libio/putc.c +++ b/libio/putc.c @@ -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 diff --git a/libio/setbuf.c b/libio/setbuf.c index 7016e3a..229cccb 100644 --- a/libio/setbuf.c +++ b/libio/setbuf.c @@ -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); } diff --git a/libio/setlinebuf.c b/libio/setlinebuf.c index c15871f..ded3c8f 100644 --- a/libio/setlinebuf.c +++ b/libio/setlinebuf.c @@ -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); } diff --git a/libio/stdfiles.c b/libio/stdfiles.c index cf8ce20..dd4be04 100644 --- a/libio/stdfiles.c +++ b/libio/stdfiles.c @@ -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) diff --git a/libio/stdio.c b/libio/stdio.c index 7d9b062..9a59496 100644 --- a/libio/stdio.c +++ b/libio/stdio.c @@ -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 diff --git a/libio/strops.c b/libio/strops.c index d679a0d..d95f33c 100644 --- a/libio/strops.c +++ b/libio/strops.c @@ -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), diff --git a/libio/vasprintf.c b/libio/vasprintf.c index 2e27e82..fb7e006 100644 --- a/libio/vasprintf.c +++ b/libio/vasprintf.c @@ -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); diff --git a/libio/vscanf.c b/libio/vscanf.c index bc1ddff..477cbae 100644 --- a/libio/vscanf.c +++ b/libio/vscanf.c @@ -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 diff --git a/libio/vsnprintf.c b/libio/vsnprintf.c index f356902..8a3afc4 100644 --- a/libio/vsnprintf.c +++ b/libio/vsnprintf.c @@ -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'; diff --git a/libio/vswprintf.c b/libio/vswprintf.c index 6f2cf79..10d35a2 100644 --- a/libio/vswprintf.c +++ b/libio/vswprintf.c @@ -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), diff --git a/libio/wfiledoalloc.c b/libio/wfiledoalloc.c index 3317fb7..1fddd45 100644 --- a/libio/wfiledoalloc.c +++ b/libio/wfiledoalloc.c @@ -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; diff --git a/libio/wfileops.c b/libio/wfileops.c index 54624f0..d0259b0 100644 --- a/libio/wfileops.c +++ b/libio/wfileops.c @@ -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) }; diff --git a/libio/wgenops.c b/libio/wgenops.c index f021e8a..b0580e5 100644 --- a/libio/wgenops.c +++ b/libio/wgenops.c @@ -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 . Based on the single byte version by Per Bothner . @@ -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); } diff --git a/libio/wstrops.c b/libio/wstrops.c index 0e90613..797800d 100644 --- a/libio/wstrops.c +++ b/libio/wstrops.c @@ -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), diff --git a/malloc/mtrace.c b/malloc/mtrace.c index 1da145e..acee3c4 100644 --- a/malloc/mtrace.c +++ b/malloc/mtrace.c @@ -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 # 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 diff --git a/misc/error.c b/misc/error.c index aa0d8bb..9d01066 100644 --- a/misc/error.c +++ b/misc/error.c @@ -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 -# 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 */ diff --git a/misc/syslog.c b/misc/syslog.c index a27eb2a..de5737d 100644 --- a/misc/syslog.c +++ b/misc/syslog.c @@ -56,7 +56,7 @@ static char sccsid[] = "@(#)syslog.c 8.4 (Berkeley) 3/18/94"; #ifdef USE_IN_LIBIO # include -# define ftell(s) _IO_ftell (s) +# define ftell(s) INTUSE(_IO_ftell) (s) #endif static int LogType = SOCK_DGRAM; /* type of socket connection */ diff --git a/nss/getXXbyYY_r.c b/nss/getXXbyYY_r.c index bdf2b3d..d7ab257 100644 --- a/nss/getXXbyYY_r.c +++ b/nss/getXXbyYY_r.c @@ -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 , 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 diff --git a/nss/getXXent_r.c b/nss/getXXent_r.c index f025499..9df443e 100644 --- a/nss/getXXent_r.c +++ b/nss/getXXent_r.c @@ -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 , 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 diff --git a/nss/hosts-lookup.c b/nss/hosts-lookup.c index 8dff71f..998058e 100644 --- a/nss/hosts-lookup.c +++ b/nss/hosts-lookup.c @@ -21,3 +21,5 @@ #define DEFAULT_CONFIG "dns [!UNAVAIL=return] files" #include "XXX-lookup.c" + +INTDEF(__nss_hosts_lookup) diff --git a/stdio-common/getw.c b/stdio-common/getw.c index 75e7366..81156e6 100644 --- a/stdio-common/getw.c +++ b/stdio-common/getw.c @@ -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 -# 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. */ diff --git a/stdio-common/printf-prs.c b/stdio-common/printf-prs.c index ae3fe41..f0cd75b 100644 --- a/stdio-common/printf-prs.c +++ b/stdio-common/printf-prs.c @@ -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)); diff --git a/stdio-common/printf_fp.c b/stdio-common/printf_fp.c index 4c68c5e..66a6084 100644 --- a/stdio-common/printf_fp.c +++ b/stdio-common/printf_fp.c @@ -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 , 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 diff --git a/stdio-common/printf_size.c b/stdio-common/printf_size.c index a036822..4f2807b 100644 --- a/stdio-common/printf_size.c +++ b/stdio-common/printf_size.c @@ -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 , 1997. Based on a proposal by Larry McVoy . @@ -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 diff --git a/stdio-common/putw.c b/stdio-common/putw.c index d1b68ab..ddf9ced 100644 --- a/stdio-common/putw.c +++ b/stdio-common/putw.c @@ -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 -# 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. */ diff --git a/stdio-common/scanf.c b/stdio-common/scanf.c index 6109599..268aa90 100644 --- a/stdio-common/scanf.c +++ b/stdio-common/scanf.c @@ -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 #include +#ifdef USE_IN_LIBIO +# include +#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 diff --git a/stdio-common/sprintf.c b/stdio-common/sprintf.c index 867a27b..f44a24b 100644 --- a/stdio-common/sprintf.c +++ b/stdio-common/sprintf.c @@ -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 -# 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 diff --git a/stdio-common/tmpfile64.c b/stdio-common/tmpfile64.c index 1a87576..1798d95 100644 --- a/stdio-common/tmpfile64.c +++ b/stdio-common/tmpfile64.c @@ -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 -# define __fdopen _IO_fdopen +# define __fdopen INTUSE(_IO_fdopen) #endif /* This returns a new stream opened on a temporary file (generated diff --git a/stdio-common/vfprintf.c b/stdio-common/vfprintf.c index febd094..23d7c13 100644 --- a/stdio-common/vfprintf.c +++ b/stdio-common/vfprintf.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-1999, 2000, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1991-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 @@ -75,7 +75,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) # define PUTC(C, F) _IO_putc_unlocked (C, F) # define ORIENT if (s->_vtable_offset == 0 && _IO_fwide (s, -1) != -1)\ return -1 @@ -2006,18 +2006,18 @@ _IO_helper_overflow (_IO_FILE *s, int c) static const struct _IO_jump_t _IO_helper_jumps = { JUMP_INIT_DUMMY, - JUMP_INIT (finish, _IO_wdefault_finish), + JUMP_INIT (finish, INTUSE(_IO_wdefault_finish)), JUMP_INIT (overflow, _IO_helper_overflow), JUMP_INIT (underflow, _IO_default_underflow), - JUMP_INIT (uflow, _IO_default_uflow), - JUMP_INIT (pbackfail, (_IO_pbackfail_t) _IO_wdefault_pbackfail), - JUMP_INIT (xsputn, _IO_wdefault_xsputn), - JUMP_INIT (xsgetn, _IO_wdefault_xsgetn), + JUMP_INIT (uflow, INTUSE(_IO_default_uflow)), + JUMP_INIT (pbackfail, (_IO_pbackfail_t) INTUSE(_IO_wdefault_pbackfail)), + JUMP_INIT (xsputn, INTUSE(_IO_wdefault_xsputn)), + JUMP_INIT (xsgetn, INTUSE(_IO_wdefault_xsgetn)), JUMP_INIT (seekoff, _IO_default_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), @@ -2028,18 +2028,18 @@ static const struct _IO_jump_t _IO_helper_jumps = static const struct _IO_jump_t _IO_helper_jumps = { JUMP_INIT_DUMMY, - JUMP_INIT (finish, _IO_default_finish), + JUMP_INIT (finish, INTUSE(_IO_default_finish)), JUMP_INIT (overflow, _IO_helper_overflow), JUMP_INIT (underflow, _IO_default_underflow), - JUMP_INIT (uflow, _IO_default_uflow), - JUMP_INIT (pbackfail, _IO_default_pbackfail), - JUMP_INIT (xsputn, _IO_default_xsputn), - JUMP_INIT (xsgetn, _IO_default_xsgetn), + JUMP_INIT (uflow, INTUSE(_IO_default_uflow)), + JUMP_INIT (pbackfail, INTUSE(_IO_default_pbackfail)), + JUMP_INIT (xsputn, INTUSE(_IO_default_xsputn)), + JUMP_INIT (xsgetn, INTUSE(_IO_default_xsgetn)), JUMP_INIT (seekoff, _IO_default_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), @@ -2083,7 +2083,11 @@ buffered_vfprintf (register _IO_FILE *s, const CHAR_T *format, _IO_JUMPS (&helper._f) = (struct _IO_jump_t *) &_IO_helper_jumps; /* Now print to helper instead. */ +#if defined USE_IN_LIBIO && !defined COMPILE_WPRINTF + result = INTUSE(_IO_vfprintf) (hp, format, args); +#else result = vfprintf (hp, format, args); +#endif /* Lock stream. */ __libc_cleanup_region_start (1, (void (*) (void *)) &_IO_funlockfile, s); @@ -2186,6 +2190,7 @@ strong_alias (_IO_vfwprintf, __vfwprintf); weak_alias (_IO_vfwprintf, vfwprintf); # else strong_alias (_IO_vfprintf, vfprintf); +INTDEF(_IO_vfprintf) # endif # else # if defined __ELF__ || defined __GNU_LIBRARY__ diff --git a/stdio-common/vfscanf.c b/stdio-common/vfscanf.c index b4b7d4d..0b4d030 100644 --- a/stdio-common/vfscanf.c +++ b/stdio-common/vfscanf.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-1999, 2000, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1991-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 @@ -75,9 +75,9 @@ # ifdef COMPILE_WSCANF # define ungetc(c, s) ((void) (c == WEOF \ || (--read_in, \ - _IO_sputbackwc (s, c)))) + INTUSE(_IO_sputbackwc) (s, c)))) # define ungetc_not_eof(c, s) ((void) (--read_in, \ - _IO_sputbackwc (s, c))) + INTUSE(_IO_sputbackwc) (s, c))) # define inchar() (c == WEOF ? WEOF \ : ((c = _IO_getwc_unlocked (s)), \ (void) (c != WEOF && ++read_in), c)) @@ -105,9 +105,9 @@ # else # define ungetc(c, s) ((void) ((int) c == EOF \ || (--read_in, \ - _IO_sputbackc (s, (unsigned char) c)))) + INTUSE(_IO_sputbackc) (s, (unsigned char) c)))) # define ungetc_not_eof(c, s) ((void) (--read_in, \ - _IO_sputbackc (s, (unsigned char) c))) + INTUSE(_IO_sputbackc) (s, (unsigned char) c))) # define inchar() (c == EOF ? EOF \ : ((c = _IO_getc_unlocked (s)), \ (void) (c != EOF && ++read_in), c)) @@ -2435,7 +2435,7 @@ __vfwscanf (FILE *s, const wchar_t *format, va_list argptr) int __vfscanf (FILE *s, const char *format, va_list argptr) { - return _IO_vfscanf (s, format, argptr, NULL); + return INTUSE(_IO_vfscanf) (s, format, argptr, NULL); } # endif #endif @@ -2444,4 +2444,5 @@ __vfscanf (FILE *s, const char *format, va_list argptr) weak_alias (__vfwscanf, vfwscanf) #else weak_alias (__vfscanf, vfscanf) +INTDEF(_IO_vfscanf) #endif diff --git a/stdlib/strfmon.c b/stdlib/strfmon.c index e2fe40b..fd3f05b 100644 --- a/stdlib/strfmon.c +++ b/stdlib/strfmon.c @@ -1,5 +1,5 @@ /* Formatting a monetary value according to the current locale. - Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc. + Copyright (C) 1996-2001, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper and Jochen Hein , 1996. @@ -531,9 +531,10 @@ __strfmon_l (char *s, size_t maxsize, __locale_t loc, const char *format, ...) # ifdef _IO_MTSAFE_IO f._sbf._f._lock = &lock; # endif - _IO_init ((_IO_FILE *) &f, 0); + INTUSE(_IO_init) ((_IO_FILE *) &f, 0); _IO_JUMPS ((struct _IO_FILE_plus *) &f) = &_IO_str_jumps; - _IO_str_init_static ((_IO_strfile *) &f, dest, (s + maxsize) - dest, dest); + INTUSE(_IO_str_init_static) ((_IO_strfile *) &f, dest, + (s + maxsize) - dest, dest); #else memset ((void *) &f, 0, sizeof (f)); f.__magic = _IOMAGIC; diff --git a/sunrpc/auth_des.c b/sunrpc/auth_des.c index 5100f9e..bf1b8a6 100644 --- a/sunrpc/auth_des.c +++ b/sunrpc/auth_des.c @@ -52,8 +52,8 @@ #define debug(msg) /* printf("%s\n", msg) */ -extern bool_t xdr_authdes_cred (XDR *, struct authdes_cred *); -extern bool_t xdr_authdes_verf (XDR *, struct authdes_verf *); +extern bool_t INTUSE(xdr_authdes_cred) (XDR *, struct authdes_cred *); +extern bool_t INTUSE(xdr_authdes_verf) (XDR *, struct authdes_verf *); /* * DES authenticator operations vector @@ -309,7 +309,7 @@ authdes_marshal (AUTH *auth, XDR *xdrs) ATTEMPT (xdr_putint32 (xdrs, &auth->ah_cred.oa_flavor)); ATTEMPT (xdr_putint32 (xdrs, &len)); } - ATTEMPT (xdr_authdes_cred (xdrs, cred)); + ATTEMPT (INTUSE(xdr_authdes_cred) (xdrs, cred)); len = (2 + 1) * BYTES_PER_XDR_UNIT; if ((ixdr = xdr_inline (xdrs, 2 * BYTES_PER_XDR_UNIT)) != NULL) @@ -322,7 +322,7 @@ authdes_marshal (AUTH *auth, XDR *xdrs) ATTEMPT (xdr_putint32 (xdrs, &auth->ah_verf.oa_flavor)); ATTEMPT (xdr_putint32 (xdrs, &len)); } - ATTEMPT (xdr_authdes_verf (xdrs, verf)); + ATTEMPT (INTUSE(xdr_authdes_verf) (xdrs, verf)); return TRUE; } diff --git a/sunrpc/auth_none.c b/sunrpc/auth_none.c index 0983b95..b235ec3 100644 --- a/sunrpc/auth_none.c +++ b/sunrpc/auth_none.c @@ -87,10 +87,10 @@ authnone_create (void) ap->no_client.ah_cred = ap->no_client.ah_verf = _null_auth; ap->no_client.ah_ops = &ops; xdrs = &xdr_stream; - xdrmem_create (xdrs, ap->marshalled_client, (u_int) MAX_MARSHEL_SIZE, - XDR_ENCODE); - (void) xdr_opaque_auth (xdrs, &ap->no_client.ah_cred); - (void) xdr_opaque_auth (xdrs, &ap->no_client.ah_verf); + INTUSE(xdrmem_create) (xdrs, ap->marshalled_client, + (u_int) MAX_MARSHEL_SIZE, XDR_ENCODE); + (void) INTUSE(xdr_opaque_auth) (xdrs, &ap->no_client.ah_cred); + (void) INTUSE(xdr_opaque_auth) (xdrs, &ap->no_client.ah_verf); ap->mcnt = XDR_GETPOS (xdrs); XDR_DESTROY (xdrs); } diff --git a/sunrpc/auth_unix.c b/sunrpc/auth_unix.c index bcfa0c9..aae372c 100644 --- a/sunrpc/auth_unix.c +++ b/sunrpc/auth_unix.c @@ -139,8 +139,8 @@ no_memory: /* * Serialize the parameters into origcred */ - xdrmem_create (&xdrs, mymem, MAX_AUTH_BYTES, XDR_ENCODE); - if (!xdr_authunix_parms (&xdrs, &aup)) + INTUSE(xdrmem_create) (&xdrs, mymem, MAX_AUTH_BYTES, XDR_ENCODE); + if (!INTUSE(xdr_authunix_parms) (&xdrs, &aup)) abort (); au->au_origcred.oa_length = len = XDR_GETPOS (&xdrs); au->au_origcred.oa_flavor = AUTH_UNIX; @@ -212,8 +212,8 @@ authunix_validate (AUTH *auth, struct opaque_auth *verf) if (verf->oa_flavor == AUTH_SHORT) { au = AUTH_PRIVATE (auth); - xdrmem_create (&xdrs, verf->oa_base, verf->oa_length, - XDR_DECODE); + INTUSE(xdrmem_create) (&xdrs, verf->oa_base, verf->oa_length, + XDR_DECODE); if (au->au_shcred.oa_base != NULL) { @@ -221,14 +221,14 @@ authunix_validate (AUTH *auth, struct opaque_auth *verf) au->au_shcred.oa_length); au->au_shcred.oa_base = NULL; } - if (xdr_opaque_auth (&xdrs, &au->au_shcred)) + if (INTUSE(xdr_opaque_auth) (&xdrs, &au->au_shcred)) { auth->ah_cred = au->au_shcred; } else { xdrs.x_op = XDR_FREE; - (void) xdr_opaque_auth (&xdrs, &au->au_shcred); + (void) INTUSE(xdr_opaque_auth) (&xdrs, &au->au_shcred); au->au_shcred.oa_base = NULL; auth->ah_cred = au->au_origcred; } @@ -256,9 +256,9 @@ authunix_refresh (AUTH *auth) /* first deserialize the creds back into a struct authunix_parms */ aup.aup_machname = NULL; aup.aup_gids = (gid_t *) NULL; - xdrmem_create (&xdrs, au->au_origcred.oa_base, - au->au_origcred.oa_length, XDR_DECODE); - stat = xdr_authunix_parms (&xdrs, &aup); + INTUSE(xdrmem_create) (&xdrs, au->au_origcred.oa_base, + au->au_origcred.oa_length, XDR_DECODE); + stat = INTUSE(xdr_authunix_parms) (&xdrs, &aup); if (!stat) goto done; @@ -267,7 +267,7 @@ authunix_refresh (AUTH *auth) aup.aup_time = now.tv_sec; xdrs.x_op = XDR_ENCODE; XDR_SETPOS (&xdrs, 0); - stat = xdr_authunix_parms (&xdrs, &aup); + stat = INTUSE(xdr_authunix_parms) (&xdrs, &aup); if (!stat) goto done; auth->ah_cred = au->au_origcred; @@ -275,7 +275,7 @@ authunix_refresh (AUTH *auth) done: /* free the struct authunix_parms created by deserializing */ xdrs.x_op = XDR_FREE; - (void) xdr_authunix_parms (&xdrs, &aup); + (void) INTUSE(xdr_authunix_parms) (&xdrs, &aup); XDR_DESTROY (&xdrs); return stat; } @@ -310,9 +310,9 @@ marshal_new_auth (AUTH *auth) XDR *xdrs = &xdr_stream; struct audata *au = AUTH_PRIVATE (auth); - xdrmem_create (xdrs, au->au_marshed, MAX_AUTH_BYTES, XDR_ENCODE); - if ((!xdr_opaque_auth (xdrs, &(auth->ah_cred))) || - (!xdr_opaque_auth (xdrs, &(auth->ah_verf)))) + INTUSE(xdrmem_create) (xdrs, au->au_marshed, MAX_AUTH_BYTES, XDR_ENCODE); + if ((!INTUSE(xdr_opaque_auth) (xdrs, &(auth->ah_cred))) || + (!INTUSE(xdr_opaque_auth) (xdrs, &(auth->ah_verf)))) perror (_("auth_none.c - Fatal marshalling problem")); else au->au_mpos = XDR_GETPOS (xdrs); diff --git a/sunrpc/authdes_prot.c b/sunrpc/authdes_prot.c index 6c79fc2..a889108 100644 --- a/sunrpc/authdes_prot.c +++ b/sunrpc/authdes_prot.c @@ -46,21 +46,26 @@ xdr_authdes_cred (XDR *xdrs, struct authdes_cred *cred) /* * Unrolled xdr */ - ATTEMPT (xdr_enum (xdrs, (enum_t *) & cred->adc_namekind)); + ATTEMPT (INTUSE(xdr_enum) (xdrs, (enum_t *) & cred->adc_namekind)); switch (cred->adc_namekind) { case ADN_FULLNAME: - ATTEMPT (xdr_string (xdrs, &cred->adc_fullname.name, MAXNETNAMELEN)); - ATTEMPT (xdr_opaque (xdrs, (caddr_t) & cred->adc_fullname.key, sizeof (des_block))); - ATTEMPT (xdr_opaque (xdrs, (caddr_t) & cred->adc_fullname.window, sizeof (cred->adc_fullname.window))); + ATTEMPT (INTUSE(xdr_string) (xdrs, &cred->adc_fullname.name, + MAXNETNAMELEN)); + ATTEMPT (INTUSE(xdr_opaque) (xdrs, (caddr_t) & cred->adc_fullname.key, + sizeof (des_block))); + ATTEMPT (INTUSE(xdr_opaque) (xdrs, (caddr_t) & cred->adc_fullname.window, + sizeof (cred->adc_fullname.window))); return (TRUE); case ADN_NICKNAME: - ATTEMPT (xdr_opaque (xdrs, (caddr_t) & cred->adc_nickname, sizeof (cred->adc_nickname))); + ATTEMPT (INTUSE(xdr_opaque) (xdrs, (caddr_t) & cred->adc_nickname, + sizeof (cred->adc_nickname))); return TRUE; default: return FALSE; } } +INTDEF(xdr_authdes_cred) bool_t @@ -69,9 +74,10 @@ xdr_authdes_verf (register XDR *xdrs, register struct authdes_verf *verf) /* * Unrolled xdr */ - ATTEMPT (xdr_opaque (xdrs, (caddr_t) & verf->adv_xtimestamp, - sizeof (des_block))); - ATTEMPT (xdr_opaque (xdrs, (caddr_t) & verf->adv_int_u, - sizeof (verf->adv_int_u))); + ATTEMPT (INTUSE(xdr_opaque) (xdrs, (caddr_t) & verf->adv_xtimestamp, + sizeof (des_block))); + ATTEMPT (INTUSE(xdr_opaque) (xdrs, (caddr_t) & verf->adv_int_u, + sizeof (verf->adv_int_u))); return TRUE; } +INTDEF(xdr_authdes_verf) diff --git a/sunrpc/authuxprot.c b/sunrpc/authuxprot.c index b033c56..60d3ddb 100644 --- a/sunrpc/authuxprot.c +++ b/sunrpc/authuxprot.c @@ -46,20 +46,22 @@ bool_t xdr_authunix_parms (XDR * xdrs, struct authunix_parms *p) { - if (xdr_u_long (xdrs, &(p->aup_time)) - && xdr_string (xdrs, &(p->aup_machname), MAX_MACHINE_NAME) + if (INTUSE(xdr_u_long) (xdrs, &(p->aup_time)) + && INTUSE(xdr_string) (xdrs, &(p->aup_machname), MAX_MACHINE_NAME) && (sizeof (uid_t) == sizeof (short int) - ? xdr_u_short (xdrs, (u_short *) & (p->aup_uid)) - : xdr_u_int (xdrs, (u_int *) & (p->aup_uid))) + ? INTUSE(xdr_u_short) (xdrs, (u_short *) & (p->aup_uid)) + : INTUSE(xdr_u_int) (xdrs, (u_int *) & (p->aup_uid))) && (sizeof (gid_t) == sizeof (short int) - ? xdr_u_short (xdrs, (u_short *) & (p->aup_gid)) - : xdr_u_int (xdrs, (u_int *) & (p->aup_gid))) - && xdr_array (xdrs, (caddr_t *) & (p->aup_gids), - & (p->aup_len), NGRPS, sizeof (gid_t), - (sizeof (gid_t) == sizeof (short int) - ? (xdrproc_t) xdr_u_short : (xdrproc_t) xdr_u_int))) + ? INTUSE(xdr_u_short) (xdrs, (u_short *) & (p->aup_gid)) + : INTUSE(xdr_u_int) (xdrs, (u_int *) & (p->aup_gid))) + && INTUSE(xdr_array) (xdrs, (caddr_t *) & (p->aup_gids), + & (p->aup_len), NGRPS, sizeof (gid_t), + (sizeof (gid_t) == sizeof (short int) + ? (xdrproc_t) INTUSE(xdr_u_short) + : (xdrproc_t) INTUSE(xdr_u_int)))) { return TRUE; } return FALSE; } +INTDEF(xdr_authunix_parms) diff --git a/sunrpc/clnt_perr.c b/sunrpc/clnt_perr.c index 4164539..4e2efaf 100644 --- a/sunrpc/clnt_perr.c +++ b/sunrpc/clnt_perr.c @@ -45,7 +45,7 @@ static char sccsid[] = "@(#)clnt_perror.c 1.15 87/10/07 Copyr 1984 Sun Micro"; #ifdef USE_IN_LIBIO # include # include -# define fputs(s, f) _IO_fputs (s, f) +# define fputs(s, f) INTUSE(_IO_fputs) (s, f) #endif static char *auth_errmsg (enum auth_stat stat) internal_function; diff --git a/sunrpc/clnt_raw.c b/sunrpc/clnt_raw.c index ee70e95..5b1fb4b7 100644 --- a/sunrpc/clnt_raw.c +++ b/sunrpc/clnt_raw.c @@ -109,8 +109,8 @@ clntraw_create (u_long prog, u_long vers) call_msg.rm_call.cb_rpcvers = RPC_MSG_VERSION; call_msg.rm_call.cb_prog = prog; call_msg.rm_call.cb_vers = vers; - xdrmem_create (xdrs, clp->mashl_callmsg, MCALL_MSG_SIZE, XDR_ENCODE); - if (!xdr_callhdr (xdrs, &call_msg)) + INTUSE(xdrmem_create) (xdrs, clp->mashl_callmsg, MCALL_MSG_SIZE, XDR_ENCODE); + if (!INTUSE(xdr_callhdr) (xdrs, &call_msg)) { perror (_ ("clnt_raw.c - Fatal header serialization error.")); } @@ -120,7 +120,7 @@ clntraw_create (u_long prog, u_long vers) /* * Set xdrmem for client/server shared buffer */ - xdrmem_create (xdrs, clp->_raw_buf, UDPMSGSIZE, XDR_FREE); + INTUSE(xdrmem_create) (xdrs, clp->_raw_buf, UDPMSGSIZE, XDR_FREE); /* * create client handle @@ -178,7 +178,7 @@ call_again: msg.acpted_rply.ar_verf = _null_auth; msg.acpted_rply.ar_results.where = resultsp; msg.acpted_rply.ar_results.proc = xresults; - if (!xdr_replymsg (xdrs, &msg)) + if (!INTUSE(xdr_replymsg) (xdrs, &msg)) return RPC_CANTDECODERES; _seterr_reply (&msg, &error); status = error.re_status; @@ -205,7 +205,7 @@ call_again: if (msg.acpted_rply.ar_verf.oa_base != NULL) { xdrs->x_op = XDR_FREE; - (void) xdr_opaque_auth (xdrs, &(msg.acpted_rply.ar_verf)); + (void) INTUSE(xdr_opaque_auth) (xdrs, &(msg.acpted_rply.ar_verf)); } } diff --git a/sunrpc/clnt_tcp.c b/sunrpc/clnt_tcp.c index 6267dc7..8c09a15 100644 --- a/sunrpc/clnt_tcp.c +++ b/sunrpc/clnt_tcp.c @@ -200,9 +200,9 @@ clnttcp_create (struct sockaddr_in *raddr, u_long prog, u_long vers, /* * pre-serialize the static part of the call msg and stash it away */ - xdrmem_create (&(ct->ct_xdrs), ct->ct_mcall, MCALL_MSG_SIZE, + INTUSE(xdrmem_create) (&(ct->ct_xdrs), ct->ct_mcall, MCALL_MSG_SIZE, XDR_ENCODE); - if (!xdr_callhdr (&(ct->ct_xdrs), &call_msg)) + if (!INTUSE(xdr_callhdr) (&(ct->ct_xdrs), &call_msg)) { if (ct->ct_closeit) { @@ -217,8 +217,8 @@ clnttcp_create (struct sockaddr_in *raddr, u_long prog, u_long vers, * Create a client handle which uses xdrrec for serialization * and authnone for authentication. */ - xdrrec_create (&(ct->ct_xdrs), sendsz, recvsz, - (caddr_t) ct, readtcp, writetcp); + INTUSE(xdrrec_create) (&(ct->ct_xdrs), sendsz, recvsz, + (caddr_t) ct, readtcp, writetcp); h->cl_ops = &tcp_ops; h->cl_private = (caddr_t) ct; h->cl_auth = authnone_create (); @@ -271,10 +271,10 @@ call_again: { if (ct->ct_error.re_status == RPC_SUCCESS) ct->ct_error.re_status = RPC_CANTENCODEARGS; - (void) xdrrec_endofrecord (xdrs, TRUE); + (void) INTUSE(xdrrec_endofrecord) (xdrs, TRUE); return (ct->ct_error.re_status); } - if (!xdrrec_endofrecord (xdrs, shipnow)) + if (!INTUSE(xdrrec_endofrecord) (xdrs, shipnow)) return ct->ct_error.re_status = RPC_CANTSEND; if (!shipnow) return RPC_SUCCESS; @@ -295,11 +295,11 @@ call_again: { reply_msg.acpted_rply.ar_verf = _null_auth; reply_msg.acpted_rply.ar_results.where = NULL; - reply_msg.acpted_rply.ar_results.proc = (xdrproc_t)xdr_void; - if (!xdrrec_skiprecord (xdrs)) + reply_msg.acpted_rply.ar_results.proc = (xdrproc_t)INTUSE(xdr_void); + if (!INTUSE(xdrrec_skiprecord) (xdrs)) return (ct->ct_error.re_status); /* now decode and validate the response header */ - if (!xdr_replymsg (xdrs, &reply_msg)) + if (!INTUSE(xdr_replymsg) (xdrs, &reply_msg)) { if (ct->ct_error.re_status == RPC_SUCCESS) continue; @@ -329,7 +329,8 @@ call_again: if (reply_msg.acpted_rply.ar_verf.oa_base != NULL) { xdrs->x_op = XDR_FREE; - (void) xdr_opaque_auth (xdrs, &(reply_msg.acpted_rply.ar_verf)); + (void) INTUSE(xdr_opaque_auth) (xdrs, + &(reply_msg.acpted_rply.ar_verf)); } } /* end successful completion */ else diff --git a/sunrpc/clnt_udp.c b/sunrpc/clnt_udp.c index 94b6721..82fd3ee 100644 --- a/sunrpc/clnt_udp.c +++ b/sunrpc/clnt_udp.c @@ -172,9 +172,8 @@ clntudp_bufcreate (struct sockaddr_in *raddr, u_long program, u_long version, call_msg.rm_call.cb_rpcvers = RPC_MSG_VERSION; call_msg.rm_call.cb_prog = program; call_msg.rm_call.cb_vers = version; - xdrmem_create (&(cu->cu_outxdrs), cu->cu_outbuf, - sendsz, XDR_ENCODE); - if (!xdr_callhdr (&(cu->cu_outxdrs), &call_msg)) + INTUSE(xdrmem_create) (&(cu->cu_outxdrs), cu->cu_outbuf, sendsz, XDR_ENCODE); + if (!INTUSE(xdr_callhdr) (&(cu->cu_outxdrs), &call_msg)) { goto fooy; } @@ -448,8 +447,8 @@ send_again: /* * now decode and validate the response */ - xdrmem_create (&reply_xdrs, cu->cu_inbuf, (u_int) inlen, XDR_DECODE); - ok = xdr_replymsg (&reply_xdrs, &reply_msg); + INTUSE(xdrmem_create) (&reply_xdrs, cu->cu_inbuf, (u_int) inlen, XDR_DECODE); + ok = INTUSE(xdr_replymsg) (&reply_xdrs, &reply_msg); /* XDR_DESTROY(&reply_xdrs); save a few cycles on noop destroy */ if (ok) { @@ -465,8 +464,8 @@ send_again: if (reply_msg.acpted_rply.ar_verf.oa_base != NULL) { xdrs->x_op = XDR_FREE; - (void) xdr_opaque_auth (xdrs, - &(reply_msg.acpted_rply.ar_verf)); + (void) INTUSE(xdr_opaque_auth) (xdrs, + &(reply_msg.acpted_rply.ar_verf)); } } /* end successful completion */ else diff --git a/sunrpc/clnt_unix.c b/sunrpc/clnt_unix.c index 64a97a1..8c2fa40 100644 --- a/sunrpc/clnt_unix.c +++ b/sunrpc/clnt_unix.c @@ -181,8 +181,9 @@ clntunix_create (struct sockaddr_un *raddr, u_long prog, u_long vers, /* * pre-serialize the static part of the call msg and stash it away */ - xdrmem_create (&(ct->ct_xdrs), ct->ct_mcall, MCALL_MSG_SIZE, XDR_ENCODE); - if (!xdr_callhdr (&(ct->ct_xdrs), &call_msg)) + INTUSE(xdrmem_create) (&(ct->ct_xdrs), ct->ct_mcall, MCALL_MSG_SIZE, + XDR_ENCODE); + if (!INTUSE(xdr_callhdr) (&(ct->ct_xdrs), &call_msg)) { if (ct->ct_closeit) __close (*sockp); @@ -195,8 +196,8 @@ clntunix_create (struct sockaddr_un *raddr, u_long prog, u_long vers, * Create a client handle which uses xdrrec for serialization * and authnone for authentication. */ - xdrrec_create (&(ct->ct_xdrs), sendsz, recvsz, - (caddr_t) ct, readunix, writeunix); + INTUSE(xdrrec_create) (&(ct->ct_xdrs), sendsz, recvsz, + (caddr_t) ct, readunix, writeunix); h->cl_ops = &unix_ops; h->cl_private = (caddr_t) ct; h->cl_auth = authnone_create (); @@ -249,10 +250,10 @@ call_again: { if (ct->ct_error.re_status == RPC_SUCCESS) ct->ct_error.re_status = RPC_CANTENCODEARGS; - (void) xdrrec_endofrecord (xdrs, TRUE); + (void) INTUSE(xdrrec_endofrecord) (xdrs, TRUE); return ct->ct_error.re_status; } - if (!xdrrec_endofrecord (xdrs, shipnow)) + if (!INTUSE(xdrrec_endofrecord) (xdrs, shipnow)) return ct->ct_error.re_status = RPC_CANTSEND; if (!shipnow) return RPC_SUCCESS; @@ -271,11 +272,11 @@ call_again: { reply_msg.acpted_rply.ar_verf = _null_auth; reply_msg.acpted_rply.ar_results.where = NULL; - reply_msg.acpted_rply.ar_results.proc = (xdrproc_t)xdr_void; - if (!xdrrec_skiprecord (xdrs)) + reply_msg.acpted_rply.ar_results.proc = (xdrproc_t)INTUSE(xdr_void); + if (!INTUSE(xdrrec_skiprecord) (xdrs)) return ct->ct_error.re_status; /* now decode and validate the response header */ - if (!xdr_replymsg (xdrs, &reply_msg)) + if (!INTUSE(xdr_replymsg) (xdrs, &reply_msg)) { if (ct->ct_error.re_status == RPC_SUCCESS) continue; @@ -305,7 +306,8 @@ call_again: if (reply_msg.acpted_rply.ar_verf.oa_base != NULL) { xdrs->x_op = XDR_FREE; - (void) xdr_opaque_auth (xdrs, &(reply_msg.acpted_rply.ar_verf)); + (void) INTUSE(xdr_opaque_auth) (xdrs, + &(reply_msg.acpted_rply.ar_verf)); } } /* end successful completion */ else diff --git a/sunrpc/key_call.c b/sunrpc/key_call.c index 5df8f6f..61c13ec 100644 --- a/sunrpc/key_call.c +++ b/sunrpc/key_call.c @@ -75,8 +75,8 @@ key_setsecret (char *secretkey) { keystatus status; - if (!key_call ((u_long) KEY_SET, (xdrproc_t) xdr_keybuf, secretkey, - (xdrproc_t) xdr_keystatus, (char *) &status)) + if (!key_call ((u_long) KEY_SET, (xdrproc_t) INTUSE(xdr_keybuf), secretkey, + (xdrproc_t) INTUSE(xdr_keystatus), (char *) &status)) return -1; if (status != KEY_SUCCESS) { @@ -98,8 +98,9 @@ key_secretkey_is_set (void) struct key_netstres kres; memset (&kres, 0, sizeof (kres)); - if (key_call ((u_long) KEY_NET_GET, (xdrproc_t) xdr_void, (char *) NULL, - (xdrproc_t) xdr_key_netstres, (char *) &kres) && + if (key_call ((u_long) KEY_NET_GET, (xdrproc_t) INTUSE(xdr_void), + (char *) NULL, (xdrproc_t) INTUSE(xdr_key_netstres), + (char *) &kres) && (kres.status == KEY_SUCCESS) && (kres.key_netstres_u.knet.st_priv_key[0] != 0)) { @@ -118,8 +119,9 @@ key_encryptsession (char *remotename, des_block *deskey) arg.remotename = remotename; arg.deskey = *deskey; - if (!key_call ((u_long) KEY_ENCRYPT, (xdrproc_t) xdr_cryptkeyarg, - (char *) &arg, (xdrproc_t) xdr_cryptkeyres, (char *) &res)) + if (!key_call ((u_long) KEY_ENCRYPT, (xdrproc_t) INTUSE(xdr_cryptkeyarg), + (char *) &arg, (xdrproc_t) INTUSE(xdr_cryptkeyres), + (char *) &res)) return -1; if (res.status != KEY_SUCCESS) @@ -139,8 +141,9 @@ key_decryptsession (char *remotename, des_block *deskey) arg.remotename = remotename; arg.deskey = *deskey; - if (!key_call ((u_long) KEY_DECRYPT, (xdrproc_t) xdr_cryptkeyarg, - (char *) &arg, (xdrproc_t) xdr_cryptkeyres, (char *) &res)) + if (!key_call ((u_long) KEY_DECRYPT, (xdrproc_t) INTUSE(xdr_cryptkeyarg), + (char *) &arg, (xdrproc_t) INTUSE(xdr_cryptkeyres), + (char *) &res)) return -1; if (res.status != KEY_SUCCESS) { @@ -161,8 +164,9 @@ key_encryptsession_pk (char *remotename, netobj *remotekey, arg.remotename = remotename; arg.remotekey = *remotekey; arg.deskey = *deskey; - if (!key_call ((u_long) KEY_ENCRYPT_PK, (xdrproc_t) xdr_cryptkeyarg2, - (char *) &arg, (xdrproc_t) xdr_cryptkeyres, (char *) &res)) + if (!key_call ((u_long) KEY_ENCRYPT_PK, (xdrproc_t) INTUSE(xdr_cryptkeyarg2), + (char *) &arg, (xdrproc_t) INTUSE(xdr_cryptkeyres), + (char *) &res)) return -1; if (res.status != KEY_SUCCESS) @@ -184,8 +188,9 @@ key_decryptsession_pk (char *remotename, netobj *remotekey, arg.remotename = remotename; arg.remotekey = *remotekey; arg.deskey = *deskey; - if (!key_call ((u_long) KEY_DECRYPT_PK, (xdrproc_t) xdr_cryptkeyarg2, - (char *) &arg, (xdrproc_t) xdr_cryptkeyres, (char *) &res)) + if (!key_call ((u_long) KEY_DECRYPT_PK, (xdrproc_t) INTUSE(xdr_cryptkeyarg2), + (char *) &arg, (xdrproc_t) INTUSE(xdr_cryptkeyres), + (char *) &res)) return -1; if (res.status != KEY_SUCCESS) @@ -216,8 +221,9 @@ key_gendes (des_block *key) if (client == NULL) return -1; - stat = clnt_call (client, KEY_GEN, (xdrproc_t) xdr_void, NULL, - (xdrproc_t) xdr_des_block, (caddr_t) key, tottimeout); + stat = clnt_call (client, KEY_GEN, (xdrproc_t) INTUSE(xdr_void), NULL, + (xdrproc_t) INTUSE(xdr_des_block), (caddr_t) key, + tottimeout); clnt_destroy (client); __close (socket); if (stat != RPC_SUCCESS) @@ -231,8 +237,9 @@ key_setnet (struct key_netstarg *arg) { keystatus status; - if (!key_call ((u_long) KEY_NET_PUT, (xdrproc_t) xdr_key_netstarg, - (char *) arg,(xdrproc_t) xdr_keystatus, (char *) &status)) + if (!key_call ((u_long) KEY_NET_PUT, (xdrproc_t) INTUSE(xdr_key_netstarg), + (char *) arg,(xdrproc_t) INTUSE(xdr_keystatus), + (char *) &status)) return -1; if (status != KEY_SUCCESS) @@ -248,8 +255,8 @@ key_get_conv (char *pkey, des_block *deskey) { cryptkeyres res; - if (!key_call ((u_long) KEY_GET_CONV, (xdrproc_t) xdr_keybuf, pkey, - (xdrproc_t) xdr_cryptkeyres, (char *) &res)) + if (!key_call ((u_long) KEY_GET_CONV, (xdrproc_t) INTUSE(xdr_keybuf), pkey, + (xdrproc_t) INTUSE(xdr_cryptkeyres), (char *) &res)) return -1; if (res.status != KEY_SUCCESS) @@ -317,7 +324,7 @@ key_call_keyenvoy (u_long proc, xdrproc_t xdr_arg, char *arg, xdrstdio_create (&xdrargs, fargs, XDR_ENCODE); xdrstdio_create (&xdrrslt, frslt, XDR_DECODE); - if (!xdr_u_long (&xdrargs, &proc) || !(*xdr_arg) (&xdrargs, arg)) + if (!INTUSE(xdr_u_long) (&xdrargs, &proc) || !(*xdr_arg) (&xdrargs, arg)) { debug ("xdr args"); success = 0; @@ -514,7 +521,8 @@ key_call_door (u_long proc, xdrproc_t xdr_arg, char *arg, if (data_ptr == NULL) return 0; - xdrmem_create (&xdrs, &data_ptr[2 * sizeof (u_long)], data_len, XDR_ENCODE); + INTUSE(xdrmem_create) (&xdrs, &data_ptr[2 * sizeof (u_long)], data_len, + XDR_ENCODE); if (!xdr_arg (&xdrs, arg)) { xdr_destroy (&xdrs); @@ -545,8 +553,8 @@ key_call_door (u_long proc, xdrproc_t xdr_arg, char *arg, return 0; memcpy (&data_len, &args.data_ptr[sizeof (u_long)], sizeof (u_long)); - xdrmem_create (&xdrs, &args.data_ptr[2 * sizeof (u_long)], - data_len, XDR_DECODE); + INTUSE(xdrmem_create) (&xdrs, &args.data_ptr[2 * sizeof (u_long)], + data_len, XDR_DECODE); if (!xdr_rslt (&xdrs, rslt)) { xdr_destroy (&xdrs); diff --git a/sunrpc/key_prot.c b/sunrpc/key_prot.c index 664013a..56a5414 100644 --- a/sunrpc/key_prot.c +++ b/sunrpc/key_prot.c @@ -37,63 +37,68 @@ bool_t xdr_keystatus (XDR * xdrs, keystatus * objp) { - if (!xdr_enum (xdrs, (enum_t *) objp)) + if (!INTUSE(xdr_enum) (xdrs, (enum_t *) objp)) return FALSE; return TRUE; } +INTDEF(xdr_keystatus) bool_t xdr_keybuf (XDR * xdrs, keybuf objp) { - if (!xdr_opaque (xdrs, objp, HEXKEYBYTES)) + if (!INTUSE(xdr_opaque) (xdrs, objp, HEXKEYBYTES)) return FALSE; return TRUE; } +INTDEF(xdr_keybuf) bool_t xdr_netnamestr (XDR * xdrs, netnamestr * objp) { - if (!xdr_string (xdrs, objp, MAXNETNAMELEN)) + if (!INTUSE(xdr_string) (xdrs, objp, MAXNETNAMELEN)) return FALSE; return TRUE; } +INTDEF(xdr_netnamestr) bool_t xdr_cryptkeyarg (XDR * xdrs, cryptkeyarg * objp) { - if (!xdr_netnamestr (xdrs, &objp->remotename)) + if (!INTUSE(xdr_netnamestr) (xdrs, &objp->remotename)) return FALSE; - if (!xdr_des_block (xdrs, &objp->deskey)) + if (!INTUSE(xdr_des_block) (xdrs, &objp->deskey)) return FALSE; return TRUE; } +INTDEF(xdr_cryptkeyarg) bool_t xdr_cryptkeyarg2 (XDR * xdrs, cryptkeyarg2 * objp) { - if (!xdr_netnamestr (xdrs, &objp->remotename)) + if (!INTUSE(xdr_netnamestr) (xdrs, &objp->remotename)) return FALSE; - if (!xdr_netobj (xdrs, &objp->remotekey)) + if (!INTUSE(xdr_netobj) (xdrs, &objp->remotekey)) return FALSE; - if (!xdr_des_block (xdrs, &objp->deskey)) + if (!INTUSE(xdr_des_block) (xdrs, &objp->deskey)) return FALSE; return TRUE; } +INTDEF(xdr_cryptkeyarg2) bool_t xdr_cryptkeyres (XDR * xdrs, cryptkeyres * objp) { - if (!xdr_keystatus (xdrs, &objp->status)) + if (!INTUSE(xdr_keystatus) (xdrs, &objp->status)) return FALSE; switch (objp->status) { case KEY_SUCCESS: - if (!xdr_des_block (xdrs, &objp->cryptkeyres_u.deskey)) + if (!INTUSE(xdr_des_block) (xdrs, &objp->cryptkeyres_u.deskey)) return FALSE; break; default: @@ -101,30 +106,32 @@ xdr_cryptkeyres (XDR * xdrs, cryptkeyres * objp) } return TRUE; } +INTDEF(xdr_cryptkeyres) bool_t xdr_unixcred (XDR * xdrs, unixcred * objp) { - if (!xdr_u_int (xdrs, &objp->uid)) + if (!INTUSE(xdr_u_int) (xdrs, &objp->uid)) return FALSE; - if (!xdr_u_int (xdrs, &objp->gid)) + if (!INTUSE(xdr_u_int) (xdrs, &objp->gid)) return FALSE; - if (!xdr_array (xdrs, (char **) &objp->gids.gids_val, - (u_int *) & objp->gids.gids_len, MAXGIDS, - sizeof (u_int), (xdrproc_t) xdr_u_int)) + if (!INTUSE(xdr_array) (xdrs, (char **) &objp->gids.gids_val, + (u_int *) & objp->gids.gids_len, MAXGIDS, + sizeof (u_int), (xdrproc_t) INTUSE(xdr_u_int))) return FALSE; return TRUE; } +INTDEF(xdr_unixcred) bool_t xdr_getcredres (XDR * xdrs, getcredres * objp) { - if (!xdr_keystatus (xdrs, &objp->status)) + if (!INTUSE(xdr_keystatus) (xdrs, &objp->status)) return FALSE; switch (objp->status) { case KEY_SUCCESS: - if (!xdr_unixcred (xdrs, &objp->getcredres_u.cred)) + if (!INTUSE(xdr_unixcred) (xdrs, &objp->getcredres_u.cred)) return FALSE; break; default: @@ -136,24 +143,25 @@ xdr_getcredres (XDR * xdrs, getcredres * objp) bool_t xdr_key_netstarg (XDR * xdrs, key_netstarg * objp) { - if (!xdr_keybuf (xdrs, objp->st_priv_key)) + if (!INTUSE(xdr_keybuf) (xdrs, objp->st_priv_key)) return FALSE; - if (!xdr_keybuf (xdrs, objp->st_pub_key)) + if (!INTUSE(xdr_keybuf) (xdrs, objp->st_pub_key)) return FALSE; - if (!xdr_netnamestr (xdrs, &objp->st_netname)) + if (!INTUSE(xdr_netnamestr) (xdrs, &objp->st_netname)) return FALSE; return TRUE; } +INTDEF(xdr_key_netstarg) bool_t xdr_key_netstres (XDR * xdrs, key_netstres * objp) { - if (!xdr_keystatus (xdrs, &objp->status)) + if (!INTUSE(xdr_keystatus) (xdrs, &objp->status)) return FALSE; switch (objp->status) { case KEY_SUCCESS: - if (!xdr_key_netstarg (xdrs, &objp->key_netstres_u.knet)) + if (!INTUSE(xdr_key_netstarg) (xdrs, &objp->key_netstres_u.knet)) return FALSE; break; default: @@ -161,3 +169,4 @@ xdr_key_netstres (XDR * xdrs, key_netstres * objp) } return TRUE; } +INTDEF(xdr_key_netstres) diff --git a/sunrpc/openchild.c b/sunrpc/openchild.c index 4b5a0a5..16f6a34 100644 --- a/sunrpc/openchild.c +++ b/sunrpc/openchild.c @@ -45,8 +45,8 @@ #ifdef USE_IN_LIBIO # include -# define fflush(s) _IO_fflush (s) -# define __fdopen(fd,m) _IO_fdopen (fd,m) +# define fflush(s) INTUSE(_IO_fflush) (s) +# define __fdopen(fd,m) INTUSE(_IO_fdopen) (fd,m) #endif /* diff --git a/sunrpc/pm_getmaps.c b/sunrpc/pm_getmaps.c index 8f41a45..987ed5f 100644 --- a/sunrpc/pm_getmaps.c +++ b/sunrpc/pm_getmaps.c @@ -67,8 +67,8 @@ pmap_getmaps (struct sockaddr_in *address) PMAPVERS, &socket, 50, 500); if (client != (CLIENT *) NULL) { - if (CLNT_CALL (client, PMAPPROC_DUMP, (xdrproc_t)xdr_void, NULL, - (xdrproc_t)xdr_pmaplist, (caddr_t)&head, + if (CLNT_CALL (client, PMAPPROC_DUMP, (xdrproc_t)INTUSE(xdr_void), NULL, + (xdrproc_t)INTUSE(xdr_pmaplist), (caddr_t)&head, minutetimeout) != RPC_SUCCESS) { clnt_perror (client, _("pmap_getmaps rpc problem")); diff --git a/sunrpc/pm_getport.c b/sunrpc/pm_getport.c index b86472c..c26183d 100644 --- a/sunrpc/pm_getport.c +++ b/sunrpc/pm_getport.c @@ -75,8 +75,8 @@ pmap_getport (address, program, version, protocol) parms.pm_vers = version; parms.pm_prot = protocol; parms.pm_port = 0; /* not needed or used */ - if (CLNT_CALL (client, PMAPPROC_GETPORT, (xdrproc_t)xdr_pmap, - (caddr_t)&parms, (xdrproc_t)xdr_u_short, + if (CLNT_CALL (client, PMAPPROC_GETPORT, (xdrproc_t)INTUSE(xdr_pmap), + (caddr_t)&parms, (xdrproc_t)INTUSE(xdr_u_short), (caddr_t)&port, tottimeout) != RPC_SUCCESS) { ce->cf_stat = RPC_PMAPFAILURE; diff --git a/sunrpc/pmap_clnt.c b/sunrpc/pmap_clnt.c index 4db0f02..6e2c035 100644 --- a/sunrpc/pmap_clnt.c +++ b/sunrpc/pmap_clnt.c @@ -129,8 +129,8 @@ pmap_set (u_long program, u_long version, int protocol, u_short port) parms.pm_vers = version; parms.pm_prot = protocol; parms.pm_port = port; - if (CLNT_CALL (client, PMAPPROC_SET, (xdrproc_t)xdr_pmap, (caddr_t)&parms, - (xdrproc_t)xdr_bool, (caddr_t)&rslt, + if (CLNT_CALL (client, PMAPPROC_SET, (xdrproc_t)INTUSE(xdr_pmap), + (caddr_t)&parms, (xdrproc_t)INTUSE(xdr_bool), (caddr_t)&rslt, tottimeout) != RPC_SUCCESS) { clnt_perror (client, _("Cannot register service")); @@ -163,8 +163,9 @@ pmap_unset (u_long program, u_long version) parms.pm_prog = program; parms.pm_vers = version; parms.pm_port = parms.pm_prot = 0; - CLNT_CALL (client, PMAPPROC_UNSET, (xdrproc_t)xdr_pmap, (caddr_t)&parms, - (xdrproc_t)xdr_bool, (caddr_t)&rslt, tottimeout); + CLNT_CALL (client, PMAPPROC_UNSET, (xdrproc_t)INTUSE(xdr_pmap), + (caddr_t)&parms, (xdrproc_t)INTUSE(xdr_bool), (caddr_t)&rslt, + tottimeout); CLNT_DESTROY (client); /* (void)close(socket); CLNT_DESTROY already closed it */ return rslt; diff --git a/sunrpc/pmap_prot.c b/sunrpc/pmap_prot.c index 9829718..3db27a9 100644 --- a/sunrpc/pmap_prot.c +++ b/sunrpc/pmap_prot.c @@ -49,9 +49,10 @@ xdr_pmap (xdrs, regs) struct pmap *regs; { - if (xdr_u_long (xdrs, ®s->pm_prog) && - xdr_u_long (xdrs, ®s->pm_vers) && - xdr_u_long (xdrs, ®s->pm_prot)) - return xdr_u_long (xdrs, ®s->pm_port); + if (INTUSE(xdr_u_long) (xdrs, ®s->pm_prog) && + INTUSE(xdr_u_long) (xdrs, ®s->pm_vers) && + INTUSE(xdr_u_long) (xdrs, ®s->pm_prot)) + return INTUSE(xdr_u_long) (xdrs, ®s->pm_port); return FALSE; } +INTDEF(xdr_pmap) diff --git a/sunrpc/pmap_prot2.c b/sunrpc/pmap_prot2.c index 6cb7c5e..aa1f8eb 100644 --- a/sunrpc/pmap_prot2.c +++ b/sunrpc/pmap_prot2.c @@ -98,7 +98,7 @@ xdr_pmaplist (xdrs, rp) while (TRUE) { more_elements = (bool_t) (*rp != NULL); - if (!xdr_bool (xdrs, &more_elements)) + if (!INTUSE(xdr_bool) (xdrs, &more_elements)) return FALSE; if (!more_elements) return TRUE; /* we are done */ @@ -109,10 +109,11 @@ xdr_pmaplist (xdrs, rp) */ if (freeing) next = &((*rp)->pml_next); - if (!xdr_reference (xdrs, (caddr_t *) rp, - (u_int) sizeof (struct pmaplist), - (xdrproc_t) xdr_pmap)) + if (!INTUSE(xdr_reference) (xdrs, (caddr_t *) rp, + (u_int) sizeof (struct pmaplist), + (xdrproc_t) INTUSE(xdr_pmap))) return FALSE; rp = freeing ? next : &((*rp)->pml_next); } } +INTDEF(xdr_pmaplist) diff --git a/sunrpc/pmap_rmt.c b/sunrpc/pmap_rmt.c index bfc9cc8..2f7592e 100644 --- a/sunrpc/pmap_rmt.c +++ b/sunrpc/pmap_rmt.c @@ -95,8 +95,9 @@ pmap_rmtcall (addr, prog, vers, proc, xdrargs, argsp, xdrres, resp, tout, port_p r.port_ptr = port_ptr; r.results_ptr = resp; r.xdr_results = xdrres; - stat = CLNT_CALL (client, PMAPPROC_CALLIT, (xdrproc_t)xdr_rmtcall_args, - (caddr_t)&a, (xdrproc_t)xdr_rmtcallres, + stat = CLNT_CALL (client, PMAPPROC_CALLIT, + (xdrproc_t)INTUSE(xdr_rmtcall_args), + (caddr_t)&a, (xdrproc_t)INTUSE(xdr_rmtcallres), (caddr_t)&r, tout); CLNT_DESTROY (client); } @@ -119,12 +120,12 @@ xdr_rmtcall_args (XDR *xdrs, struct rmtcallargs *cap) { u_int lenposition, argposition, position; - if (xdr_u_long (xdrs, &(cap->prog)) && - xdr_u_long (xdrs, &(cap->vers)) && - xdr_u_long (xdrs, &(cap->proc))) + if (INTUSE(xdr_u_long) (xdrs, &(cap->prog)) && + INTUSE(xdr_u_long) (xdrs, &(cap->vers)) && + INTUSE(xdr_u_long) (xdrs, &(cap->proc))) { lenposition = XDR_GETPOS (xdrs); - if (!xdr_u_long (xdrs, &(cap->arglen))) + if (!INTUSE(xdr_u_long) (xdrs, &(cap->arglen))) return FALSE; argposition = XDR_GETPOS (xdrs); if (!(*(cap->xdr_args)) (xdrs, cap->args_ptr)) @@ -132,13 +133,14 @@ xdr_rmtcall_args (XDR *xdrs, struct rmtcallargs *cap) position = XDR_GETPOS (xdrs); cap->arglen = (u_long) position - (u_long) argposition; XDR_SETPOS (xdrs, lenposition); - if (!xdr_u_long (xdrs, &(cap->arglen))) + if (!INTUSE(xdr_u_long) (xdrs, &(cap->arglen))) return FALSE; XDR_SETPOS (xdrs, position); return TRUE; } return FALSE; } +INTDEF(xdr_rmtcall_args) /* * XDR remote call results @@ -152,14 +154,16 @@ xdr_rmtcallres (xdrs, crp) caddr_t port_ptr; port_ptr = (caddr_t) crp->port_ptr; - if (xdr_reference (xdrs, &port_ptr, sizeof (u_long), (xdrproc_t) xdr_u_long) - && xdr_u_long (xdrs, &crp->resultslen)) + if (INTUSE(xdr_reference) (xdrs, &port_ptr, sizeof (u_long), + (xdrproc_t) INTUSE(xdr_u_long)) + && INTUSE(xdr_u_long) (xdrs, &crp->resultslen)) { crp->port_ptr = (u_long *) port_ptr; return (*(crp->xdr_results)) (xdrs, crp->results_ptr); } return FALSE; } +INTDEF(xdr_rmtcallres) /* @@ -299,8 +303,9 @@ clnt_broadcast (prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult) r.port_ptr = &port; r.xdr_results = xresults; r.results_ptr = resultsp; - xdrmem_create (xdrs, outbuf, MAX_BROADCAST_SIZE, XDR_ENCODE); - if ((!xdr_callmsg (xdrs, &msg)) || (!xdr_rmtcall_args (xdrs, &a))) + INTUSE(xdrmem_create) (xdrs, outbuf, MAX_BROADCAST_SIZE, XDR_ENCODE); + if ((!INTUSE(xdr_callmsg) (xdrs, &msg)) + || (!INTUSE(xdr_rmtcall_args) (xdrs, &a))) { stat = RPC_CANTENCODEARGS; goto done_broad; @@ -333,7 +338,7 @@ clnt_broadcast (prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult) recv_again: msg.acpted_rply.ar_verf = _null_auth; msg.acpted_rply.ar_results.where = (caddr_t) & r; - msg.acpted_rply.ar_results.proc = (xdrproc_t) xdr_rmtcallres; + msg.acpted_rply.ar_results.proc = (xdrproc_t) INTUSE(xdr_rmtcallres); milliseconds = t.tv_sec * 1000 + t.tv_usec / 1000; switch (__poll(&fd, 1, milliseconds)) { @@ -368,8 +373,8 @@ clnt_broadcast (prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult) * see if reply transaction id matches sent id. * If so, decode the results. */ - xdrmem_create (xdrs, inbuf, (u_int) inlen, XDR_DECODE); - if (xdr_replymsg (xdrs, &msg)) + INTUSE(xdrmem_create) (xdrs, inbuf, (u_int) inlen, XDR_DECODE); + if (INTUSE(xdr_replymsg) (xdrs, &msg)) { if (((u_int32_t) msg.rm_xid == (u_int32_t) xid) && (msg.rm_reply.rp_stat == MSG_ACCEPTED) && @@ -390,8 +395,8 @@ clnt_broadcast (prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult) #endif } xdrs->x_op = XDR_FREE; - msg.acpted_rply.ar_results.proc = (xdrproc_t)xdr_void; - (void) xdr_replymsg (xdrs, &msg); + msg.acpted_rply.ar_results.proc = (xdrproc_t)INTUSE(xdr_void); + (void) INTUSE(xdr_replymsg) (xdrs, &msg); (void) (*xresults) (xdrs, resultsp); xdr_destroy (xdrs); if (done) diff --git a/sunrpc/rpc_cmsg.c b/sunrpc/rpc_cmsg.c index 8916504..dea0753 100644 --- a/sunrpc/rpc_cmsg.c +++ b/sunrpc/rpc_cmsg.c @@ -132,8 +132,8 @@ xdr_callmsg (XDR *xdrs, struct rpc_msg *cmsg) buf = XDR_INLINE (xdrs, RNDUP (oa->oa_length)); if (buf == NULL) { - if (xdr_opaque (xdrs, oa->oa_base, - oa->oa_length) == FALSE) + if (INTUSE(xdr_opaque) (xdrs, oa->oa_base, + oa->oa_length) == FALSE) return FALSE; } else @@ -149,8 +149,8 @@ xdr_callmsg (XDR *xdrs, struct rpc_msg *cmsg) buf = XDR_INLINE (xdrs, 2 * BYTES_PER_XDR_UNIT); if (buf == NULL) { - if (xdr_enum (xdrs, &oa->oa_flavor) == FALSE || - xdr_u_int (xdrs, &oa->oa_length) == FALSE) + if (INTUSE(xdr_enum) (xdrs, &oa->oa_flavor) == FALSE || + INTUSE(xdr_u_int) (xdrs, &oa->oa_length) == FALSE) { return FALSE; } @@ -172,8 +172,8 @@ xdr_callmsg (XDR *xdrs, struct rpc_msg *cmsg) buf = XDR_INLINE (xdrs, RNDUP (oa->oa_length)); if (buf == NULL) { - if (xdr_opaque (xdrs, oa->oa_base, - oa->oa_length) == FALSE) + if (INTUSE(xdr_opaque) (xdrs, oa->oa_base, + oa->oa_length) == FALSE) return FALSE; } else @@ -189,15 +189,16 @@ xdr_callmsg (XDR *xdrs, struct rpc_msg *cmsg) } } if ( - xdr_u_long (xdrs, &(cmsg->rm_xid)) && - xdr_enum (xdrs, (enum_t *) & (cmsg->rm_direction)) && + INTUSE(xdr_u_long) (xdrs, &(cmsg->rm_xid)) && + INTUSE(xdr_enum) (xdrs, (enum_t *) & (cmsg->rm_direction)) && (cmsg->rm_direction == CALL) && - xdr_u_long (xdrs, &(cmsg->rm_call.cb_rpcvers)) && + INTUSE(xdr_u_long) (xdrs, &(cmsg->rm_call.cb_rpcvers)) && (cmsg->rm_call.cb_rpcvers == RPC_MSG_VERSION) && - xdr_u_long (xdrs, &(cmsg->rm_call.cb_prog)) && - xdr_u_long (xdrs, &(cmsg->rm_call.cb_vers)) && - xdr_u_long (xdrs, &(cmsg->rm_call.cb_proc)) && - xdr_opaque_auth (xdrs, &(cmsg->rm_call.cb_cred))) - return xdr_opaque_auth (xdrs, &(cmsg->rm_call.cb_verf)); + INTUSE(xdr_u_long) (xdrs, &(cmsg->rm_call.cb_prog)) && + INTUSE(xdr_u_long) (xdrs, &(cmsg->rm_call.cb_vers)) && + INTUSE(xdr_u_long) (xdrs, &(cmsg->rm_call.cb_proc)) && + INTUSE(xdr_opaque_auth) (xdrs, &(cmsg->rm_call.cb_cred))) + return INTUSE(xdr_opaque_auth) (xdrs, &(cmsg->rm_call.cb_verf)); return FALSE; } +INTDEF(xdr_callmsg) diff --git a/sunrpc/rpc_prot.c b/sunrpc/rpc_prot.c index 79a58c2..59ec505 100644 --- a/sunrpc/rpc_prot.c +++ b/sunrpc/rpc_prot.c @@ -58,11 +58,12 @@ bool_t xdr_opaque_auth (XDR *xdrs, struct opaque_auth *ap) { - if (xdr_enum (xdrs, &(ap->oa_flavor))) - return xdr_bytes (xdrs, &ap->oa_base, + if (INTUSE(xdr_enum) (xdrs, &(ap->oa_flavor))) + return INTUSE(xdr_bytes) (xdrs, &ap->oa_base, &ap->oa_length, MAX_AUTH_BYTES); return FALSE; } +INTDEF(xdr_opaque_auth) /* * XDR a DES block @@ -70,8 +71,9 @@ xdr_opaque_auth (XDR *xdrs, struct opaque_auth *ap) bool_t xdr_des_block (XDR *xdrs, des_block *blkp) { - return xdr_opaque (xdrs, (caddr_t) blkp, sizeof (des_block)); + return INTUSE(xdr_opaque) (xdrs, (caddr_t) blkp, sizeof (des_block)); } +INTDEF(xdr_des_block) /* * * * * * * * * * * * * * XDR RPC MESSAGE * * * * * * * * * * * * * * * */ @@ -82,23 +84,24 @@ bool_t xdr_accepted_reply (XDR *xdrs, struct accepted_reply *ar) { /* personalized union, rather than calling xdr_union */ - if (!xdr_opaque_auth (xdrs, &(ar->ar_verf))) + if (!INTUSE(xdr_opaque_auth) (xdrs, &(ar->ar_verf))) return FALSE; - if (!xdr_enum (xdrs, (enum_t *) & (ar->ar_stat))) + if (!INTUSE(xdr_enum) (xdrs, (enum_t *) & (ar->ar_stat))) return FALSE; switch (ar->ar_stat) { case SUCCESS: return ((*(ar->ar_results.proc)) (xdrs, ar->ar_results.where)); case PROG_MISMATCH: - if (!xdr_u_long (xdrs, &(ar->ar_vers.low))) + if (!INTUSE(xdr_u_long) (xdrs, &(ar->ar_vers.low))) return FALSE; - return (xdr_u_long (xdrs, &(ar->ar_vers.high))); + return (INTUSE(xdr_u_long) (xdrs, &(ar->ar_vers.high))); default: return TRUE; } return TRUE; /* TRUE => open ended set of problems */ } +INTDEF(xdr_accepted_reply) /* * XDR the MSG_DENIED part of a reply message union @@ -107,25 +110,26 @@ bool_t xdr_rejected_reply (XDR *xdrs, struct rejected_reply *rr) { /* personalized union, rather than calling xdr_union */ - if (!xdr_enum (xdrs, (enum_t *) & (rr->rj_stat))) + if (!INTUSE(xdr_enum) (xdrs, (enum_t *) & (rr->rj_stat))) return FALSE; switch (rr->rj_stat) { case RPC_MISMATCH: - if (!xdr_u_long (xdrs, &(rr->rj_vers.low))) + if (!INTUSE(xdr_u_long) (xdrs, &(rr->rj_vers.low))) return FALSE; - return xdr_u_long (xdrs, &(rr->rj_vers.high)); + return INTUSE(xdr_u_long) (xdrs, &(rr->rj_vers.high)); case AUTH_ERROR: - return xdr_enum (xdrs, (enum_t *) & (rr->rj_why)); + return INTUSE(xdr_enum) (xdrs, (enum_t *) & (rr->rj_why)); } return FALSE; } +INTDEF(xdr_rejected_reply) static const struct xdr_discrim reply_dscrm[3] = { - {(int) MSG_ACCEPTED, (xdrproc_t) xdr_accepted_reply}, - {(int) MSG_DENIED, (xdrproc_t) xdr_rejected_reply}, + {(int) MSG_ACCEPTED, (xdrproc_t) INTUSE(xdr_accepted_reply)}, + {(int) MSG_DENIED, (xdrproc_t) INTUSE(xdr_rejected_reply)}, {__dontcare__, NULL_xdrproc_t}}; /* @@ -136,14 +140,15 @@ xdr_replymsg (xdrs, rmsg) XDR *xdrs; struct rpc_msg *rmsg; { - if (xdr_u_long (xdrs, &(rmsg->rm_xid)) && - xdr_enum (xdrs, (enum_t *) & (rmsg->rm_direction)) && + if (INTUSE(xdr_u_long) (xdrs, &(rmsg->rm_xid)) && + INTUSE(xdr_enum) (xdrs, (enum_t *) & (rmsg->rm_direction)) && (rmsg->rm_direction == REPLY)) - return xdr_union (xdrs, (enum_t *) & (rmsg->rm_reply.rp_stat), - (caddr_t) & (rmsg->rm_reply.ru), reply_dscrm, - NULL_xdrproc_t); + return INTUSE(xdr_union) (xdrs, (enum_t *) & (rmsg->rm_reply.rp_stat), + (caddr_t) & (rmsg->rm_reply.ru), reply_dscrm, + NULL_xdrproc_t); return FALSE; } +INTDEF(xdr_replymsg) /* @@ -161,13 +166,14 @@ xdr_callhdr (xdrs, cmsg) cmsg->rm_call.cb_rpcvers = RPC_MSG_VERSION; if ( (xdrs->x_op == XDR_ENCODE) && - xdr_u_long (xdrs, &(cmsg->rm_xid)) && - xdr_enum (xdrs, (enum_t *) & (cmsg->rm_direction)) && - xdr_u_long (xdrs, &(cmsg->rm_call.cb_rpcvers)) && - xdr_u_long (xdrs, &(cmsg->rm_call.cb_prog))) - return xdr_u_long (xdrs, &(cmsg->rm_call.cb_vers)); + INTUSE(xdr_u_long) (xdrs, &(cmsg->rm_xid)) && + INTUSE(xdr_enum) (xdrs, (enum_t *) & (cmsg->rm_direction)) && + INTUSE(xdr_u_long) (xdrs, &(cmsg->rm_call.cb_rpcvers)) && + INTUSE(xdr_u_long) (xdrs, &(cmsg->rm_call.cb_prog))) + return INTUSE(xdr_u_long) (xdrs, &(cmsg->rm_call.cb_vers)); return FALSE; } +INTDEF(xdr_callhdr) /* ************************** Client utility routine ************* */ diff --git a/sunrpc/svc_authux.c b/sunrpc/svc_authux.c index bf533a5..e5edac7 100644 --- a/sunrpc/svc_authux.c +++ b/sunrpc/svc_authux.c @@ -69,7 +69,8 @@ _svcauth_unix (struct svc_req *rqst, struct rpc_msg *msg) aup->aup_machname = area->area_machname; aup->aup_gids = area->area_gids; auth_len = (u_int) msg->rm_call.cb_cred.oa_length; - xdrmem_create (&xdrs, msg->rm_call.cb_cred.oa_base, auth_len, XDR_DECODE); + INTUSE(xdrmem_create) (&xdrs, msg->rm_call.cb_cred.oa_base, auth_len, + XDR_DECODE); buf = XDR_INLINE (&xdrs, auth_len); if (buf != NULL) { @@ -109,10 +110,10 @@ _svcauth_unix (struct svc_req *rqst, struct rpc_msg *msg) goto done; } } - else if (!xdr_authunix_parms (&xdrs, aup)) + else if (!INTUSE(xdr_authunix_parms) (&xdrs, aup)) { xdrs.x_op = XDR_FREE; - (void) xdr_authunix_parms (&xdrs, aup); + (void) INTUSE(xdr_authunix_parms) (&xdrs, aup); stat = AUTH_BADCRED; goto done; } diff --git a/sunrpc/svc_raw.c b/sunrpc/svc_raw.c index e4752a6..d9b1748 100644 --- a/sunrpc/svc_raw.c +++ b/sunrpc/svc_raw.c @@ -91,7 +91,8 @@ svcraw_create (void) srp->server.xp_port = 0; srp->server.xp_ops = &server_ops; srp->server.xp_verf.oa_base = srp->verf_body; - xdrmem_create (&srp->xdr_stream, srp->_raw_buf, UDPMSGSIZE, XDR_FREE); + INTUSE(xdrmem_create) (&srp->xdr_stream, srp->_raw_buf, UDPMSGSIZE, + XDR_FREE); return &srp->server; } @@ -114,7 +115,7 @@ svcraw_recv (xprt, msg) xdrs = &srp->xdr_stream; xdrs->x_op = XDR_DECODE; XDR_SETPOS (xdrs, 0); - if (!xdr_callmsg (xdrs, msg)) + if (!INTUSE(xdr_callmsg) (xdrs, msg)) return FALSE; return TRUE; } @@ -130,7 +131,7 @@ svcraw_reply (SVCXPRT *xprt, struct rpc_msg *msg) xdrs = &srp->xdr_stream; xdrs->x_op = XDR_ENCODE; XDR_SETPOS (xdrs, 0); - if (!xdr_replymsg (xdrs, msg)) + if (!INTUSE(xdr_replymsg) (xdrs, msg)) return FALSE; (void) XDR_GETPOS (xdrs); /* called just for overhead */ return TRUE; diff --git a/sunrpc/svc_simple.c b/sunrpc/svc_simple.c index 4bca7d0..dbdb8f1 100644 --- a/sunrpc/svc_simple.c +++ b/sunrpc/svc_simple.c @@ -50,7 +50,7 @@ static char sccsid[] = "@(#)svc_simple.c 1.18 87/08/11 Copyr 1984 Sun Micro"; #ifdef USE_IN_LIBIO # include # include -# define fputs(s, f) _IO_fputs (s, f) +# define fputs(s, f) INTUSE(_IO_fputs) (s, f) #endif struct proglst_ @@ -146,7 +146,8 @@ universal (struct svc_req *rqstp, SVCXPRT *transp_l) */ if (rqstp->rq_proc == NULLPROC) { - if (svc_sendreply (transp_l, (xdrproc_t)xdr_void, (char *) NULL) == FALSE) + if (svc_sendreply (transp_l, (xdrproc_t)INTUSE(xdr_void), (char *) NULL) + == FALSE) { __write (STDERR_FILENO, "xxx\n", 4); exit (1); @@ -166,7 +167,7 @@ universal (struct svc_req *rqstp, SVCXPRT *transp_l) return; } outdata = (*(pl->p_progname)) (xdrbuf); - if (outdata == NULL && pl->p_outproc != (xdrproc_t)xdr_void) + if (outdata == NULL && pl->p_outproc != (xdrproc_t)INTUSE(xdr_void)) /* there was an error */ return; if (!svc_sendreply (transp_l, pl->p_outproc, outdata)) diff --git a/sunrpc/svc_tcp.c b/sunrpc/svc_tcp.c index 8249474..9416b7e 100644 --- a/sunrpc/svc_tcp.c +++ b/sunrpc/svc_tcp.c @@ -54,7 +54,7 @@ static char sccsid[] = "@(#)svc_tcp.c 1.21 87/08/11 Copyr 1984 Sun Micro"; #ifdef USE_IN_LIBIO # include # include -# define fputs(s, f) _IO_fputs (s, f) +# define fputs(s, f) INTUSE(_IO_fputs) (s, f) #endif /* @@ -232,8 +232,8 @@ makefd_xprt (int fd, u_int sendsize, u_int recvsize) return NULL; } cd->strm_stat = XPRT_IDLE; - xdrrec_create (&(cd->xdrs), sendsize, recvsize, - (caddr_t) xprt, readtcp, writetcp); + INTUSE(xdrrec_create) (&(cd->xdrs), sendsize, recvsize, + (caddr_t) xprt, readtcp, writetcp); xprt->xp_p2 = NULL; xprt->xp_p1 = (caddr_t) cd; xprt->xp_verf.oa_base = cd->verf_body; @@ -370,7 +370,7 @@ svctcp_stat (SVCXPRT *xprt) if (cd->strm_stat == XPRT_DIED) return XPRT_DIED; - if (!xdrrec_eof (&(cd->xdrs))) + if (!INTUSE(xdrrec_eof) (&(cd->xdrs))) return XPRT_MOREREQS; return XPRT_IDLE; } @@ -382,8 +382,8 @@ svctcp_recv (SVCXPRT *xprt, struct rpc_msg *msg) XDR *xdrs = &(cd->xdrs); xdrs->x_op = XDR_DECODE; - (void) xdrrec_skiprecord (xdrs); - if (xdr_callmsg (xdrs, msg)) + (void) INTUSE(xdrrec_skiprecord) (xdrs); + if (INTUSE(xdr_callmsg) (xdrs, msg)) { cd->x_id = msg->rm_xid; return TRUE; @@ -417,7 +417,7 @@ svctcp_reply (SVCXPRT *xprt, struct rpc_msg *msg) xdrs->x_op = XDR_ENCODE; msg->rm_xid = cd->x_id; - stat = xdr_replymsg (xdrs, msg); - (void) xdrrec_endofrecord (xdrs, TRUE); + stat = INTUSE(xdr_replymsg) (xdrs, msg); + (void) INTUSE(xdrrec_endofrecord) (xdrs, TRUE); return stat; } diff --git a/sunrpc/svc_udp.c b/sunrpc/svc_udp.c index 17c4977..40de3c5 100644 --- a/sunrpc/svc_udp.c +++ b/sunrpc/svc_udp.c @@ -54,7 +54,7 @@ static char sccsid[] = "@(#)svc_udp.c 1.24 87/08/11 Copyr 1984 Sun Micro"; #ifdef USE_IN_LIBIO # include # include -# define fputs(s, f) _IO_fputs (s, f) +# define fputs(s, f) INTUSE(_IO_fputs) (s, f) #endif #define rpc_buffer(xprt) ((xprt)->xp_p1) @@ -163,7 +163,8 @@ svcudp_bufcreate (sock, sendsz, recvsz) } su->su_iosz = ((MAX (sendsz, recvsz) + 3) / 4) * 4; rpc_buffer (xprt) = buf; - xdrmem_create (&(su->su_xdrs), rpc_buffer (xprt), su->su_iosz, XDR_DECODE); + INTUSE(xdrmem_create) (&(su->su_xdrs), rpc_buffer (xprt), su->su_iosz, + XDR_DECODE); su->su_cache = NULL; xprt->xp_p2 = (caddr_t) su; xprt->xp_verf.oa_base = su->su_verfbody; @@ -271,7 +272,7 @@ again: return FALSE; xdrs->x_op = XDR_DECODE; XDR_SETPOS (xdrs, 0); - if (!xdr_callmsg (xdrs, msg)) + if (!INTUSE(xdr_callmsg) (xdrs, msg)) return FALSE; su->su_xid = msg->rm_xid; if (su->su_cache != NULL) @@ -312,7 +313,7 @@ svcudp_reply (xprt, msg) xdrs->x_op = XDR_ENCODE; XDR_SETPOS (xdrs, 0); msg->rm_xid = su->su_xid; - if (xdr_replymsg (xdrs, msg)) + if (INTUSE(xdr_replymsg) (xdrs, msg)) { slen = (int) XDR_GETPOS (xdrs); #ifdef IP_PKTINFO @@ -552,7 +553,8 @@ cache_set (SVCXPRT *xprt, u_long replylen) victim->cache_replylen = replylen; victim->cache_reply = rpc_buffer (xprt); rpc_buffer (xprt) = newbuf; - xdrmem_create (&(su->su_xdrs), rpc_buffer (xprt), su->su_iosz, XDR_ENCODE); + INTUSE(xdrmem_create) (&(su->su_xdrs), rpc_buffer (xprt), su->su_iosz, + XDR_ENCODE); victim->cache_xid = su->su_xid; victim->cache_proc = uc->uc_proc; victim->cache_vers = uc->uc_vers; diff --git a/sunrpc/svc_unix.c b/sunrpc/svc_unix.c index 763021f..afe4494 100644 --- a/sunrpc/svc_unix.c +++ b/sunrpc/svc_unix.c @@ -228,8 +228,8 @@ makefd_xprt (int fd, u_int sendsize, u_int recvsize) return NULL; } cd->strm_stat = XPRT_IDLE; - xdrrec_create (&(cd->xdrs), sendsize, recvsize, - (caddr_t) xprt, readunix, writeunix); + INTUSE(xdrrec_create) (&(cd->xdrs), sendsize, recvsize, + (caddr_t) xprt, readunix, writeunix); xprt->xp_p2 = NULL; xprt->xp_p1 = (caddr_t) cd; xprt->xp_verf.oa_base = cd->verf_body; @@ -472,7 +472,7 @@ svcunix_stat (SVCXPRT *xprt) if (cd->strm_stat == XPRT_DIED) return XPRT_DIED; - if (!xdrrec_eof (&(cd->xdrs))) + if (!INTUSE(xdrrec_eof) (&(cd->xdrs))) return XPRT_MOREREQS; return XPRT_IDLE; } @@ -484,8 +484,8 @@ svcunix_recv (SVCXPRT *xprt, struct rpc_msg *msg) XDR *xdrs = &(cd->xdrs); xdrs->x_op = XDR_DECODE; - xdrrec_skiprecord (xdrs); - if (xdr_callmsg (xdrs, msg)) + INTUSE(xdrrec_skiprecord) (xdrs); + if (INTUSE(xdr_callmsg) (xdrs, msg)) { cd->x_id = msg->rm_xid; /* set up verifiers */ @@ -525,7 +525,7 @@ svcunix_reply (SVCXPRT *xprt, struct rpc_msg *msg) xdrs->x_op = XDR_ENCODE; msg->rm_xid = cd->x_id; - stat = xdr_replymsg (xdrs, msg); - (void) xdrrec_endofrecord (xdrs, TRUE); + stat = INTUSE(xdr_replymsg) (xdrs, msg); + (void) INTUSE(xdrrec_endofrecord) (xdrs, TRUE); return stat; } diff --git a/sunrpc/xdr.c b/sunrpc/xdr.c index cc1aa2c..dbe1d88 100644 --- a/sunrpc/xdr.c +++ b/sunrpc/xdr.c @@ -86,6 +86,7 @@ xdr_void (void) { return TRUE; } +INTDEF(xdr_void) /* * XDR integers @@ -114,13 +115,14 @@ xdr_int (XDR *xdrs, int *ip) } return FALSE; #elif INT_MAX == LONG_MAX - return xdr_long (xdrs, (long *) ip); + return INTUSE(xdr_long) (xdrs, (long *) ip); #elif INT_MAX == SHRT_MAX - return xdr_short (xdrs, (short *) ip); + return INTUSE(xdr_short) (xdrs, (short *) ip); #else #error unexpected integer sizes in_xdr_int() #endif } +INTDEF(xdr_int) /* * XDR unsigned integers @@ -148,13 +150,14 @@ xdr_u_int (XDR *xdrs, u_int *up) } return FALSE; #elif UINT_MAX == ULONG_MAX - return xdr_u_long (xdrs, (u_long *) up); + return INTUSE(xdr_u_long) (xdrs, (u_long *) up); #elif UINT_MAX == USHRT_MAX - return xdr_short (xdrs, (short *) up); + return INTUSE(xdr_short) (xdrs, (short *) up); #else #error unexpected integer sizes in_xdr_u_int() #endif } +INTDEF(xdr_u_int) /* * XDR long integers @@ -178,6 +181,7 @@ xdr_long (XDR *xdrs, long *lp) return FALSE; } +INTDEF(xdr_long) /* * XDR unsigned long integers @@ -212,6 +216,7 @@ xdr_u_long (XDR *xdrs, u_long *ulp) } return FALSE; } +INTDEF(xdr_u_long) /* * XDR hyper integers @@ -244,6 +249,7 @@ xdr_hyper (XDR *xdrs, quad_t *llp) return FALSE; } +INTDEF(xdr_hyper) /* @@ -277,17 +283,18 @@ xdr_u_hyper (XDR *xdrs, u_quad_t *ullp) return FALSE; } +INTDEF(xdr_u_hyper) bool_t xdr_longlong_t (XDR *xdrs, quad_t *llp) { - return xdr_hyper (xdrs, llp); + return INTUSE(xdr_hyper) (xdrs, llp); } bool_t xdr_u_longlong_t (XDR *xdrs, u_quad_t *ullp) { - return xdr_u_hyper (xdrs, ullp); + return INTUSE(xdr_u_hyper) (xdrs, ullp); } /* @@ -317,6 +324,7 @@ xdr_short (XDR *xdrs, short *sp) } return FALSE; } +INTDEF(xdr_short) /* * XDR unsigned short integers @@ -345,6 +353,7 @@ xdr_u_short (XDR *xdrs, u_short *usp) } return FALSE; } +INTDEF(xdr_u_short) /* @@ -356,7 +365,7 @@ xdr_char (XDR *xdrs, char *cp) int i; i = (*cp); - if (!xdr_int (xdrs, &i)) + if (!INTUSE(xdr_int) (xdrs, &i)) { return FALSE; } @@ -373,7 +382,7 @@ xdr_u_char (XDR *xdrs, u_char *cp) u_int u; u = (*cp); - if (!xdr_u_int (xdrs, &u)) + if (!INTUSE(xdr_u_int) (xdrs, &u)) { return FALSE; } @@ -408,6 +417,7 @@ xdr_bool (XDR *xdrs, bool_t *bp) } return FALSE; } +INTDEF(xdr_bool) /* * XDR enumerations @@ -446,18 +456,19 @@ xdr_enum (XDR *xdrs, enum_t *ep) } return FALSE; #else - return xdr_long (xdrs, (long *) ep); + return INTUSE(xdr_long) (xdrs, (long *) ep); #endif } else if (sizeof (enum sizecheck) == sizeof (short)) { - return xdr_short (xdrs, (short *) ep); + return INTUSE(xdr_short) (xdrs, (short *) ep); } else { return FALSE; } } +INTDEF(xdr_enum) /* * XDR opaque data @@ -508,6 +519,7 @@ xdr_opaque (XDR *xdrs, caddr_t cp, u_int cnt) } return FALSE; } +INTDEF(xdr_opaque) /* * XDR counted bytes @@ -527,7 +539,7 @@ xdr_bytes (xdrs, cpp, sizep, maxsize) /* * first deal with the length since xdr bytes are counted */ - if (!xdr_u_int (xdrs, sizep)) + if (!INTUSE(xdr_u_int) (xdrs, sizep)) { return FALSE; } @@ -564,7 +576,7 @@ xdr_bytes (xdrs, cpp, sizep, maxsize) /* fall into ... */ case XDR_ENCODE: - return xdr_opaque (xdrs, sp, nodesize); + return INTUSE(xdr_opaque) (xdrs, sp, nodesize); case XDR_FREE: if (sp != NULL) @@ -576,6 +588,7 @@ xdr_bytes (xdrs, cpp, sizep, maxsize) } return FALSE; } +INTDEF(xdr_bytes) /* * Implemented here due to commonality of the object. @@ -586,8 +599,9 @@ xdr_netobj (xdrs, np) struct netobj *np; { - return xdr_bytes (xdrs, &np->n_bytes, &np->n_len, MAX_NETOBJ_SZ); + return INTUSE(xdr_bytes) (xdrs, &np->n_bytes, &np->n_len, MAX_NETOBJ_SZ); } +INTDEF(xdr_netobj) /* * XDR a discriminated union @@ -613,7 +627,7 @@ xdr_union (xdrs, dscmp, unp, choices, dfault) /* * we deal with the discriminator; it's an enum */ - if (!xdr_enum (xdrs, dscmp)) + if (!INTUSE(xdr_enum) (xdrs, dscmp)) { return FALSE; } @@ -635,6 +649,7 @@ xdr_union (xdrs, dscmp, unp, choices, dfault) return ((dfault == NULL_xdrproc_t) ? FALSE : (*dfault) (xdrs, unp, LASTUNSIGNED)); } +INTDEF(xdr_union) /* @@ -680,7 +695,7 @@ xdr_string (xdrs, cpp, maxsize) case XDR_DECODE: break; } - if (!xdr_u_int (xdrs, &size)) + if (!INTUSE(xdr_u_int) (xdrs, &size)) { return FALSE; } @@ -717,7 +732,7 @@ xdr_string (xdrs, cpp, maxsize) /* fall into ... */ case XDR_ENCODE: - return xdr_opaque (xdrs, sp, size); + return INTUSE(xdr_opaque) (xdrs, sp, size); case XDR_FREE: mem_free (sp, nodesize); @@ -726,6 +741,7 @@ xdr_string (xdrs, cpp, maxsize) } return FALSE; } +INTDEF(xdr_string) /* * Wrapper for xdr_string that can be called directly from @@ -736,7 +752,7 @@ xdr_wrapstring (xdrs, cpp) XDR *xdrs; char **cpp; { - if (xdr_string (xdrs, cpp, LASTUNSIGNED)) + if (INTUSE(xdr_string) (xdrs, cpp, LASTUNSIGNED)) { return TRUE; } diff --git a/sunrpc/xdr_array.c b/sunrpc/xdr_array.c index 2dbf8c1..461a6ad 100644 --- a/sunrpc/xdr_array.c +++ b/sunrpc/xdr_array.c @@ -76,7 +76,7 @@ xdr_array (xdrs, addrp, sizep, maxsize, elsize, elproc) u_int nodesize; /* like strings, arrays are really counted arrays */ - if (!xdr_u_int (xdrs, sizep)) + if (!INTUSE(xdr_u_int) (xdrs, sizep)) { return FALSE; } @@ -137,6 +137,7 @@ xdr_array (xdrs, addrp, sizep, maxsize, elsize, elproc) } return stat; } +INTDEF(xdr_array) /* * xdr_vector(): diff --git a/sunrpc/xdr_mem.c b/sunrpc/xdr_mem.c index b328d59..1695fea 100644 --- a/sunrpc/xdr_mem.c +++ b/sunrpc/xdr_mem.c @@ -80,6 +80,7 @@ xdrmem_create (XDR *xdrs, const caddr_t addr, u_int size, enum xdr_op op) xdrs->x_private = xdrs->x_base = addr; xdrs->x_handy = size; } +INTDEF(xdrmem_create) /* * Nothing needs to be done for the memory case. The argument is clearly diff --git a/sunrpc/xdr_rec.c b/sunrpc/xdr_rec.c index 941afa3..15a4169 100644 --- a/sunrpc/xdr_rec.c +++ b/sunrpc/xdr_rec.c @@ -53,7 +53,7 @@ #ifdef USE_IN_LIBIO # include # include -# define fputs(s, f) _IO_fputs (s, f) +# define fputs(s, f) INTUSE(_IO_fputs) (s, f) #endif static bool_t xdrrec_getlong (XDR *, long *); @@ -200,6 +200,7 @@ xdrrec_create (XDR *xdrs, u_int sendsize, rstrm->fbtbc = 0; rstrm->last_frag = TRUE; } +INTDEF(xdrrec_create) /* @@ -487,6 +488,7 @@ xdrrec_skiprecord (XDR *xdrs) rstrm->last_frag = FALSE; return TRUE; } +INTDEF(xdrrec_skiprecord) /* * Lookahead function. @@ -510,6 +512,7 @@ xdrrec_eof (XDR *xdrs) return TRUE; return FALSE; } +INTDEF(xdrrec_eof) /* * The client must tell the package when an end-of-record has occurred. @@ -536,6 +539,7 @@ xdrrec_endofrecord (XDR *xdrs, bool_t sendnow) rstrm->out_finger += BYTES_PER_XDR_UNIT; return TRUE; } +INTDEF(xdrrec_endofrecord) /* diff --git a/sunrpc/xdr_ref.c b/sunrpc/xdr_ref.c index e49329f..067d97e 100644 --- a/sunrpc/xdr_ref.c +++ b/sunrpc/xdr_ref.c @@ -49,7 +49,7 @@ static char sccsid[] = "@(#)xdr_reference.c 1.11 87/08/11 SMI"; #ifdef USE_IN_LIBIO # include # include -# define fputs(s, f) _IO_fputs (s, f) +# define fputs(s, f) INTUSE(_IO_fputs) (s, f) #endif #define LASTUNSIGNED ((u_int)0-1) @@ -107,6 +107,7 @@ xdr_reference (xdrs, pp, size, proc) } return stat; } +INTDEF(xdr_reference) /* @@ -139,7 +140,7 @@ xdr_pointer (xdrs, objpp, obj_size, xdr_obj) bool_t more_data; more_data = (*objpp != NULL); - if (!xdr_bool (xdrs, &more_data)) + if (!INTUSE(xdr_bool) (xdrs, &more_data)) { return FALSE; } @@ -148,5 +149,5 @@ xdr_pointer (xdrs, objpp, obj_size, xdr_obj) *objpp = NULL; return TRUE; } - return xdr_reference (xdrs, objpp, obj_size, xdr_obj); + return INTUSE(xdr_reference) (xdrs, objpp, obj_size, xdr_obj); } diff --git a/sunrpc/xdr_stdio.c b/sunrpc/xdr_stdio.c index 411cf17..8a76b75 100644 --- a/sunrpc/xdr_stdio.c +++ b/sunrpc/xdr_stdio.c @@ -43,10 +43,10 @@ #ifdef USE_IN_LIBIO # include -# define fflush(s) _IO_fflush (s) -# define fread(p, m, n, s) _IO_fread (p, m, n, s) -# define ftell(s) _IO_ftell (s) -# define fwrite(p, m, n, s) _IO_fwrite (p, m, n, s) +# define fflush(s) INTUSE(_IO_fflush) (s) +# define fread(p, m, n, s) INTUSE(_IO_fread) (p, m, n, s) +# define ftell(s) INTUSE(_IO_ftell) (s) +# define fwrite(p, m, n, s) INTUSE(_IO_fwrite) (p, m, n, s) #endif static bool_t xdrstdio_getlong (XDR *, long *); diff --git a/sysdeps/generic/_strerror.c b/sysdeps/generic/_strerror.c index 766d88e..c8f2a9c 100644 --- a/sysdeps/generic/_strerror.c +++ b/sysdeps/generic/_strerror.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 93, 95, 96, 97, 98, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1991,93,95,96,97,98,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,8 @@ char * __strerror_r (int errnum, char *buf, size_t buflen) { - if (errnum < 0 || errnum >= _sys_nerr || _sys_errlist[errnum] == NULL) + if (errnum < 0 || errnum >= INTUSE(_sys_nerr) + || INTUSE(_sys_errlist)[errnum] == NULL) { /* Buffer we use to print the number in. For a maximum size for `int' of 8 bytes we never need more than 20 digits. */ @@ -65,6 +66,6 @@ __strerror_r (int errnum, char *buf, size_t buflen) return buf; } - return (char *) _(_sys_errlist[errnum]); + return (char *) _(INTUSE(_sys_errlist)[errnum]); } weak_alias (__strerror_r, strerror_r) diff --git a/sysdeps/generic/printf_fphex.c b/sysdeps/generic/printf_fphex.c index 5505d13..7dfb116 100644 --- a/sysdeps/generic/printf_fphex.c +++ b/sysdeps/generic/printf_fphex.c @@ -1,5 +1,5 @@ /* Print floating point number in hexadecimal notation according to ISO C99. - 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 , 1997. @@ -38,7 +38,7 @@ #ifdef USE_IN_LIBIO # include # 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 diff --git a/sysdeps/generic/tmpfile.c b/sysdeps/generic/tmpfile.c index 6d341d6..9b60dbb 100644 --- a/sysdeps/generic/tmpfile.c +++ b/sysdeps/generic/tmpfile.c @@ -1,5 +1,5 @@ /* Open a stdio stream on an anonymous temporary file. Generic/POSIX version. - Copyright (C) 1991,93,96,97,98,99,2000 Free Software Foundation, Inc. + Copyright (C) 1991,93,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 @@ -22,7 +22,7 @@ #ifdef USE_IN_LIBIO # include -# define __fdopen _IO_fdopen +# define __fdopen INTUSE(_IO_fdopen) # define tmpfile __new_tmpfile #endif diff --git a/sysdeps/gnu/errlist.awk b/sysdeps/gnu/errlist.awk index 92828a9..07d00c4 100644 --- a/sysdeps/gnu/errlist.awk +++ b/sysdeps/gnu/errlist.awk @@ -106,4 +106,6 @@ END { print "#ifdef SYS_NERR_ALIAS"; print "weak_alias (_sys_nerr, SYS_NERR_ALIAS)"; print "#endif"; + print "INTDEF2(SYS_ERRLIST, _sys_errlist)"; + print "INTDEF2(SYS_NERR, _sys_nerr)"; } diff --git a/sysdeps/gnu/errlist.c b/sysdeps/gnu/errlist.c index 1b15c5e..65b36dd 100644 --- a/sysdeps/gnu/errlist.c +++ b/sysdeps/gnu/errlist.c @@ -845,3 +845,5 @@ weak_alias (_sys_errlist, SYS_ERRLIST_ALIAS) #ifdef SYS_NERR_ALIAS weak_alias (_sys_nerr, SYS_NERR_ALIAS) #endif +INTDEF2(SYS_ERRLIST, _sys_errlist) +INTDEF2(SYS_NERR, _sys_nerr) -- cgit v1.1