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>
#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)
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
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
# 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)
# 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)
# 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)
#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;
addr = htonl(addr);
return (*(struct in_addr *)&addr);
}
+libc_hidden_def (inet_makeaddr)
else
return (((i)&IN_CLASSC_NET) >> IN_CLASSC_NSHIFT);
}
+libc_hidden_def (inet_netof)
/*
* 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:
* 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
/*
* 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
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.
* 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
return (0);
}
weak_alias (__inet_aton, inet_aton)
+libc_hidden_def (__inet_aton)
+libc_hidden_weak (inet_aton)
}
/* NOTREACHED */
}
+libc_hidden_def (inet_ntop)
/* const char *
* inet_ntop4(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';
}
/* NOTREACHED */
}
+libc_hidden_def (inet_pton)
/* int
* inet_pton4(src, dst)
-/* 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
*timer = (time_t) -1;
return (time_t) -1;
}
+libc_hidden_def (time)
stub_warning (time)
#include <stub-tag.h>
(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.
;;
*)
echo " echo 'weak_alias ($strong, $name)'; \\"
+ echo " echo 'libc_hidden_weak ($name)'; \\"
;;
esac
done
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
-/* 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
L(null):
ret
PSEUDO_END (time)
+libc_hidden_def (time)
-/* 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
add $0x8, %rsp
ret
PSEUDO_END(time)
+libc_hidden_def (time)
-/* 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
*t = result;
return result;
}
+libc_hidden_def (time)
{
return __asctime_r (tp, result);
}
-
+libc_hidden_def (asctime)
char *
__asctime_r (const struct tm *tp, char *buf)
/* 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
{
return __tz_convert (t, 1, &_tmbuf);
}
+libc_hidden_def (localtime)
#ifdef weak_alias
weak_alias (mktime, timelocal)
#endif
+
+#ifdef _LIBC
+libc_hidden_def (mktime)
+libc_hidden_weak (timelocal)
+#endif
\f
#if DEBUG
*p = L_('\0');
return i;
}
+#ifdef _LIBC
+libc_hidden_def (strftime)
+#endif
#ifdef emacs
#endif
return strptime_internal (buf, format, tm, &decided, -1);
}
+#ifdef _LIBC
+libc_hidden_def (strptime)
+#endif