* include/libc-symbols.h (hidden_weak): Define it for [__ASSEMBLER__].
* sysdeps/unix/make-syscalls.sh: Generate libc_hidden_def or libc_hidden_weak for every system call symbol defined. * include/time.h: Use libc_hidden_proto for time, asctime, mktime, timelocal, localtime, strftime. * time/asctime.c: Add libc_hidden_def. * time/mktime.c: Likewise. * time/localtime.c: Likewise. * time/strftime.c: Likewise. * time/strptime.c: Likewise. * sysdeps/generic/time.c: Likewise. * sysdeps/unix/time.c: Likewise. * sysdeps/unix/sysv/i386/time.S: Likewise. * sysdeps/unix/sysv/linux/x86_64/time.S: Likewise. * include/arpa/inet.h: Use libc_hidden_proto for inet_ntop, inet_pton. inet_makeaddr, inet_netof, inet_addr, __inet_addr. * resolv/inet_ntop.c: Likewise. * resolv/inet_pton.c: Likewise. * inet/inet_mkadr.c: Add libc_hidden_def. * inet/inet_netof.c: Likewise. * resolv/inet_addr.c: Likewise. * include/libc-symbols.h: Remove `defined HAVE_BROKEN_ALIAS_ATTRIBUTE' clauses from conditionals for now. Will have to be fixed later for older compilers.
This commit is contained in:
parent
bc13934719
commit
c5598d4721
29
ChangeLog
29
ChangeLog
@ -1,5 +1,34 @@
|
||||
2002-08-03 Roland McGrath <roland@redhat.com>
|
||||
|
||||
* include/libc-symbols.h (hidden_weak): Define it for [__ASSEMBLER__].
|
||||
|
||||
* sysdeps/unix/make-syscalls.sh: Generate libc_hidden_def or
|
||||
libc_hidden_weak for every system call symbol defined.
|
||||
|
||||
* include/time.h: Use libc_hidden_proto for time, asctime, mktime,
|
||||
timelocal, localtime, strftime.
|
||||
* time/asctime.c: Add libc_hidden_def.
|
||||
* time/mktime.c: Likewise.
|
||||
* time/localtime.c: Likewise.
|
||||
* time/strftime.c: Likewise.
|
||||
* time/strptime.c: Likewise.
|
||||
* sysdeps/generic/time.c: Likewise.
|
||||
* sysdeps/unix/time.c: Likewise.
|
||||
* sysdeps/unix/sysv/i386/time.S: Likewise.
|
||||
* sysdeps/unix/sysv/linux/x86_64/time.S: Likewise.
|
||||
|
||||
* include/arpa/inet.h: Use libc_hidden_proto for inet_ntop, inet_pton.
|
||||
inet_makeaddr, inet_netof, inet_addr, __inet_addr.
|
||||
* resolv/inet_ntop.c: Likewise.
|
||||
* resolv/inet_pton.c: Likewise.
|
||||
* inet/inet_mkadr.c: Add libc_hidden_def.
|
||||
* inet/inet_netof.c: Likewise.
|
||||
* resolv/inet_addr.c: Likewise.
|
||||
|
||||
* include/libc-symbols.h: Remove `defined HAVE_BROKEN_ALIAS_ATTRIBUTE'
|
||||
clauses from conditionals for now. Will have to be fixed later
|
||||
for older compilers.
|
||||
|
||||
* sysdeps/generic/mempcpy.c (__mempcpy): #undef it before defn.
|
||||
|
||||
2002-08-02 Ulrich Drepper <drepper@redhat.com>
|
||||
|
@ -1,3 +1,10 @@
|
||||
#include <inet/arpa/inet.h>
|
||||
|
||||
extern in_addr_t __inet_aton (__const char *__cp, struct in_addr *__inp);
|
||||
libc_hidden_proto (__inet_aton)
|
||||
|
||||
libc_hidden_proto (inet_aton)
|
||||
libc_hidden_proto (inet_ntop)
|
||||
libc_hidden_proto (inet_pton)
|
||||
libc_hidden_proto (inet_makeaddr)
|
||||
libc_hidden_proto (inet_netof)
|
||||
|
@ -440,8 +440,7 @@
|
||||
versioned_symbol (libc, __real_foo, foo, GLIBC_2_1);
|
||||
libc_hidden_ver (__real_foo, foo) */
|
||||
|
||||
#if defined SHARED && defined DO_VERSIONING \
|
||||
&& defined HAVE_BROKEN_ALIAS_ATTRIBUTE
|
||||
#if defined SHARED && defined DO_VERSIONING
|
||||
# ifndef __ASSEMBLER__
|
||||
# ifdef HAVE_BROKEN_VISIBILITY_ATTRIBUTE
|
||||
# define __hidden_proto_hiddenattr
|
||||
@ -514,6 +513,7 @@
|
||||
to use __GI_* name and we need to add alias to the real name.
|
||||
hidden_proto and hidden_weak don't make sense for assembly. */
|
||||
# define hidden_def(name) strong_alias (name, __GI_##name)
|
||||
# define hidden_weak(name) weak_alias (name, __GI_##name)
|
||||
# define hidden_ver(local, name) strong_alias (local, __GI_##name)
|
||||
# endif
|
||||
#else
|
||||
@ -525,7 +525,7 @@
|
||||
# define hidden_ver(local, name)
|
||||
#endif
|
||||
|
||||
#if !defined NOT_IN_libc && !defined HAVE_BROKEN_ALIAS_ATTRIBUTE
|
||||
#if !defined NOT_IN_libc
|
||||
# define libc_hidden_proto(name) hidden_proto (name)
|
||||
# define libc_hidden_def(name) hidden_def (name)
|
||||
# define libc_hidden_weak(name) hidden_weak (name)
|
||||
@ -537,8 +537,7 @@
|
||||
# define libc_hidden_ver(local, name)
|
||||
#endif
|
||||
|
||||
#if defined NOT_IN_libc && defined IS_IN_rtld \
|
||||
&& !defined HAVE_BROKEN_ALIAS_ATTRIBUTE
|
||||
#if defined NOT_IN_libc && defined IS_IN_rtld
|
||||
# define rtld_hidden_proto(name) hidden_proto (name)
|
||||
# define rtld_hidden_def(name) hidden_def (name)
|
||||
# define rtld_hidden_weak(name) hidden_weak (name)
|
||||
@ -550,8 +549,7 @@
|
||||
# define rtld_hidden_ver(local, name)
|
||||
#endif
|
||||
|
||||
#if defined NOT_IN_libc && defined IS_IN_libm \
|
||||
&& !defined HAVE_BROKEN_ALIAS_ATTRIBUTE
|
||||
#if defined NOT_IN_libc && defined IS_IN_libm
|
||||
# define libm_hidden_proto(name) hidden_proto (name)
|
||||
# define libm_hidden_def(name) hidden_def (name)
|
||||
# define libm_hidden_weak(name) hidden_weak (name)
|
||||
|
@ -4,6 +4,14 @@
|
||||
#else
|
||||
# include <time/time.h>
|
||||
|
||||
libc_hidden_proto (time)
|
||||
libc_hidden_proto (asctime)
|
||||
libc_hidden_proto (mktime)
|
||||
libc_hidden_proto (timelocal)
|
||||
libc_hidden_proto (localtime)
|
||||
libc_hidden_proto (strftime)
|
||||
libc_hidden_proto (strptime)
|
||||
|
||||
/* Now define the internal interfaces. */
|
||||
struct tm;
|
||||
|
||||
|
@ -56,3 +56,4 @@ inet_makeaddr(net, host)
|
||||
addr = htonl(addr);
|
||||
return (*(struct in_addr *)&addr);
|
||||
}
|
||||
libc_hidden_def (inet_makeaddr)
|
||||
|
@ -52,3 +52,4 @@ inet_netof(in)
|
||||
else
|
||||
return (((i)&IN_CLASSC_NET) >> IN_CLASSC_NSHIFT);
|
||||
}
|
||||
libc_hidden_def (inet_netof)
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Copyright (c) 1983, 1990, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
@ -13,7 +13,7 @@
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
@ -29,14 +29,14 @@
|
||||
|
||||
/*
|
||||
* Portions Copyright (c) 1993 by Digital Equipment Corporation.
|
||||
*
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies, and that
|
||||
* the name of Digital Equipment Corporation not be used in advertising or
|
||||
* publicity pertaining to distribution of the document or software without
|
||||
* specific, written prior permission.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
|
||||
* WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
|
||||
@ -98,7 +98,7 @@ inet_addr(const char *cp) {
|
||||
return (INADDR_NONE);
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* Check whether "cp" is a valid ascii representation
|
||||
* of an Internet address and convert to a binary address.
|
||||
* Returns 1 if the address is valid, 0 if not.
|
||||
@ -106,7 +106,8 @@ inet_addr(const char *cp) {
|
||||
* cannot distinguish between failure and a local broadcast address.
|
||||
*/
|
||||
in_addr_t
|
||||
__inet_aton(const char *cp, struct in_addr *addr) {
|
||||
__inet_aton(const char *cp, struct in_addr *addr)
|
||||
{
|
||||
static const in_addr_t max[4] = { 0xffffffff, 0xffffff, 0xffff, 0xff };
|
||||
in_addr_t val;
|
||||
#ifndef _LIBC
|
||||
@ -221,3 +222,5 @@ ret_0:
|
||||
return (0);
|
||||
}
|
||||
weak_alias (__inet_aton, inet_aton)
|
||||
libc_hidden_def (__inet_aton)
|
||||
libc_hidden_weak (inet_aton)
|
||||
|
@ -73,6 +73,7 @@ inet_ntop(af, src, dst, size)
|
||||
}
|
||||
/* NOTREACHED */
|
||||
}
|
||||
libc_hidden_def (inet_ntop)
|
||||
|
||||
/* const char *
|
||||
* inet_ntop4(src, dst, size)
|
||||
@ -184,7 +185,7 @@ inet_ntop6(src, dst, size)
|
||||
tp += SPRINTF((tp, "%x", words[i]));
|
||||
}
|
||||
/* Was it a trailing run of 0x00's? */
|
||||
if (best.base != -1 && (best.base + best.len) ==
|
||||
if (best.base != -1 && (best.base + best.len) ==
|
||||
(NS_IN6ADDRSZ / NS_INT16SZ))
|
||||
*tp++ = ':';
|
||||
*tp++ = '\0';
|
||||
|
@ -65,6 +65,7 @@ inet_pton(af, src, dst)
|
||||
}
|
||||
/* NOTREACHED */
|
||||
}
|
||||
libc_hidden_def (inet_pton)
|
||||
|
||||
/* int
|
||||
* inet_pton4(src, dst)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1991, 1996, 1997 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991,96,97,2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -30,6 +30,7 @@ time (timer)
|
||||
*timer = (time_t) -1;
|
||||
return (time_t) -1;
|
||||
}
|
||||
libc_hidden_def (time)
|
||||
|
||||
stub_warning (time)
|
||||
#include <stub-tag.h>
|
||||
|
@ -130,7 +130,8 @@ shared-only-routines += $file
|
||||
(echo '#include <sysdep.h>'; \\
|
||||
echo 'PSEUDO ($strong, $syscall, $nargs)'; \\
|
||||
echo ' ret'; \\
|
||||
echo 'PSEUDO_END($strong)'; \\"
|
||||
echo 'PSEUDO_END($strong)'; \\
|
||||
echo 'libc_hidden_def ($strong)'; \\"
|
||||
|
||||
# Append any weak aliases or versions defined for this syscall function.
|
||||
|
||||
@ -168,6 +169,7 @@ shared-only-routines += $file
|
||||
;;
|
||||
*)
|
||||
echo " echo 'weak_alias ($strong, $name)'; \\"
|
||||
echo " echo 'libc_hidden_weak ($name)'; \\"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
@ -275,9 +277,12 @@ shared-only-routines += $file
|
||||
|
||||
echo " echo '} \\'; \\"
|
||||
|
||||
echo " echo 'libc_hidden_def (BP_SYM ($strong)) \\'; \\"
|
||||
|
||||
# generate thunk aliases
|
||||
for name in $nv_weak; do
|
||||
echo " echo 'weak_alias (BP_SYM ($strong), BP_SYM ($name)) \\'; \\"
|
||||
echo " echo 'libc_hidden_weak (BP_SYM ($name)) \\'; \\"
|
||||
done
|
||||
|
||||
# wrap up
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1991, 1992, 1996, 1997 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991,92,96,97,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 @@ SYSCALL (time, 1)
|
||||
L(null):
|
||||
ret
|
||||
PSEUDO_END (time)
|
||||
libc_hidden_def (time)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2001, 2002 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2001,02 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -40,3 +40,4 @@ L(pseudo_end):
|
||||
add $0x8, %rsp
|
||||
ret
|
||||
PSEUDO_END(time)
|
||||
libc_hidden_def (time)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1991, 1992, 1997, 2001 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991,92,97,2001,02 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -39,3 +39,4 @@ time (t)
|
||||
*t = result;
|
||||
return result;
|
||||
}
|
||||
libc_hidden_def (time)
|
||||
|
@ -36,7 +36,7 @@ asctime (const struct tm *tp)
|
||||
{
|
||||
return __asctime_r (tp, result);
|
||||
}
|
||||
|
||||
libc_hidden_def (asctime)
|
||||
|
||||
char *
|
||||
__asctime_r (const struct tm *tp, char *buf)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Convert `time_t' to `struct tm' in local time zone.
|
||||
Copyright (C) 1991, 92, 93, 95, 96, 97, 98 Free Software Foundation, Inc.
|
||||
Copyright (C) 1991,92,93,95,96,97,98,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 @@ localtime (t)
|
||||
{
|
||||
return __tz_convert (t, 1, &_tmbuf);
|
||||
}
|
||||
libc_hidden_def (localtime)
|
||||
|
@ -405,6 +405,11 @@ mktime (tp)
|
||||
#ifdef weak_alias
|
||||
weak_alias (mktime, timelocal)
|
||||
#endif
|
||||
|
||||
#ifdef _LIBC
|
||||
libc_hidden_def (mktime)
|
||||
libc_hidden_weak (timelocal)
|
||||
#endif
|
||||
|
||||
#if DEBUG
|
||||
|
||||
|
@ -1361,6 +1361,9 @@ my_strftime (s, maxsize, format, tp ut_argument)
|
||||
*p = L_('\0');
|
||||
return i;
|
||||
}
|
||||
#ifdef _LIBC
|
||||
libc_hidden_def (strftime)
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef emacs
|
||||
|
@ -1037,3 +1037,6 @@ strptime (buf, format, tm)
|
||||
#endif
|
||||
return strptime_internal (buf, format, tm, &decided, -1);
|
||||
}
|
||||
#ifdef _LIBC
|
||||
libc_hidden_def (strptime)
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user