+2002-08-04 Jakub Jelinek <jakub@redhat.com>
+
+ * manual/debug.texi: Fix spelling to programmatically.
+ Reported by <hayastan132@hotmail.com>.
+
2002-08-04 Ulrich Drepper <drepper@redhat.com>
+ * include/libio.h: Add libc_hidden_proto for __uflow.
+ * include/stdio.h: Map fopen, fdopen, fclose, fputs, fsetpos, and
+ fgetpos to _IO_* names.
+ Add libc_hidden_proto for fileno, fwrite, fseek, fflush_unlocked,
+ fread_unlocked, fwrite_unlocked, fgets_unlocked, fputs_unlocked.
+ * include/wchar.h: Add libc_hidden_proto for fputws_unlocked,
+ putwc_unlocked, vswscanf.
+ * libio/iolibio.h: Add libc_hidden_proto for _IO_fputs.
+ * libio/fileno.c: Use <stdio.h> and libc_hidden_def.
+ * libio/fseek.c: Likewise.
+ * libio/fmemopen.c: Include "libioP.h". Call _IO_fopencookie and
+ not fopencookie.
+ * libio/genops.c (__uflow): Add libc_hidden_def.
+ * libio/iofflush_u.c (fflush_unlocked): Likewise.
+ * libio/iofgets_u.c (fgets_unlocked): Likewise.
+ * libio/iofputs_u.c (fputs_unlocked): Likewise.
+ * libio/iofputws_u.c (fputws_unlocked): Likewise.
+ * libio/iofread_u.c (fread_unlocked): Likewise.
+ * libio/iofwrite_u.c (fwrite_unlocked): Likewise.
+ * libio/iovswscanf.c (vswscanf): Likewise.
+ * libio/putwc_u.c (putwc_unlocked): Likewise.
+ * libio/iofputs.c: Use libc_hidden_def instead of INTDEF.
+ * malloc/malloc.c: Redirect fwrite calls to _IO_fwrite.
+ * malloc/mtrace.c: Likewise.
+
+ * sunrpc/clnt_perr.c: Remove fputs macro.
+ * sunrpc/svc_simple.c: Likewise.
+ * sunrpc/svc_tcp.c: Likewise.
+ * sunrpc/svc_udp.c: Likewise.
+ * sunrpc/xdr_rec.c: Likewise.
+ * sunrpc/xdr_ref.c: Likewise.
+
+ * iconv/Makefile: Add CPPFLAGS definitions with -DNOT_in_libc for
+ iconv_prog, linereader, and charmap-dir.
+ * locale/Makefile: Likewise for locale and charmap-dir.
+ * malloc/Makefile: Likewise for memusagestat.
+ * nscd/Makefile: Likewise for nscd, nscd_conf, and dbg_log.
+ * sunrpc/Makefile: Likewise for rpc_main.
+ * sysdeps/unix/sysv/linux/Makefile: Likewise for lddlibc4.
+ * timezone/Makefile: Likewise for zic.
+
+ * stdio-common/perror.c: Avoid multiple calls to fileno_unlocked.
+
* elf/dl-addr.c (_dl_addr): Add libc_hidden_def.
* elf/dl-close.c (_dl_close): Add libc_hidden_def.
* elf/dl-open.c (_dl_open): Add libc_hidden_def.
CFLAGS-gconv_conf.c = -DGCONV_PATH='"$(gconvdir)"'
CFLAGS-iconvconfig.c = -DGCONV_PATH='"$(gconvdir)"' -DGCONV_DIR='"$(gconvdir)"'
+CPPFLAGS-iconv_prog = -DNOT_IN_libc
CPPFLAGS-iconv_charmap = -DNOT_IN_libc
CPPFLAGS-iconvconfig = -DNOT_IN_libc
+CPPFLAGS-linereader = -DNOT_IN_libc
CPPFLAGS-strtab = -DNOT_IN_libc
CPPFLAGS-charmap = -DNOT_IN_libc
+CPPFLAGS-charmap-dir = -DNOT_IN_libc
include ../Rules
libc_hidden_proto (__overflow)
libc_hidden_proto (__underflow)
+libc_hidden_proto (__uflow)
libc_hidden_proto (__woverflow)
libc_hidden_proto (__wunderflow)
libc_hidden_proto (__wuflow)
extern int __ftrylockfile (FILE *__stream);
extern int __getc_unlocked (FILE *__fp);
-# ifdef USE_IN_LIBIO
extern wint_t __getwc_unlocked (FILE *__fp);
-# endif
extern __const char *__const _sys_errlist_internal[] attribute_hidden;
# ifndef NOT_IN_libc
# define __asprintf(ptr, fmt, args...) \
INTUSE(__asprintf) (ptr, fmt, ##args)
+
+extern _IO_FILE *_IO_new_fopen __P((const char*, const char*));
+# define fopen(fname, mode) _IO_new_fopen (fname, mode)
+extern _IO_FILE *_IO_new_fdopen __P((int, const char*));
+# define fdopen(fd, mode) _IO_new_fdopen (fd, mode)
+extern int _IO_new_fclose __P((_IO_FILE*));
+# define fclose(fp) _IO_new_fclose (fp)
+extern int _IO_fputs __P((const char*, _IO_FILE*));
+libc_hidden_proto (_IO_fputs)
+# define fputs(str, fp) _IO_fputs (str, fp)
+extern int _IO_new_fsetpos __P ((_IO_FILE *, const _IO_fpos_t *));
+# define fsetpos(fp, posp) _IO_new_fsetpos (fp, posp)
+extern int _IO_new_fgetpos __P ((_IO_FILE *, _IO_fpos_t *));
+# define fgetpos(fp, posp) _IO_new_fgetpos (fp, posp)
# endif
+libc_hidden_proto (fileno)
+libc_hidden_proto (fwrite)
+libc_hidden_proto (fseek)
+libc_hidden_proto (fflush_unlocked)
+libc_hidden_proto (fread_unlocked)
+libc_hidden_proto (fwrite_unlocked)
+libc_hidden_proto (fgets_unlocked)
+libc_hidden_proto (fputs_unlocked)
+
# endif
#endif
libc_hidden_proto (__wcscasecmp_l)
libc_hidden_proto (__wcsncasecmp_l)
+libc_hidden_proto (fputws_unlocked)
+libc_hidden_proto (putwc_unlocked)
+
+libc_hidden_proto (vswscanf)
+
/* Now define the internal interfaces. */
extern int __wcscasecmp (__const wchar_t *__s1, __const wchar_t *__s2)
-/* 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
in files containing the exception. */
#include "libioP.h"
-#include "stdio.h"
+#include <stdio.h>
int
fileno (fp)
return _IO_fileno (fp);
}
+libc_hidden_def (fileno)
#ifdef _IO_MTSAFE_IO
#ifdef weak_alias
/* Fmemopen implementation.
- Copyright (C) 2000 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Hanno Mueller, kontakt@hanno.de, 2000.
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
+#include "libioP.h"
+
typedef struct fmemopen_cookie_struct fmemopen_cookie_t;
struct fmemopen_cookie_struct
iof.seek = fmemopen_seek;
iof.close = fmemopen_close;
- return fopencookie (c, mode, iof);
+ return _IO_fopencookie (c, mode, iof);
}
-/* 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
in files containing the exception. */
#include "libioP.h"
-#include "stdio.h"
+#include <stdio.h>
int
fseek (fp, offset, whence)
_IO_cleanup_region_end (0);
return result;
}
+libc_hidden_def (fseek)
INTUSE(_IO_free_backup_area) (fp);
return _IO_UFLOW (fp);
}
+libc_hidden_def (__uflow)
void
_IO_setb (f, b, eb, a)
_IO_FILE *f;
- char *b;
+ char *b;
char *eb;
int a;
{
return _IO_SYNC (fp) ? EOF : 0;
}
}
+libc_hidden_def (fflush_unlocked)
fp->_IO_file_flags |= old_error;
return result;
}
+libc_hidden_def (fgets_unlocked)
_IO_cleanup_region_end (0);
return result;
}
-INTDEF(_IO_fputs)
+libc_hidden_def (_IO_fputs)
#ifdef weak_alias
weak_alias (_IO_fputs, fputs)
-/* 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
result = 1;
return result;
}
+libc_hidden_def (fputs_unlocked)
-/* Copyright (C) 1993,1996,1997,1998,1999,2000 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1996-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
result = 1;
return result;
}
+libc_hidden_def (fputws_unlocked)
bytes_read = INTUSE(_IO_sgetn) (fp, (char *) buf, bytes_requested);
return bytes_requested == bytes_read ? count : bytes_read / size;
}
+libc_hidden_def (fread_unlocked)
-/* Copyright (C) 1993, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1996-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
return written / size;
}
+libc_hidden_def (fwrite_unlocked)
extern _IO_FILE *__fopen_maybe_mmap __P((_IO_FILE *));
extern int _IO_fprintf __P((_IO_FILE*, const char*, ...));
extern int _IO_fputs __P((const char*, _IO_FILE*));
+libc_hidden_proto (_IO_fputs)
extern int _IO_fsetpos __P((_IO_FILE*, const _IO_fpos_t *));
extern int _IO_fsetpos64 __P((_IO_FILE*, const _IO_fpos64_t *));
extern long int _IO_ftell __P((_IO_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
ret = _IO_vfwscanf ((_IO_FILE *) &sf._sbf, format, args, NULL);
return ret;
}
+libc_hidden_def (vswscanf)
-/* Copyright (C) 1991, 1995, 1996, 1997, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1991,1995,1996,1997,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
CHECK_FILE (fp, WEOF);
return _IO_putc_unlocked (wc, fp);
}
+libc_hidden_def (putwc_unlocked)
CFLAGS-locfile.c = -Wno-write-strings -Wno-char-subscripts
CFLAGS-charmap-dir.c = -Wno-write-strings
+CPPFLAGS-locale = -DNOT_IN_libc
CPPFLAGS-localedef = -DNOT_IN_libc
CPPFLAGS-ld-ctype = -DNOT_IN_libc
CPPFLAGS-ld-time = -DNOT_IN_libc
CPPFLAGS-charmap = -DNOT_IN_libc
CPPFLAGS-locarchive = -DNOT_IN_libc
CPPFLAGS-linereader = -DNOT_IN_libc
+CPPFLAGS-charmap-dir = -DNOT_IN_libc
# Depend on libc.so so a DT_NEEDED is generated in the shared objects.
# This ensures they will load libc.so for needed symbols if loaded by
include ../Makeconfig
+CPPFLAGS-memusagestat = -DNOT_IN_libc
+
# The Perl script to analyze the output of the mtrace functions.
ifneq ($(PERL),no)
install-bin-script = mtrace
#ifndef _LIBC
#define __builtin_expect(expr, val) (expr)
+
+#define fwrite(buf, size, count, fp) _IO_fwrite (buf, size, count, fp)
#endif
/*
# include <libio/iolibio.h>
# define fopen(f, n) _IO_fopen64 (f, n)
# define setvbuf(s, b, f, l) INTUSE(_IO_setvbuf) (s, b, f, l)
+# define fwrite(buf, size, count, fp) _IO_fwrite (buf, size, count, fp)
#endif
#ifndef attribute_hidden
Applications are usually debugged using dedicated debugger programs.
But sometimes this is not possible and, in any case, it is useful to
-provide the developer with as much information as possible at the time
+provide the developer with as much information as possible at the time
the problems are experienced. For this reason a few functions are
provided which a program can use to help the developer more easily
locate the problem.
A @dfn{backtrace} is a list of the function calls that are currently
active in a thread. The usual way to inspect a backtrace of a program
is to use an external debugger such as gdb. However, sometimes it is
-useful to obtain a backtrace programatically from within a program,
+useful to obtain a backtrace programmatically from within a program,
e.g., for the purposes of logging or diagnostics.
The header file @file{execinfo.h} declares three functions that obtain
include ../Rules
+CPPFLAGS-nscd = -DNOT_IN_libc
+CPPFLAGS-nscd_conf = -DNOT_IN_libc
+CPPFLAGS-dbg_log = -DNOT_IN_libc
CPPFLAGS-connections = -DNOT_IN_libc
CPPFLAGS-hstcache = -DNOT_IN_libc
-/* Copyright (C) 1991-1993,1997,1998,2000,2001 Free Software Foundation, Inc.
+/* Copyright (C) 1991-1993,1997,1998,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
oriented yet? In this case we'll create a new stream which is
using the same underlying file descriptor. */
if (__builtin_expect (_IO_fwide (stderr, 0) != 0, 1)
- || fileno_unlocked (stderr) == -1
- || (fd = __dup (fileno_unlocked (stderr))) == -1
+ || (fd = fileno (stderr)) == -1
+ || (fd = __dup (fd)) == -1
|| (fp = fdopen (fd, "w+")) == NULL)
{
if (__builtin_expect (fd != -1, 0))
CPPFLAGS-key_call.c += -DHAVE_DOORS=1
endif
CPPFLAGS += -D_RPC_THREAD_SAFE_
+CPPFLAGS-rpc_main += -DNOT_IN_libc
include ../Rules
ifeq ($(subdir),elf)
sysdep-rtld-routines += dl-brk dl-sbrk
+
+CPPFLAGS-lddlibc4 += -DNOT_IN_libc
endif
include ../Makeconfig # Get objpfx defined so we can use it below.
+CPPFLAGS-zic = -DNOT_IN_libc
+
# z.* use this variable.
define nl