Update.
authorUlrich Drepper <drepper@redhat.com>
Wed, 8 Jan 2003 06:49:39 +0000 (06:49 +0000)
committerUlrich Drepper <drepper@redhat.com>
Wed, 8 Jan 2003 06:49:39 +0000 (06:49 +0000)
Unify symbols in user namespace exported by libc.so and libc.a.
* argp/argp-fmtstream.c: Don't define argp_make_fmtstream,
argp_fmtstream_free, and argp_fmtstream_printf.
* argp/argp-fs-xinl.c: Don't define argp_fmtstream_putc,
argp_fmtstream_puts, argp_fmtstream_write, argp_fmtstream_set_lmargin,
argp_fmtstream_set_rmargin, argp_fmtstream_set_wmargin, and
argp_fmtstream_point.
* gmon/gmon.c: Don't define write_profiling.
* libio/genops.c: Don't define _cleanup.

* intl/explodename.c (_nl_find_language.c): Mark as static.
* intl/loadinfo.h: Remove _nl_find_language prototype.

* libio/fileops.c (_IO_file_seekoff_maybe_mmap): Mark as static.
* libio/libioP.h: Remove declaration.

* libio/iopopen.c (_IO_proc_jumps): Mark as static.
* libio/libioP.h: Remove declaration.

* sysdeps/generic/unwind-dw2.c: Mark __frame_state_for with STATIC.
* sysdeps/generic/framestate.c: Define STATIC before including
unwind-dw2.c.

14 files changed:
ChangeLog
argp/argp-fmtstream.c
argp/argp-fs-xinl.c
gmon/gmon.c
intl/explodename.c
intl/loadinfo.h
libio/fileops.c
libio/genops.c
libio/iopopen.c
libio/libioP.h
linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile
linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
sysdeps/generic/framestate.c
sysdeps/generic/unwind-dw2.c

index 877f1dd3e0ebc1f00a6be75d11320717d9d410e8..f28cc7416893e1c924bc0448885df73e545b5f28 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,28 @@
 2003-01-07  Ulrich Drepper  <drepper@redhat.com>
 
+       Unify symbols in user namespace exported by libc.so and libc.a.
+       * argp/argp-fmtstream.c: Don't define argp_make_fmtstream,
+       argp_fmtstream_free, and argp_fmtstream_printf.
+       * argp/argp-fs-xinl.c: Don't define argp_fmtstream_putc,
+       argp_fmtstream_puts, argp_fmtstream_write, argp_fmtstream_set_lmargin,
+       argp_fmtstream_set_rmargin, argp_fmtstream_set_wmargin, and
+       argp_fmtstream_point.
+       * gmon/gmon.c: Don't define write_profiling.
+       * libio/genops.c: Don't define _cleanup.
+
+       * intl/explodename.c (_nl_find_language.c): Mark as static.
+       * intl/loadinfo.h: Remove _nl_find_language prototype.
+
+       * libio/fileops.c (_IO_file_seekoff_maybe_mmap): Mark as static.
+       * libio/libioP.h: Remove declaration.
+
+       * libio/iopopen.c (_IO_proc_jumps): Mark as static.
+       * libio/libioP.h: Remove declaration.
+
+       * sysdeps/generic/unwind-dw2.c: Mark __frame_state_for with STATIC.
+       * sysdeps/generic/framestate.c: Define STATIC before including
+       unwind-dw2.c.
+
        * time/Versions [GLIBC_2.3.2] (libc): Export strptime_l.
 
 2003-01-06  Philip Blundell  <philb@gnu.org>
index 6d461aa984f463c7b2239749688ed7f7eb1d5b6a..d06ea8453bc1df2c163c2cebb9b857af98f8d354 100644 (file)
@@ -1,5 +1,5 @@
 /* Word-wrapping and line-truncating streams
-   Copyright (C) 1997, 1998, 1999, 2001, 2002 Free Software Foundation, Inc.
+   Copyright (C) 1997,1998,1999,2001,2002,2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Written by Miles Bader <miles@gnu.ai.mit.edu>.
 
@@ -87,9 +87,12 @@ __argp_make_fmtstream (FILE *stream,
 
   return fs;
 }
+#if 0
+/* Not exported.  */
 #ifdef weak_alias
 weak_alias (__argp_make_fmtstream, argp_make_fmtstream)
 #endif
+#endif
 
 /* Flush FS to its stream, and free it (but don't close the stream).  */
 void
@@ -108,9 +111,12 @@ __argp_fmtstream_free (argp_fmtstream_t fs)
   free (fs->buf);
   free (fs);
 }
+#if 0
+/* Not exported.  */
 #ifdef weak_alias
 weak_alias (__argp_fmtstream_free, argp_fmtstream_free)
 #endif
+#endif
 \f
 /* Process FS's buffer so that line wrapping is done from POINT_OFFS to the
    end of its buffer.  This code is mostly from glibc stdio/linewrap.c.  */
@@ -424,8 +430,11 @@ __argp_fmtstream_printf (struct argp_fmtstream *fs, const char *fmt, ...)
 
   return out;
 }
+#if 0
+/* Not exported.  */
 #ifdef weak_alias
 weak_alias (__argp_fmtstream_printf, argp_fmtstream_printf)
 #endif
+#endif
 
 #endif /* !ARGP_FMTSTREAM_USE_LINEWRAP */
index b61a303e83bb874ec6a3bd086cd53121a7e59b44..21f9bd9f7187e4cf103729aff185c7f9c9deeaf9 100644 (file)
@@ -1,5 +1,5 @@
 /* Real definitions for extern inline functions in argp-fmtstream.h
-   Copyright (C) 1997 Free Software Foundation, Inc.
+   Copyright (C) 1997, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Written by Miles Bader <miles@gnu.ai.mit.edu>.
 
@@ -27,6 +27,8 @@
 #define __OPTIMIZE__
 #include "argp-fmtstream.h"
 
+#if 0
+/* Not exported.  */
 /* Add weak aliases.  */
 #if _LIBC - 0 && !defined (ARGP_FMTSTREAM_USE_LINEWRAP) && defined (weak_alias)
 
@@ -39,3 +41,4 @@ weak_alias (__argp_fmtstream_set_wmargin, argp_fmtstream_set_wmargin)
 weak_alias (__argp_fmtstream_point, argp_fmtstream_point)
 
 #endif
+#endif
index 72654840fc96c0a42674dd14e38555b8f531e15d..889f9ac6a75489ea08667e1a64b49ee1c171249d 100644 (file)
@@ -381,7 +381,14 @@ __write_profiling (void)
     write_gmon ();
   _gmonparam.state = save;
 }
+#ifndef SHARED
+/* This symbol isn't used anywhere in the DSO and it is not exported.
+   This would normally mean it should be removed to get the same API
+   in static libraries.  But since profiling is special in static libs
+   anyway we keep it.  But not when building the DSO since some
+   quality assurance tests will otherwise trigger.  */
 weak_alias (__write_profiling, write_profiling)
+#endif
 
 
 void
index bfaa5aba53f1af2ddb92f0581e748989c613f8c9..f7bcfa5ff66f5a0d2b5d45f9424ba66ce66b01d1 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-1998, 2000, 2001, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2002, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
 
@@ -38,7 +38,9 @@
 
 /* @@ end of prolog @@ */
 
-char *
+static char *_nl_find_language PARAMS ((const char *name));
+
+static char *
 _nl_find_language (name)
      const char *name;
 {
index 72f1b3e9f156d10e1dc3e0c4011c246edad6ac76..c2b6971b36c10b48e421a32fa0ecd0ad20978018 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996,1997,1998,1999,2000,2002 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2000, 2002, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
 
@@ -96,6 +96,4 @@ extern int _nl_explode_name PARAMS ((char *name, const char **language,
                                     const char **codeset,
                                     const char **normalized_codeset));
 
-extern char *_nl_find_language PARAMS ((const char *name));
-
 #endif /* loadinfo.h */
index c914e84ce0573cd60c5ffcbbe40c5cc9336906ab..534060347619a0debdb82861acc2e3828ec32b2c 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1995, 1997-2001, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995, 1997-2002, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Written by Per Bothner <bothner@cygnus.com>.
 
@@ -1185,12 +1185,9 @@ _IO_file_seekoff_mmap (fp, offset, dir, mode)
   return offset;
 }
 
-_IO_off64_t
-_IO_file_seekoff_maybe_mmap (fp, offset, dir, mode)
-     _IO_FILE *fp;
-     _IO_off64_t offset;
-     int dir;
-     int mode;
+static _IO_off64_t
+_IO_file_seekoff_maybe_mmap (_IO_FILE *fp, _IO_off64_t offset, int dir,
+                            int mode)
 {
   /* We only get here when we haven't tried to read anything yet.
      So there is nothing more useful for us to do here than just
index 74558807e72003607a44c0238caadf5ea7e9469d..c88a26f5f9e39e340fdb07cf43db5ad67239fbd0 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993,1995,1997-2001,2002 Free Software Foundation, Inc.
+/* Copyright (C) 1993,1995,1997-2002, 2003 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
@@ -1264,10 +1264,6 @@ __io_defs io_defs__;
 
 #endif /* TODO */
 
-#ifdef weak_alias
-weak_alias (_IO_cleanup, _cleanup)
-#endif
-
 #ifdef text_set_element
-text_set_element(__libc_atexit, _cleanup);
+text_set_element(__libc_atexit, _IO_cleanup);
 #endif
index d6a6f6aa47e2cff26b5357989f5c9d8c9e41b8a4..80a97f1b64367b620ae3ec8c1f96238cae63119f 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993,1997-2001,2002 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1997-2002, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Written by Per Bothner <bothner@cygnus.com>.
 
@@ -104,6 +104,7 @@ struct _IO_proc_file
 };
 typedef struct _IO_proc_file _IO_proc_file;
 
+static struct _IO_jump_t _IO_proc_jumps;
 static struct _IO_jump_t _IO_wproc_jumps;
 
 static struct _IO_proc_file *proc_file_chain;
@@ -284,7 +285,7 @@ _IO_new_proc_close (fp)
 #endif
 }
 
-struct _IO_jump_t _IO_proc_jumps = {
+static struct _IO_jump_t _IO_proc_jumps = {
   JUMP_INIT_DUMMY,
   JUMP_INIT(finish, _IO_new_file_finish),
   JUMP_INIT(overflow, _IO_new_file_overflow),
index 760bb1e702699113292a974bdb22e7ed21ea6e5f..d55bd739026634b09c7b20cde6b0953b348725ce 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1997-2001, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1997-2002, 2003 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
@@ -457,7 +457,6 @@ extern struct _IO_jump_t _IO_wfile_jumps_mmap attribute_hidden;
 extern struct _IO_jump_t _IO_wfile_jumps_maybe_mmap attribute_hidden;
 extern struct _IO_jump_t _IO_old_file_jumps attribute_hidden;
 extern struct _IO_jump_t _IO_streambuf_jumps;
-extern struct _IO_jump_t _IO_proc_jumps attribute_hidden;
 extern struct _IO_jump_t _IO_old_proc_jumps attribute_hidden;
 extern struct _IO_jump_t _IO_str_jumps attribute_hidden;
 extern struct _IO_jump_t _IO_wstr_jumps attribute_hidden;
@@ -526,8 +525,6 @@ extern _IO_FILE* _IO_file_setbuf __P ((_IO_FILE *, char *, _IO_ssize_t));
 extern _IO_off64_t _IO_file_seekoff __P ((_IO_FILE *, _IO_off64_t, int, int));
 extern _IO_off64_t _IO_file_seekoff_mmap __P ((_IO_FILE *, _IO_off64_t, int,
                                               int));
-extern _IO_off64_t _IO_file_seekoff_maybe_mmap __P ((_IO_FILE *, _IO_off64_t,
-                                                    int, int));
 extern _IO_size_t _IO_file_xsputn __P ((_IO_FILE *, const void *, _IO_size_t));
 extern _IO_size_t _IO_file_xsgetn __P ((_IO_FILE *, void *, _IO_size_t));
 extern int _IO_file_stat __P ((_IO_FILE *, void *));
index 57c0e261c0c29616b7738db9892f7184299f7f6d..e98c9bd866e930b90368aa77bc3662d01cfb0391 100644 (file)
@@ -1 +1,2 @@
-libpthread-routines += sysdep s_pread64 s_pwrite64
+# pull in __syscall_error routine
+libpthread-routines += sysdep
index 9a70b64a6922b81402a5cba4e758f90e9d575549..94da65fdb0ec40eb12c1a1eb8f6630838c6dd587 100644 (file)
@@ -71,6 +71,9 @@
 # define DOCARGS_5     stw 7,36(1); DOCARGS_4
 # define UNDOCARGS_5   lwz 7,36(1); UNDOCARGS_4
 
+# define DOCARGS_6     stw 8,40(1); DOCARGS_5
+# define UNDOCARGS_6   lwz 8,40(1); UNDOCARGS_5
+
 # ifdef IS_IN_libpthread
 #  define CENABLE      bl JUMPTARGET(__pthread_enable_asynccancel)
 #  define CDISABLE     bl JUMPTARGET(__pthread_disable_asynccancel)
index 31f86034eeb3fd4cfc6b2e7a2d6348a6198db803..20d9d4596eab02b532663ccec4f3e4fd5f5c89df 100644 (file)
@@ -1,5 +1,5 @@
 /* __frame_state_for unwinder helper function wrapper.
-   Copyright (C) 2001 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Jakub Jelinek <jakub@redhat.com>, 2001.
 
 
 #include <dlfcn.h>
 #include <stdlib.h>
+#define STATIC static
 #define __frame_state_for fallback_frame_state_for
 #include <unwind-dw2.c>
 #undef __frame_state_for
 
-struct frame_state * fallback_frame_state_for (void *, struct frame_state *)
-#ifdef _LIBC
-     attribute_hidden
-#endif
-     ;
-
 typedef struct frame_state * (*framesf)(void *pc, struct frame_state *);
 struct frame_state *__frame_state_for (void *pc,
                                       struct frame_state *frame_state);
index ca0299468f7b49dcb1cbbe6a467f81f1e7431b0e..3a53156621b80f122a92fe0c6ab79770938061ba 100644 (file)
@@ -1,5 +1,5 @@
 /* DWARF2 exception handling and frame unwind runtime interface routines.
-   Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1997,1998,1999,2000,2001,2003 Free Software Foundation, Inc.
 
    This file is part of GNU CC.
 
@@ -783,7 +783,7 @@ execute_cfa_program (const unsigned char *insn_ptr,
            fs->regs.reg[reg].loc.reg = reg2;
          }
          break;
-      
+
        case DW_CFA_remember_state:
          {
            struct frame_state_reg_info *new_rs;
@@ -852,7 +852,7 @@ execute_cfa_program (const unsigned char *insn_ptr,
          fs->regs.reg[reg].how = REG_SAVED_OFFSET;
          fs->regs.reg[reg].loc.offset = offset;
          break;
-         
+
        case DW_CFA_def_cfa_sf:
          insn_ptr = read_uleb128 (insn_ptr, &ptrtmp);
          fs->cfa_reg = ptrtmp;
@@ -971,12 +971,18 @@ typedef struct frame_state
   char saved[DWARF_FRAME_REGISTERS+1];
 } frame_state;
 
+#ifndef STATIC
+# define STATIC
+#endif
+
+STATIC
 struct frame_state * __frame_state_for (void *, struct frame_state *);
 
 /* Called from pre-G++ 3.0 __throw to find the registers to restore for
    a given PC_TARGET.  The caller should allocate a local variable of
    `struct frame_state' and pass its address to STATE_IN.  */
 
+STATIC
 struct frame_state *
 __frame_state_for (void *pc_target, struct frame_state *state_in)
 {
@@ -1037,7 +1043,7 @@ uw_update_context_1 (struct _Unwind_Context *context, _Unwind_FrameState *fs)
       /* Special handling here: Many machines do not use a frame pointer,
         and track the CFA only through offsets from the stack pointer from
         one frame to the next.  In this case, the stack pointer is never
-        stored, so it has no saved address in the context.  What we do 
+        stored, so it has no saved address in the context.  What we do
         have is the CFA from the previous stack frame.  */
       if (context->reg[fs->cfa_reg] == NULL)
        cfa = context->cfa;
@@ -1106,7 +1112,7 @@ uw_update_context (struct _Unwind_Context *context, _Unwind_FrameState *fs)
 \f
 /* Fill in CONTEXT for top-of-stack.  The only valid registers at this
    level will be the return address and the CFA.  */
-   
+
 #define uw_init_context(CONTEXT)                                       \
 do {                                                                   \
   /* Do any necessary initialization to access arbitrary stack frames. \