summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-08-04 20:54:20 +0000
committerUlrich Drepper <drepper@redhat.com>2002-08-04 20:54:20 +0000
commit3ba06713f8c2c40f3bf0cc9431352ba873701dcd (patch)
tree36256db414f400d56ccecb0c46e4eac881af6ecc
parenta20d8dbee755d866372e017adf9cf342362d065f (diff)
downloadglibc-3ba06713f8c2c40f3bf0cc9431352ba873701dcd.tar.gz
Update.
2002-08-04 Jakub Jelinek <jakub@redhat.com> * manual/debug.texi: Fix spelling to programmatically. Reported by <hayastan132@hotmail.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.
-rw-r--r--ChangeLog48
-rw-r--r--iconv/Makefile3
-rw-r--r--include/libio.h1
-rw-r--r--include/stdio.h25
-rw-r--r--include/wchar.h5
-rw-r--r--libio/fileno.c5
-rw-r--r--libio/fmemopen.c6
-rw-r--r--libio/fseek.c5
-rw-r--r--libio/genops.c3
-rw-r--r--libio/iofflush_u.c1
-rw-r--r--libio/iofgets_u.c1
-rw-r--r--libio/iofputs.c2
-rw-r--r--libio/iofputs_u.c3
-rw-r--r--libio/iofputws_u.c3
-rw-r--r--libio/iofread_u.c1
-rw-r--r--libio/iofwrite_u.c3
-rw-r--r--libio/iolibio.h1
-rw-r--r--libio/iovswscanf.c3
-rw-r--r--libio/putwc_u.c3
-rw-r--r--locale/Makefile2
-rw-r--r--malloc/Makefile2
-rw-r--r--malloc/malloc.c2
-rw-r--r--malloc/mtrace.c1
-rw-r--r--manual/debug.texi4
-rw-r--r--nscd/Makefile3
-rw-r--r--stdio-common/perror.c6
-rw-r--r--sunrpc/Makefile1
-rw-r--r--sysdeps/unix/sysv/linux/Makefile2
-rw-r--r--timezone/Makefile2
29 files changed, 127 insertions, 20 deletions
diff --git a/ChangeLog b/ChangeLog
index 36f9d57958..2b7c71faf7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,53 @@
+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.
diff --git a/iconv/Makefile b/iconv/Makefile
index eb8ffacd8c..15846c2c07 100644
--- a/iconv/Makefile
+++ b/iconv/Makefile
@@ -63,10 +63,13 @@ CFLAGS-gconv_cache.c += -DGCONV_DIR='"$(gconvdir)"'
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
diff --git a/include/libio.h b/include/libio.h
index a3a6518876..ee727e262f 100644
--- a/include/libio.h
+++ b/include/libio.h
@@ -5,6 +5,7 @@
libc_hidden_proto (__overflow)
libc_hidden_proto (__underflow)
+libc_hidden_proto (__uflow)
libc_hidden_proto (__woverflow)
libc_hidden_proto (__wunderflow)
libc_hidden_proto (__wuflow)
diff --git a/include/stdio.h b/include/stdio.h
index 4f144d3e78..e58c033709 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -62,9 +62,7 @@ extern void __funlockfile (FILE *__stream);
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;
@@ -76,8 +74,31 @@ extern int __asprintf_internal (char **__restrict __ptr,
# 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
diff --git a/include/wchar.h b/include/wchar.h
index 8395392de6..cb63ed97a9 100644
--- a/include/wchar.h
+++ b/include/wchar.h
@@ -14,6 +14,11 @@ libc_hidden_proto (__wcstoull_internal)
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)
diff --git a/libio/fileno.c b/libio/fileno.c
index 3b24cd093c..036ddb1b46 100644
--- a/libio/fileno.c
+++ b/libio/fileno.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995, 1996, 1997, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -26,7 +26,7 @@
in files containing the exception. */
#include "libioP.h"
-#include "stdio.h"
+#include <stdio.h>
int
fileno (fp)
@@ -42,6 +42,7 @@ fileno (fp)
return _IO_fileno (fp);
}
+libc_hidden_def (fileno)
#ifdef _IO_MTSAFE_IO
#ifdef weak_alias
diff --git a/libio/fmemopen.c b/libio/fmemopen.c
index 3afc04929c..a1c75f2cf1 100644
--- a/libio/fmemopen.c
+++ b/libio/fmemopen.c
@@ -1,5 +1,5 @@
/* 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.
@@ -75,6 +75,8 @@
#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
@@ -237,5 +239,5 @@ fmemopen (void *buf, size_t len, const char *mode)
iof.seek = fmemopen_seek;
iof.close = fmemopen_close;
- return fopencookie (c, mode, iof);
+ return _IO_fopencookie (c, mode, iof);
}
diff --git a/libio/fseek.c b/libio/fseek.c
index ccb2238ab9..831a4d497b 100644
--- a/libio/fseek.c
+++ b/libio/fseek.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1993,1995,1996,1997,1998,2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -26,7 +26,7 @@
in files containing the exception. */
#include "libioP.h"
-#include "stdio.h"
+#include <stdio.h>
int
fseek (fp, offset, whence)
@@ -43,3 +43,4 @@ fseek (fp, offset, whence)
_IO_cleanup_region_end (0);
return result;
}
+libc_hidden_def (fseek)
diff --git a/libio/genops.c b/libio/genops.c
index eb03664b80..115c7dfe9a 100644
--- a/libio/genops.c
+++ b/libio/genops.c
@@ -383,11 +383,12 @@ __uflow (fp)
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;
{
diff --git a/libio/iofflush_u.c b/libio/iofflush_u.c
index 4603ec388c..d604ebfec2 100644
--- a/libio/iofflush_u.c
+++ b/libio/iofflush_u.c
@@ -40,3 +40,4 @@ fflush_unlocked (fp)
return _IO_SYNC (fp) ? EOF : 0;
}
}
+libc_hidden_def (fflush_unlocked)
diff --git a/libio/iofgets_u.c b/libio/iofgets_u.c
index bf5bb09681..ded2a7c83c 100644
--- a/libio/iofgets_u.c
+++ b/libio/iofgets_u.c
@@ -59,3 +59,4 @@ fgets_unlocked (buf, n, fp)
fp->_IO_file_flags |= old_error;
return result;
}
+libc_hidden_def (fgets_unlocked)
diff --git a/libio/iofputs.c b/libio/iofputs.c
index 0835e8417f..f2fd21d66a 100644
--- a/libio/iofputs.c
+++ b/libio/iofputs.c
@@ -45,7 +45,7 @@ _IO_fputs (str, fp)
_IO_cleanup_region_end (0);
return result;
}
-INTDEF(_IO_fputs)
+libc_hidden_def (_IO_fputs)
#ifdef weak_alias
weak_alias (_IO_fputs, fputs)
diff --git a/libio/iofputs_u.c b/libio/iofputs_u.c
index 02427f8f33..475e5334d2 100644
--- a/libio/iofputs_u.c
+++ b/libio/iofputs_u.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1993,1996,1997,1998,1999,2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -41,3 +41,4 @@ fputs_unlocked (str, fp)
result = 1;
return result;
}
+libc_hidden_def (fputs_unlocked)
diff --git a/libio/iofputws_u.c b/libio/iofputws_u.c
index bbfef0942d..a73f6b529e 100644
--- a/libio/iofputws_u.c
+++ b/libio/iofputws_u.c
@@ -1,4 +1,4 @@
-/* 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
@@ -42,3 +42,4 @@ fputws_unlocked (str, fp)
result = 1;
return result;
}
+libc_hidden_def (fputws_unlocked)
diff --git a/libio/iofread_u.c b/libio/iofread_u.c
index 527af10de2..98c7ffdd16 100644
--- a/libio/iofread_u.c
+++ b/libio/iofread_u.c
@@ -45,3 +45,4 @@ fread_unlocked (buf, size, count, fp)
bytes_read = INTUSE(_IO_sgetn) (fp, (char *) buf, bytes_requested);
return bytes_requested == bytes_read ? count : bytes_read / size;
}
+libc_hidden_def (fread_unlocked)
diff --git a/libio/iofwrite_u.c b/libio/iofwrite_u.c
index e4e9733947..738cc5b28f 100644
--- a/libio/iofwrite_u.c
+++ b/libio/iofwrite_u.c
@@ -1,4 +1,4 @@
-/* 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
@@ -51,3 +51,4 @@ fwrite_unlocked (buf, size, count, fp)
return written / size;
}
+libc_hidden_def (fwrite_unlocked)
diff --git a/libio/iolibio.h b/libio/iolibio.h
index be04604ded..80fb527d88 100644
--- a/libio/iolibio.h
+++ b/libio/iolibio.h
@@ -25,6 +25,7 @@ extern _IO_FILE *__fopen_internal __P((const char*, const char*, int));
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*));
diff --git a/libio/iovswscanf.c b/libio/iovswscanf.c
index dd7dbf8c37..1bbddd442f 100644
--- a/libio/iovswscanf.c
+++ b/libio/iovswscanf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1997-2000, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1997-2000, 2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -47,3 +47,4 @@ vswscanf (string, format, args)
ret = _IO_vfwscanf ((_IO_FILE *) &sf._sbf, format, args, NULL);
return ret;
}
+libc_hidden_def (vswscanf)
diff --git a/libio/putwc_u.c b/libio/putwc_u.c
index 95db001260..b76a313927 100644
--- a/libio/putwc_u.c
+++ b/libio/putwc_u.c
@@ -1,4 +1,4 @@
-/* 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
@@ -27,3 +27,4 @@ putwc_unlocked (wc, fp)
CHECK_FILE (fp, WEOF);
return _IO_putc_unlocked (wc, fp);
}
+libc_hidden_def (putwc_unlocked)
diff --git a/locale/Makefile b/locale/Makefile
index ebcf7bd668..d3c62adc07 100644
--- a/locale/Makefile
+++ b/locale/Makefile
@@ -99,6 +99,7 @@ CFLAGS-charmap.c = -Wno-write-strings -Wno-char-subscripts
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
@@ -109,6 +110,7 @@ CPPFLAGS-ld-identification = -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
diff --git a/malloc/Makefile b/malloc/Makefile
index 226ed99fc3..bb7d15db7b 100644
--- a/malloc/Makefile
+++ b/malloc/Makefile
@@ -56,6 +56,8 @@ aux := set-freeres
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
diff --git a/malloc/malloc.c b/malloc/malloc.c
index 08b8e86794..685514900c 100644
--- a/malloc/malloc.c
+++ b/malloc/malloc.c
@@ -490,6 +490,8 @@ Void_t *(*__morecore)(ptrdiff_t) = __default_morecore;
#ifndef _LIBC
#define __builtin_expect(expr, val) (expr)
+
+#define fwrite(buf, size, count, fp) _IO_fwrite (buf, size, count, fp)
#endif
/*
diff --git a/malloc/mtrace.c b/malloc/mtrace.c
index 171eb5a570..52347ea117 100644
--- a/malloc/mtrace.c
+++ b/malloc/mtrace.c
@@ -42,6 +42,7 @@
# 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
diff --git a/manual/debug.texi b/manual/debug.texi
index fe5244a2cf..a6ec0c4d56 100644
--- a/manual/debug.texi
+++ b/manual/debug.texi
@@ -5,7 +5,7 @@
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.
@@ -26,7 +26,7 @@ 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
diff --git a/nscd/Makefile b/nscd/Makefile
index a3cbe7cf6a..434cf4d759 100644
--- a/nscd/Makefile
+++ b/nscd/Makefile
@@ -53,6 +53,9 @@ distribute := nscd.h nscd-client.h dbg_log.h \
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
diff --git a/stdio-common/perror.c b/stdio-common/perror.c
index 077eed5867..6a4e3494ed 100644
--- a/stdio-common/perror.c
+++ b/stdio-common/perror.c
@@ -1,4 +1,4 @@
-/* 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
@@ -65,8 +65,8 @@ perror (const char *s)
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))
diff --git a/sunrpc/Makefile b/sunrpc/Makefile
index dd21ddf102..6f978e61c1 100644
--- a/sunrpc/Makefile
+++ b/sunrpc/Makefile
@@ -121,6 +121,7 @@ ifeq (yes,$(have_doors))
CPPFLAGS-key_call.c += -DHAVE_DOORS=1
endif
CPPFLAGS += -D_RPC_THREAD_SAFE_
+CPPFLAGS-rpc_main += -DNOT_IN_libc
include ../Rules
diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile
index 68e9a1ea4c..9a2bbc492e 100644
--- a/sysdeps/unix/sysv/linux/Makefile
+++ b/sysdeps/unix/sysv/linux/Makefile
@@ -110,4 +110,6 @@ endif
ifeq ($(subdir),elf)
sysdep-rtld-routines += dl-brk dl-sbrk
+
+CPPFLAGS-lddlibc4 += -DNOT_IN_libc
endif
diff --git a/timezone/Makefile b/timezone/Makefile
index 41a9c1d78d..cf2c7d7f42 100644
--- a/timezone/Makefile
+++ b/timezone/Makefile
@@ -48,6 +48,8 @@ all: # Make this the default target; it will be defined in Rules.
include ../Makeconfig # Get objpfx defined so we can use it below.
+CPPFLAGS-zic = -DNOT_IN_libc
+
# z.* use this variable.
define nl