+2002-02-25 Ulrich Drepper <drepper@redhat.com>
+
+ * assert/assert-perr.c: Use INTUSE to reference functions and variables
+ inside libc itself. Ise INTDEF and INTDEF2 to define appropriate
+ aliases. Add prototypes for the new aliases.
+ * assert/assert.c: Likewise.
+ * include/libc-symbols.h: Likewise.
+ * include/stdio.h: Likewise.
+ * include/netinet/in.h: Likewise.
+ * include/rpc/auth.h: Likewise.
+ * include/rpc/auth_unix.h: Likewise.
+ * include/rpc/key_prot.h: Likewise.
+ * include/rpc/pmap_prot.h: Likewise.
+ * include/rpc/pmap_rmt.h: Likewise.
+ * include/rpc/rpc_msg.h: Likewise.
+ * include/rpc/xdr.h: Likewise.
+ * inet/gethstbyad_r.c: Likewise.
+ * inet/gethstbynm2_r.c: Likewise.
+ * inet/gethstbynm_r.c: Likewise.
+ * inet/gethstent_r.c: Likewise.
+ * inet/in6_addr.c: Likewise.
+ * libio/__fpurge.c: Likewise.
+ * libio/filedoalloc.c: Likewise.
+ * libio/fileops.c: Likewise.
+ * libio/ftello.c: Likewise.
+ * libio/ftello64.c: Likewise.
+ * libio/genops.c: Likewise.
+ * libio/iofclose.c: Likewise.
+ * libio/iofdopen.c: Likewise.
+ * libio/iofflush.c: Likewise.
+ * libio/iofflush_u.c: Likewise.
+ * libio/iofgetpos.c: Likewise.
+ * libio/iofgetpos64.c: Likewise.
+ * libio/iofgets.c: Likewise.
+ * libio/iofgets_u.c: Likewise.
+ * libio/iofopen.c: Likewise.
+ * libio/iofopncook.c: Likewise.
+ * libio/iofputs.c: Likewise.
+ * libio/iofread.c: Likewise.
+ * libio/iofread_u.c: Likewise.
+ * libio/iofsetpos.c: Likewise.
+ * libio/iofsetpos64.c: Likewise.
+ * libio/ioftell.c: Likewise.
+ * libio/iofwrite.c: Likewise.
+ * libio/iogetline.c: Likewise.
+ * libio/iogets.c: Likewise.
+ * libio/iogetwline.c: Likewise.
+ * libio/iolibio.h: Likewise.
+ * libio/iopadn.c: Likewise.
+ * libio/iopopen.c: Likewise.
+ * libio/ioseekoff.c: Likewise.
+ * libio/ioseekpos.c: Likewise.
+ * libio/iosetbuffer.c: Likewise.
+ * libio/iosetvbuf.c: Likewise.
+ * libio/ioungetc.c: Likewise.
+ * libio/ioungetwc.c: Likewise.
+ * libio/iovdprintf.c: Likewise.
+ * libio/iovsprintf.c: Likewise.
+ * libio/iovsscanf.c: Likewise.
+ * libio/libioP.h: Likewise.
+ * libio/memstream.c: Likewise.
+ * libio/obprintf.c: Likewise.
+ * libio/oldfileops.c: Likewise.
+ * libio/oldiofclose.c: Likewise.
+ * libio/oldiofdopen.c: Likewise.
+ * libio/oldiofgetpos.c: Likewise.
+ * libio/oldiofgetpos64.c: Likewise.
+ * libio/oldiofopen.c: Likewise.
+ * libio/oldiofsetpos.c: Likewise.
+ * libio/oldiofsetpos64.c: Likewise.
+ * libio/oldiopopen.c: Likewise.
+ * libio/oldstdfiles.c: Likewise.
+ * libio/putc.c: Likewise.
+ * libio/setbuf.c: Likewise.
+ * libio/setlinebuf.c: Likewise.
+ * libio/stdfiles.c: Likewise.
+ * libio/stdio.c: Likewise.
+ * libio/strops.c: Likewise.
+ * libio/vasprintf.c: Likewise.
+ * libio/vscanf.c: Likewise.
+ * libio/vsnprintf.c: Likewise.
+ * libio/vswprintf.c: Likewise.
+ * libio/wfiledoalloc.c: Likewise.
+ * libio/wfileops.c: Likewise.
+ * libio/wgenops.c: Likewise.
+ * libio/wstrops.c: Likewise.
+ * malloc/mtrace.c: Likewise.
+ * misc/error.c: Likewise.
+ * misc/syslog.c: Likewise.
+ * nss/getXXbyYY_r.c: Likewise.
+ * nss/getXXent_r.c: Likewise.
+ * nss/hosts-lookup.c: Likewise.
+ * stdio-common/getw.c
+ * stdio-common/printf-prs.c: Likewise.
+ * stdio-common/printf_fp.c: Likewise.
+ * stdio-common/printf_size.c: Likewise.
+ * stdio-common/putw.c: Likewise.
+ * stdio-common/scanf.c: Likewise.
+ * stdio-common/sprintf.c: Likewise.
+ * stdio-common/tmpfile64.c: Likewise.
+ * stdio-common/vfprintf.c: Likewise.
+ * stdio-common/vfscanf.c: Likewise.
+ * stdlib/strfmon.c: Likewise.
+ * sunrpc/auth_des.c: Likewise.
+ * sunrpc/auth_none.c: Likewise.
+ * sunrpc/auth_unix.c: Likewise.
+ * sunrpc/authdes_prot.c: Likewise.
+ * sunrpc/authuxprot.c: Likewise.
+ * sunrpc/clnt_perr.c: Likewise.
+ * sunrpc/clnt_raw.c: Likewise.
+ * sunrpc/clnt_tcp.c: Likewise.
+ * sunrpc/clnt_udp.c: Likewise.
+ * sunrpc/clnt_unix.c: Likewise.
+ * sunrpc/key_call.c: Likewise.
+ * sunrpc/key_prot.c: Likewise.
+ * sunrpc/openchild.c: Likewise.
+ * sunrpc/pm_getmaps.c: Likewise.
+ * sunrpc/pm_getport.c: Likewise.
+ * sunrpc/pmap_clnt.c: Likewise.
+ * sunrpc/pmap_prot.c: Likewise.
+ * sunrpc/pmap_prot2.c: Likewise.
+ * sunrpc/pmap_rmt.c: Likewise.
+ * sunrpc/rpc_cmsg.c: Likewise.
+ * sunrpc/rpc_prot.c: Likewise.
+ * sunrpc/svc_authux.c: Likewise.
+ * sunrpc/svc_raw.c: Likewise.
+ * sunrpc/svc_simple.c: Likewise.
+ * sunrpc/svc_tcp.c: Likewise.
+ * sunrpc/svc_udp.c: Likewise.
+ * sunrpc/svc_unix.c: Likewise.
+ * sunrpc/xdr.c: Likewise.
+ * sunrpc/xdr_array.c: Likewise.
+ * sunrpc/xdr_mem.c: Likewise.
+ * sunrpc/xdr_rec.c: Likewise.
+ * sunrpc/xdr_ref.c: Likewise.
+ * sunrpc/xdr_stdio.c: Likewise.
+ * sysdeps/generic/_strerror.c: Likewise.
+ * sysdeps/generic/printf_fphex.c: Likewise.
+ * sysdeps/generic/tmpfile.c: Likewise.
+ * sysdeps/gnu/errlist.awk: Likewise.
+ * sysdeps/gnu/errlist.c: Likewise.
+
+ * libio/Makefile (routines): Remove iosprint.
+ * libio/iosprintf.c: Removed
+
+
2002-02-24 Ulrich Drepper <drepper@redhat.com>
* elf/dl-support.c (_dl_non_dynamic_init): Renamed from
-/* 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
#ifdef USE_IN_LIBIO
# include <wchar.h>
# include <libio/iolibio.h>
-# define fflush(s) _IO_fflush (s)
+# define fflush(s) INTUSE(_IO_fflush) (s)
#endif
/* This function, when passed an error number, a filename, and a line
-/* 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
#ifdef USE_IN_LIBIO
# include <wchar.h>
# include <libio/iolibio.h>
-# define fflush(s) _IO_fflush (s)
+# define fflush(s) INTUSE(_IO_fflush) (s)
#endif
/* This function, when passed a string containing an asserted
#line 3501 "configure"
#include "confdefs.h"
#include <stdio.h>
-main()
+int main()
{
FILE *f=fopen("conftestval", "w");
- if (!f) exit(1);
+ if (!f) return(1);
fprintf(f, "%d\n", sizeof(long double));
- exit(0);
+ return(0);
}
EOF
if { (eval echo configure:3512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
#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 */
#include <inet/netinet/in.h>
+
+extern const struct in6_addr in6addr_any_internal;
#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
#include <sunrpc/rpc/auth_unix.h>
+
+extern bool_t xdr_authunix_parms_internal (XDR *__xdrs,
+ struct authunix_parms *__p);
#include <sunrpc/rpc/key_prot.h>
+
+extern bool_t xdr_cryptkeyres_internal (XDR *xdrs, cryptkeyres *objp);
+extern bool_t xdr_keystatus_internal (XDR *, keystatus*);
+extern bool_t xdr_keybuf_internal (XDR *, keybuf);
+extern bool_t xdr_cryptkeyarg_internal (XDR *, cryptkeyarg*);
+extern bool_t xdr_cryptkeyarg2_internal (XDR *, cryptkeyarg2*);
+extern bool_t xdr_key_netstres_internal (XDR *, key_netstres*);
+extern bool_t xdr_key_netstarg_internal (XDR *, key_netstarg*);
+extern bool_t xdr_netnamestr_internal (XDR *, netnamestr*);
+extern bool_t xdr_unixcred_internal (XDR *, unixcred*);
#include <sunrpc/rpc/pmap_prot.h>
+
+
+extern bool_t xdr_pmap_internal (XDR *__xdrs, struct pmap *__regs);
+extern bool_t xdr_pmaplist_internal (XDR *__xdrs, struct pmaplist **__rp);
#include <sunrpc/rpc/pmap_rmt.h>
+
+extern bool_t xdr_rmtcall_args_internal (XDR *__xdrs,
+ struct rmtcallargs *__crp);
+extern bool_t xdr_rmtcallres_internal (XDR *__xdrs, struct rmtcallres *__crp);
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
#include <sunrpc/rpc/xdr.h>
+
+extern bool_t xdr_void_internal (void);
+extern bool_t xdr_bool_internal (XDR *__xdrs, bool_t *__bp);
+extern bool_t xdr_u_hyper_internal (XDR *__xdrs, u_quad_t *__ullp);
+extern bool_t xdr_u_long_internal (XDR *__xdrs, u_long *__ulp);
+extern bool_t xdr_u_int_internal (XDR *__xdrs, u_int *__up);
+extern bool_t xdr_u_short_internal (XDR *__xdrs, u_short *__usp);
+extern bool_t xdr_hyper_internal (XDR *__xdrs, quad_t *__ullp);
+extern bool_t xdr_long_internal (XDR *__xdrs, long *__ulp);
+extern bool_t xdr_int_internal (XDR *__xdrs, int *__up);
+extern bool_t xdr_short_internal (XDR *__xdrs, short *__usp);
+extern bool_t xdr_enum_internal (XDR *__xdrs, enum_t *__ep);
+extern bool_t xdr_union_internal (XDR *__xdrs, enum_t *__dscmp, char *__unp,
+ const struct xdr_discrim *choices,
+ xdrproc_t dfault);
+extern bool_t xdr_string_internal (XDR *__xdrs, char **__cpp, u_int __maxsize);
+extern bool_t xdr_array_internal (XDR * _xdrs, caddr_t *__addrp,
+ u_int *__sizep, u_int __maxsize,
+ u_int __elsize, xdrproc_t __elproc);
+extern bool_t xdr_reference_internal (XDR *__xdrs, caddr_t *__xpp,
+ u_int __size, xdrproc_t __proc);
+extern bool_t xdr_bytes_internal (XDR *xdrs, char **cpp, u_int *sizep,
+ u_int maxsize);
+extern bool_t xdr_netobj_internal (XDR *__xdrs, struct netobj *__np);
+extern bool_t xdr_opaque_internal (XDR *__xdrs, caddr_t __cp, u_int __cnt);
+extern void xdrrec_create_internal (XDR *__xdrs, u_int __sendsize,
+ u_int __recvsize, caddr_t __tcp_handle,
+ int (*__readit) (char *, char *, int),
+ int (*__writeit) (char *, char *, int));
+extern void xdrmem_create_internal (XDR *, const caddr_t, u_int, enum xdr_op);
+extern bool_t xdrrec_endofrecord_internal (XDR *__xdrs, bool_t __sendnow);
+extern bool_t xdrrec_skiprecord_internal (XDR *__xdrs);
+extern bool_t xdrrec_eof_internal (XDR *__xdrs);
# endif
+extern __const char *__const _sys_errlist_internal[];
+extern int _sys_nerr_internal;
+
# endif
#endif
-/* Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1996,1997,1998,1999,2000,2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
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; \
_res_hconf_trim_domains (resbuf); \
}
+/* Special name for the lookup function. */
+#define DB_LOOKUP_FCT INTUSE(__nss_hosts_lookup)
+
#include "../nss/getXXbyYY_r.c"
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
#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"
-/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
#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"
-/* 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
#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"
-/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Philip Blundell <pjb27@cam.ac.uk>, 1997.
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 } } };
-# 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
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 \
-/* 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
{
/* 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;
{
/* 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;
-/* 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
#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)
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)
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)
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__
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;
}
return result;
}
+INTDEF2(_IO_new_file_fopen, _IO_file_fopen)
_IO_FILE *
_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)
return fp;
}
+INTDEF2(_IO_new_file_setbuf, _IO_file_setbuf)
static int new_do_write __P ((_IO_FILE *, const char *, _IO_size_t));
{
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
}
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
free (fp->_IO_save_base);
fp->_flags &= ~_IO_IN_BACKUP;
}
- _IO_doallocbuf (fp);
+ INTUSE(_IO_doallocbuf) (fp);
}
/* Flush all line buffered files before reading. */
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
#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
_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. */
/* 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.
return EOF;
return (unsigned char) ch;
}
+INTDEF2(_IO_new_file_overflow, _IO_file_overflow)
int
_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)
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)
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);
}
}
#ifdef TODO
- _IO_unsave_markers (fp);
+ INTUSE(_IO_unsave_markers) (fp);
#endif
if (fp->_flags & _IO_NO_READS)
return offset;
dumb:
- _IO_unsave_markers (fp);
+ INTUSE(_IO_unsave_markers) (fp);
result = _IO_SYSSEEK (fp, offset, dir);
if (result != EOF)
{
return offset;
}
+INTDEF2(_IO_new_file_seekoff, _IO_file_seekoff)
_IO_off64_t
_IO_file_seekoff_mmap (fp, offset, dir, mode)
{
return read (fp->_fileno, buf, size);
}
+INTDEF(_IO_file_read)
_IO_off64_t
_IO_file_seek (fp, offset, dir)
return lseek (fp->_fileno, offset, dir);
#endif
}
+INTDEF(_IO_file_seek)
int
_IO_file_stat (fp, st)
return fstat (fp->_fileno, (struct stat *) st);
#endif
}
+INTDEF(_IO_file_stat)
int
_IO_file_close_mmap (fp)
{
return close (fp->_fileno);
}
+INTDEF(_IO_file_close)
_IO_ssize_t
_IO_new_file_write (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)
free (fp->_IO_save_base);
fp->_flags &= ~_IO_IN_BACKUP;
}
- _IO_doallocbuf (fp);
+ INTUSE(_IO_doallocbuf) (fp);
}
while (want > 0)
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
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)
};
-/* 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
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)
-/* 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
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)
-/* 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
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)
{
#endif
}
}
+INTDEF(_IO_un_link)
void
_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);
#endif
}
}
+INTDEF(_IO_link_in)
/* Return minimum _pos markers
Assumes the current get area is the main get area. */
fp->_flags &= ~_IO_CURRENTLY_PUTTING;
return 0;
}
+INTDEF(_IO_switch_to_get_mode)
void
_IO_free_backup_area (fp)
fp->_IO_save_end = NULL;
fp->_IO_backup_base = NULL;
}
+INTDEF(_IO_free_backup_area)
#if 0
int
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;
return EOF;
}
else if (_IO_have_backup (fp))
- _IO_free_backup_area (fp);
+ INTUSE(_IO_free_backup_area) (fp);
return _IO_UNDERFLOW (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++;
return EOF;
}
else if (_IO_have_backup (fp))
- _IO_free_backup_area (fp);
+ INTUSE(_IO_free_backup_area) (fp);
return _IO_UFLOW (fp);
}
else
f->_flags |= _IO_USER_BUF;
}
+INTDEF(_IO_setb)
void
_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)
return EOF;
return *(unsigned char *) fp->_IO_read_ptr++;
}
+INTDEF(_IO_default_uflow)
_IO_size_t
_IO_default_xsputn (f, data, n)
}
return n - more;
}
+INTDEF(_IO_default_xsputn)
_IO_size_t
_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)
}
return n - more;
}
+INTDEF(_IO_default_xsgetn)
#if 0
/* Seems not to be needed. --drepper */
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;
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)
{
_IO_no_init (fp, flags, -1, NULL, NULL);
}
+INTDEF(_IO_init)
void
_IO_no_init (fp, flags, orientation, wd, jmp)
_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)
return result;
}
+INTDEF(_IO_sputbackc)
int
_IO_sungetc (fp)
return line + count - ptr - 1;
return start + count;
}
+INTDEF(_IO_adjust_column)
#if 0
/* Seems not to be needed. --drepper */
#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;
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
/* We want locking. */
return _IO_flush_all_lockp (1);
}
+INTDEF(_IO_flush_all)
void
_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;
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
_IO_cleanup_region_end (0);
#endif
}
+INTDEF(_IO_flush_all_linebuffered)
#ifdef _LIBC
weak_alias (_IO_flush_all_linebuffered, _flushlbf)
#endif
_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)
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.
{
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
}
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 */
}
return (unsigned char) c;
}
+INTDEF(_IO_default_pbackfail)
_IO_off64_t
_IO_default_seek (fp, offset, dir)
_IO_ITER
_IO_iter_begin()
{
- return (_IO_ITER) _IO_list_all;
+ return (_IO_ITER) INTUSE(_IO_list_all);
}
_IO_ITER
-/* 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
/* 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
__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;
#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;
}
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);
-/* 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
_IO_FILE *fp;
{
if (fp == NULL)
- return _IO_flush_all ();
+ return INTUSE(_IO_flush_all) ();
else
{
int result;
return result;
}
}
+INTDEF(_IO_fflush)
#ifdef weak_alias
weak_alias (_IO_fflush, fflush)
-/* 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
_IO_FILE *fp;
{
if (fp == NULL)
- return _IO_flush_all ();
+ return INTUSE(_IO_flush_all) ();
else
{
CHECK_FILE (fp, EOF);
-/* 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
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)
-/* 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
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)
-/* 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
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)
-/* 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
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)
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)
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;
}
-/* 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
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),
_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,
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),
-/* 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
_IO_cleanup_region_end (0);
return result;
}
+INTDEF(_IO_fputs)
#ifdef weak_alias
weak_alias (_IO_fputs, fputs)
-/* 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
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)
-/* 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
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;
}
-/* 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
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. */
-/* 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
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. */
-/* 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
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)
}
return pos;
}
+INTDEF(_IO_ftell)
#ifdef weak_alias
weak_alias (_IO_ftell, ftell)
-/* 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
else
return written / size;
}
+INTDEF(_IO_fwrite)
#ifdef weak_alias
weak_alias (_IO_fwrite, fwrite)
-/* 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
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.
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;
}
return ptr - buf;
}
+INTDEF(_IO_getline_info)
#endif /* Defined _LIBC || !_G_HAVE_IO_GETLINE_INFO */
-/* 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
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;
-/* 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
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;
#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*));
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
-/* 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
}
return written;
}
+INTDEF(_IO_padn)
-/* Copyright (C) 1993,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
+/* Copyright (C) 1993,1997-2001,2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Per Bothner <bothner@cygnus.com>.
#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;
}
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)
};
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)
};
-/* 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
_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))
{
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);
_IO_cleanup_region_end (0);
return retval;
}
+INTDEF(_IO_seekoff)
-/* 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
_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)
-/* 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
_IO_funlockfile (fp);
_IO_cleanup_region_end (0);
}
+INTDEF(_IO_setbuffer)
#ifdef weak_alias
weak_alias (_IO_setbuffer, setbuffer)
-/* 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
_IO_cleanup_region_end (0);
return result;
}
+INTDEF(_IO_setvbuf)
#ifdef weak_alias
weak_alias (_IO_setvbuf, setvbuf)
+++ /dev/null
-/* Copyright (C) 1993, 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA.
-
- As a special exception, if you link the code in this file with
- files compiled with a GNU compiler to produce an executable,
- that does not cause the resulting executable to be covered by
- the GNU Lesser General Public License. This exception does not
- however invalidate any other reasons why the executable file
- might be covered by the GNU Lesser General Public License.
- This exception applies to code released by its copyright holders
- in files containing the exception. */
-
-#include "libioP.h"
-
-#ifdef __STDC__
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-
-int
-#ifdef __STDC__
-_IO_sprintf (char *string, const char* format, ...)
-#else
-_IO_sprintf (string, format, va_alist)
- char *string;
- char *format;
- va_dcl
-#endif
-{
- int ret;
- va_list args;
- _IO_va_start (args, format);
- ret = _IO_vsprintf (string, format, args);
- va_end (args);
- return ret;
-}
-/* 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
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;
-/* 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
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;
-/* 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
#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 =
_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);
-/* 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
#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)
-/* 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
#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;
}
#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
#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, \
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
-/* 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
{
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),
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),
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;
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
fp->_IO_buf_base = NULL;
- _IO_default_finish (fp, 0);
+ INTUSE(_IO_default_finish) (fp, 0);
}
fp->_wide_data->_IO_buf_base = NULL;
- _IO_default_finish (fp, 0);
+ INTUSE(_IO_default_finish) (fp, 0);
}
/* Print output of stream to given obstack.
- Copyright (C) 1996, 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1996,1997,1999,2000,2001,2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
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));
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
-/* Copyright (C) 1993,95,97,98,99,2000 Free Software Foundation, Inc.
+/* Copyright (C) 1993,95,97,98,99,2000,2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Per Bothner <bothner@cygnus.com>.
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;
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;
if (!(fp->_flags & _IO_DELETE_DONT_CLOSE))
_IO_SYSCLOSE (fp);
}
- _IO_default_finish (fp, 0);
+ INTUSE(_IO_default_finish) (fp, 0);
}
_IO_FILE *
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;
}
}
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))
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
/* 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.
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)
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);
}
}
#ifdef TODO
- _IO_unsave_markers (fp);
+ INTUSE(_IO_unsave_markers) (fp);
#endif
if (fp->_flags & _IO_NO_READS)
return offset;
dumb:
- _IO_unsave_markers (fp);
+ INTUSE(_IO_unsave_markers) (fp);
result = _IO_SYSSEEK (fp, offset, dir);
if (result != EOF)
{
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;
}
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);
-/* 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
/* 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);
_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;
-/* 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
#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
#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;
}
-/* 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
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);
-/* 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
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);
-/* 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
#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
#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;
}
-/* 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
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. */
-/* 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
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. */
-/* Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Per Bothner <bothner@cygnus.com>.
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
#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;
}
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)
};
-/* 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
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
_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 =
-/* 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
_IO_cleanup_region_end (0);
return result;
}
+INTDEF(_IO_putc)
#undef putc
-/* 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
_IO_FILE *fp;
char *buf;
{
- _IO_setbuffer (fp, buf, _IO_BUFSIZ);
+ INTUSE(_IO_setbuffer) (fp, buf, _IO_BUFSIZ);
}
-/* 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
setlinebuf (stream)
_IO_FILE *stream;
{
- _IO_setvbuf (stream, NULL, 1, 0);
+ INTUSE(_IO_setvbuf) (stream, NULL, 1, 0);
}
-/* 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
# 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
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)
-/* 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
-/* 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
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;
/* 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)
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;
}
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);
fp->_IO_read_end = fp->_IO_write_ptr;
return c;
}
+INTDEF(_IO_str_overflow)
int
_IO_str_underflow (fp)
else
return EOF;
}
+INTDEF(_IO_str_underflow)
/* The size of the valid part of the buffer. */
}
return new_pos;
}
+INTDEF(_IO_str_seekoff)
int
_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)
(((_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),
-/* 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
#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);
-/* 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
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
-/* 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
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;
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),
_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';
-/* 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
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;
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),
-/* 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
/* 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)
{
#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;
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 =
return to_do == 0 ? 0 : WEOF;
}
+INTDEF(_IO_wdo_write)
wint_t
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;
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. */
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
#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;
return *fp->_wide_data->_IO_read_ptr;
}
+INTDEF(_IO_wfile_underflow)
static wint_t
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;
/* 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);
}
}
return WEOF;
return wch;
}
+INTDEF(_IO_wfile_overflow)
wint_t
_IO_wfile_sync (fp)
/* setg(base(), ptr, ptr); */
return retval;
}
+INTDEF(_IO_wfile_sync)
_IO_off64_t
_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. */
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)
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,
}
#ifdef TODO
- _IO_unsave_markers (fp);
+ INTUSE(_IO_unsave_markers) (fp);
#endif
if (fp->_flags & _IO_NO_READS)
return offset;
dumb:
- _IO_unsave_markers (fp);
+ INTUSE(_IO_unsave_markers) (fp);
result = _IO_SYSSEEK (fp, offset, dir);
if (result != EOF)
{
return offset;
}
+INTDEF(_IO_wfile_seekoff)
_IO_size_t
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)
};
-/* Copyright (C) 1993,1995,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
+/* Copyright (C) 1993,1995,1997-2001,2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Ulrich Drepper <drepper@cygnus.com>.
Based on the single byte version by Per Bothner <bothner@cygnus.com>.
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
/* 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. */
/* Set _IO_read_ptr. */
fp->_wide_data->_IO_read_ptr = fp->_wide_data->_IO_read_end;
}
+INTDEF(_IO_switch_to_wbackup_area)
void
else
f->_flags |= _IO_USER_BUF;
}
+INTDEF(_IO_wsetb)
wint_t
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)
{
}
return c;
}
+INTDEF(_IO_wdefault_pbackfail)
void
_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
return WEOF;
return *fp->_wide_data->_IO_read_ptr++;
}
+INTDEF(_IO_wdefault_uflow)
wint_t
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++;
}
return WEOF;
}
else if (_IO_have_wbackup (fp))
- _IO_free_wbackup_area (fp);
+ INTUSE(_IO_free_wbackup_area) (fp);
return _IO_UFLOW (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;
}
return WEOF;
}
else if (_IO_have_backup (fp))
- _IO_free_wbackup_area (fp);
+ INTUSE(_IO_free_wbackup_area) (fp);
return _IO_UNDERFLOW (fp);
}
}
return n - more;
}
+INTDEF(_IO_wdefault_xsputn)
_IO_size_t
}
return n - more;
}
+INTDEF(_IO_wdefault_xsgetn)
void
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 *
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;
= fp->_wide_data->_IO_read_end = 0;
return fp;
}
+INTDEF(_IO_wdefault_setbuf)
int
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
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
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);
return result;
}
+INTDEF(_IO_sputbackwc)
wint_t
_IO_sungetwc (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
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;
}
if (_IO_have_backup (fp))
- _IO_free_wbackup_area (fp);
+ INTUSE(_IO_free_wbackup_area) (fp);
}
-/* 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
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;
/* 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 =
{
if ((fp->_flags & _IO_NO_WRITES) && c != EOF)
return WEOF;
- return _IO_wdefault_pbackfail (fp, c);
+ return INTUSE(_IO_wdefault_pbackfail) (fp, c);
}
void
(((_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 =
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),
/* 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.
#ifdef USE_IN_LIBIO
# include <libio/iolibio.h>
# define fopen(f, n) _IO_fopen64 (f, n)
-# define setvbuf(s, b, f, l) _IO_setvbuf (s, b, f, l)
+# define setvbuf(s, b, f, l) INTUSE(_IO_setvbuf) (s, b, f, l)
#endif
#define TRACE_BUFFER_SIZE 512
/* 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.
# ifdef USE_IN_LIBIO
# include <libio/iolibio.h>
-# define fflush(s) _IO_fflush (s)
+# define fflush(s) INTUSE(_IO_fflush) (s)
+# undef putc
+# define putc(c, fp) INTUSE(_IO_putc) (c, fp)
# endif
#else /* not _LIBC */
#ifdef USE_IN_LIBIO
# include <libio/iolibio.h>
-# define ftell(s) _IO_ftell (s)
+# define ftell(s) INTUSE(_IO_ftell) (s)
#endif
static int LogType = SOCK_DGRAM; /* type of socket connection */
-/* Copyright (C) 1996,97,98,99,2000,2001 Free Software Foundation, Inc.
+/* Copyright (C) 1996,97,98,99,2000,2001,2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
#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
-/* Copyright (C) 1996,97,98,99,2000 Free Software Foundation, Inc.
+/* Copyright (C) 1996,97,98,99,2000,2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
#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
#define DEFAULT_CONFIG "dns [!UNAVAIL=return] files"
#include "XXX-lookup.c"
+
+INTDEF(__nss_hosts_lookup)
-/* 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
#ifdef USE_IN_LIBIO
# include <libio/iolibio.h>
-# define fread(p, m, n, s) _IO_fread (p, m, n, s)
+# define fread(p, m, n, s) INTUSE(_IO_fread) (p, m, n, s)
#endif
/* Read a word (int) from STREAM. */
-/* 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
# 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));
/* Floating point output for `printf'.
- Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1995-1999, 2000, 2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
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
/* Print size value using units for orders of magnitude.
- Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1997,1998,1999,2000,2001,2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
Based on a proposal by Larry McVoy <lm@sgi.com>.
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
-/* 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
#ifdef USE_IN_LIBIO
# include <libio/iolibio.h>
-# define fwrite(p, n, m, s) _IO_fwrite (p, n, m, s)
+# define fwrite(p, n, m, s) INTUSE(_IO_fwrite) (p, n, m, s)
#endif
/* Write the word (int) W to STREAM. */
-/* 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
#include <stdarg.h>
#include <stdio.h>
+#ifdef USE_IN_LIBIO
+# include <libioP.h>
+#endif
+
/* Read formatted input from stdin according to the format string FORMAT. */
/* VARARGS1 */
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
-/* 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
#ifdef USE_IN_LIBIO
# include <libio/iolibio.h>
-# define vsprintf(s, f, a) _IO_vsprintf (s, f, a)
+# define vsprintf(s, f, a) INTUSE(_IO_vsprintf) (s, f, a)
#endif
/* Write formatted output into S, according to the format string FORMAT. */
/* VARARGS2 */
int
-sprintf (s, format)
- char *s;
- const char *format;
+sprintf (char *s, const char *format, ...)
{
va_list arg;
int done;
return done;
}
+
+#ifdef USE_IN_LIBIO
+strong_alias(sprintf, _IO_sprintf)
+#endif
-/* 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
#ifdef USE_IN_LIBIO
# include <iolibio.h>
-# define __fdopen _IO_fdopen
+# define __fdopen INTUSE(_IO_fdopen)
#endif
/* This returns a new stream opened on a temporary file (generated
-/* 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
# 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
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),
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),
_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);
weak_alias (_IO_vfwprintf, vfwprintf);
# else
strong_alias (_IO_vfprintf, vfprintf);
+INTDEF(_IO_vfprintf)
# endif
# else
# if defined __ELF__ || defined __GNU_LIBRARY__
-/* 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
# 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))
# 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))
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
weak_alias (__vfwscanf, vfwscanf)
#else
weak_alias (__vfscanf, vfscanf)
+INTDEF(_IO_vfscanf)
#endif
/* 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 <drepper@cygnus.com>
and Jochen Hein <Jochen.Hein@informatik.TU-Clausthal.de>, 1996.
# 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;
#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
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)
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;
}
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);
}
/*
* 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;
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)
{
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;
}
/* 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;
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;
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;
}
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);
/*
* 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
/*
* 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)
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)
#ifdef USE_IN_LIBIO
# include <wchar.h>
# include <libio/iolibio.h>
-# 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;
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."));
}
/*
* 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
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;
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));
}
}
/*
* 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)
{
* 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 ();
{
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;
{
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;
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
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;
}
/*
* 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)
{
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
/*
* 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);
* 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 ();
{
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;
{
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;
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
{
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)
{
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))
{
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)
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)
{
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)
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)
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)
{
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)
{
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)
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;
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);
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);
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:
}
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:
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:
}
return TRUE;
}
+INTDEF(xdr_key_netstres)
#ifdef USE_IN_LIBIO
# include <libio/iolibio.h>
-# 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
/*
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"));
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;
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"));
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;
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)
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 */
*/
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)
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);
}
{
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))
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
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)
/*
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;
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))
{
* 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) &&
#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)
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
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;
}
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
}
}
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)
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
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 * * * * * * * * * * * * * * * */
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
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}};
/*
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)
/*
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 ************* */
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)
{
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;
}
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;
}
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;
}
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;
#ifdef USE_IN_LIBIO
# include <wchar.h>
# include <libio/iolibio.h>
-# define fputs(s, f) _IO_fputs (s, f)
+# define fputs(s, f) INTUSE(_IO_fputs) (s, f)
#endif
struct proglst_
*/
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);
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))
#ifdef USE_IN_LIBIO
# include <wchar.h>
# include <libio/iolibio.h>
-# define fputs(s, f) _IO_fputs (s, f)
+# define fputs(s, f) INTUSE(_IO_fputs) (s, f)
#endif
/*
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;
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;
}
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;
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;
}
#ifdef USE_IN_LIBIO
# include <wchar.h>
# include <libio/iolibio.h>
-# 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)
}
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;
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)
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
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;
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;
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;
}
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 */
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;
}
{
return TRUE;
}
+INTDEF(xdr_void)
/*
* XDR integers
}
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
}
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
return FALSE;
}
+INTDEF(xdr_long)
/*
* XDR unsigned long integers
}
return FALSE;
}
+INTDEF(xdr_u_long)
/*
* XDR hyper integers
return FALSE;
}
+INTDEF(xdr_hyper)
/*
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);
}
/*
}
return FALSE;
}
+INTDEF(xdr_short)
/*
* XDR unsigned short integers
}
return FALSE;
}
+INTDEF(xdr_u_short)
/*
int i;
i = (*cp);
- if (!xdr_int (xdrs, &i))
+ if (!INTUSE(xdr_int) (xdrs, &i))
{
return FALSE;
}
u_int u;
u = (*cp);
- if (!xdr_u_int (xdrs, &u))
+ if (!INTUSE(xdr_u_int) (xdrs, &u))
{
return FALSE;
}
}
return FALSE;
}
+INTDEF(xdr_bool)
/*
* XDR enumerations
}
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
}
return FALSE;
}
+INTDEF(xdr_opaque)
/*
* XDR counted bytes
/*
* 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;
}
/* fall into ... */
case XDR_ENCODE:
- return xdr_opaque (xdrs, sp, nodesize);
+ return INTUSE(xdr_opaque) (xdrs, sp, nodesize);
case XDR_FREE:
if (sp != NULL)
}
return FALSE;
}
+INTDEF(xdr_bytes)
/*
* Implemented here due to commonality of the object.
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
/*
* we deal with the discriminator; it's an enum
*/
- if (!xdr_enum (xdrs, dscmp))
+ if (!INTUSE(xdr_enum) (xdrs, dscmp))
{
return FALSE;
}
return ((dfault == NULL_xdrproc_t) ? FALSE :
(*dfault) (xdrs, unp, LASTUNSIGNED));
}
+INTDEF(xdr_union)
/*
case XDR_DECODE:
break;
}
- if (!xdr_u_int (xdrs, &size))
+ if (!INTUSE(xdr_u_int) (xdrs, &size))
{
return FALSE;
}
/* 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);
}
return FALSE;
}
+INTDEF(xdr_string)
/*
* Wrapper for xdr_string that can be called directly from
XDR *xdrs;
char **cpp;
{
- if (xdr_string (xdrs, cpp, LASTUNSIGNED))
+ if (INTUSE(xdr_string) (xdrs, cpp, LASTUNSIGNED))
{
return TRUE;
}
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;
}
}
return stat;
}
+INTDEF(xdr_array)
/*
* xdr_vector():
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
#ifdef USE_IN_LIBIO
# include <wchar.h>
# include <libio/iolibio.h>
-# 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 *);
rstrm->fbtbc = 0;
rstrm->last_frag = TRUE;
}
+INTDEF(xdrrec_create)
/*
rstrm->last_frag = FALSE;
return TRUE;
}
+INTDEF(xdrrec_skiprecord)
/*
* Lookahead function.
return TRUE;
return FALSE;
}
+INTDEF(xdrrec_eof)
/*
* The client must tell the package when an end-of-record has occurred.
rstrm->out_finger += BYTES_PER_XDR_UNIT;
return TRUE;
}
+INTDEF(xdrrec_endofrecord)
/*
#ifdef USE_IN_LIBIO
# include <wchar.h>
# include <libio/iolibio.h>
-# define fputs(s, f) _IO_fputs (s, f)
+# define fputs(s, f) INTUSE(_IO_fputs) (s, f)
#endif
#define LASTUNSIGNED ((u_int)0-1)
}
return stat;
}
+INTDEF(xdr_reference)
/*
bool_t more_data;
more_data = (*objpp != NULL);
- if (!xdr_bool (xdrs, &more_data))
+ if (!INTUSE(xdr_bool) (xdrs, &more_data))
{
return FALSE;
}
*objpp = NULL;
return TRUE;
}
- return xdr_reference (xdrs, objpp, obj_size, xdr_obj);
+ return INTUSE(xdr_reference) (xdrs, objpp, obj_size, xdr_obj);
}
#ifdef USE_IN_LIBIO
# include <libio/iolibio.h>
-# 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 *);
-/* 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
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. */
return buf;
}
- return (char *) _(_sys_errlist[errnum]);
+ return (char *) _(INTUSE(_sys_errlist)[errnum]);
}
weak_alias (__strerror_r, strerror_r)
/* 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 <drepper@cygnus.com>, 1997.
#ifdef USE_IN_LIBIO
# include <libioP.h>
# 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
/* 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
#ifdef USE_IN_LIBIO
# include <iolibio.h>
-# define __fdopen _IO_fdopen
+# define __fdopen INTUSE(_IO_fdopen)
# define tmpfile __new_tmpfile
#endif
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)";
}
#ifdef SYS_NERR_ALIAS
weak_alias (_sys_nerr, SYS_NERR_ALIAS)
#endif
+INTDEF2(SYS_ERRLIST, _sys_errlist)
+INTDEF2(SYS_NERR, _sys_nerr)