mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-05 19:35:52 +03:00
Switch gettimeofday from INTUSE to libc_hidden_proto.
This commit is contained in:
22
ChangeLog
22
ChangeLog
@@ -1,3 +1,23 @@
|
|||||||
|
2012-05-24 Roland McGrath <roland@hack.frob.com>
|
||||||
|
|
||||||
|
[BZ #14132]
|
||||||
|
* include/sys/time.h (__gettimeofday): Remove macro.
|
||||||
|
(__gettimeofday, gettimeofday): Add libc_hidden_proto.
|
||||||
|
* time/gettimeofday.c (__gettimeofday): Remove #undef.
|
||||||
|
Remove INTDEF.
|
||||||
|
(__gettimeofday): Add libc_hidden_def.
|
||||||
|
(gettimeofday): Add libc_hidden_weak.
|
||||||
|
* sysdeps/mach/gettimeofday.c: Likewise.
|
||||||
|
* sysdeps/posix/gettimeofday.c: Likewise.
|
||||||
|
* sysdeps/unix/sysv/linux/powerpc/gettimeofday.c: Likewise.
|
||||||
|
* sysdeps/unix/sysv/linux/s390/gettimeofday.c: Likewise.
|
||||||
|
* sysdeps/unix/sysv/linux/x86_64/gettimeofday.c
|
||||||
|
(__gettimeofday_internal): Remove strong_alias.
|
||||||
|
(__gettimeofday): Add libc_hidden_def.
|
||||||
|
(gettimeofday): Add libc_hidden_weak.
|
||||||
|
* sysdeps/unix/syscalls.list (gettimeofday):
|
||||||
|
Remove __gettimeofday_internal alias.
|
||||||
|
|
||||||
2012-05-24 Daniel Jacobowitz <drow@false.org>
|
2012-05-24 Daniel Jacobowitz <drow@false.org>
|
||||||
H.J. Lu <hongjiu.lu@intel.com>
|
H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
@@ -535,7 +555,7 @@
|
|||||||
|
|
||||||
* manual/install.texi (Configuring and compiling): Update
|
* manual/install.texi (Configuring and compiling): Update
|
||||||
description about files modified in the source directory.
|
description about files modified in the source directory.
|
||||||
* INSTALL: Regenerated.
|
* INSTALL: Regenerated.
|
||||||
|
|
||||||
2012-05-18 H.J. Lu <hongjiu.lu@intel.com>
|
2012-05-18 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
|
@@ -5,9 +5,8 @@
|
|||||||
/* Now document the internal interfaces. */
|
/* Now document the internal interfaces. */
|
||||||
extern int __gettimeofday (struct timeval *__tv,
|
extern int __gettimeofday (struct timeval *__tv,
|
||||||
struct timezone *__tz);
|
struct timezone *__tz);
|
||||||
extern int __gettimeofday_internal (struct timeval *__tv,
|
libc_hidden_proto (__gettimeofday)
|
||||||
struct timezone *__tz)
|
libc_hidden_proto (gettimeofday)
|
||||||
attribute_hidden;
|
|
||||||
extern int __settimeofday (const struct timeval *__tv,
|
extern int __settimeofday (const struct timeval *__tv,
|
||||||
const struct timezone *__tz)
|
const struct timezone *__tz)
|
||||||
attribute_hidden;
|
attribute_hidden;
|
||||||
@@ -23,9 +22,5 @@ extern int __utimes (const char *__file, const struct timeval __tvp[2])
|
|||||||
attribute_hidden;
|
attribute_hidden;
|
||||||
extern int __futimes (int fd, const struct timeval tvp[2]) attribute_hidden;
|
extern int __futimes (int fd, const struct timeval tvp[2]) attribute_hidden;
|
||||||
|
|
||||||
#ifndef NOT_IN_libc
|
|
||||||
# define __gettimeofday(tv, tz) INTUSE(__gettimeofday) (tv, tz)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) 1991,1992,1995-1997,2001,2002 Free Software Foundation, Inc.
|
/* Copyright (C) 1991-2012 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
@@ -20,8 +20,6 @@
|
|||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <mach.h>
|
#include <mach.h>
|
||||||
|
|
||||||
#undef __gettimeofday
|
|
||||||
|
|
||||||
/* Get the current time of day and timezone information,
|
/* Get the current time of day and timezone information,
|
||||||
putting it into *TV and *TZ. If TZ is NULL, *TZ is not filled.
|
putting it into *TV and *TZ. If TZ is NULL, *TZ is not filled.
|
||||||
Returns 0 on success, -1 on errors. */
|
Returns 0 on success, -1 on errors. */
|
||||||
@@ -42,6 +40,6 @@ __gettimeofday (tv, tz)
|
|||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
libc_hidden_def (__gettimeofday)
|
||||||
INTDEF(__gettimeofday)
|
|
||||||
weak_alias (__gettimeofday, gettimeofday)
|
weak_alias (__gettimeofday, gettimeofday)
|
||||||
|
libc_hidden_weak (gettimeofday)
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) 1991,1992,1994-1997,2002,2005 Free Software Foundation, Inc.
|
/* Copyright (C) 1991-2012 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
@@ -19,8 +19,6 @@
|
|||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
|
||||||
#undef __gettimeofday
|
|
||||||
|
|
||||||
/* Get the current time of day and timezone information,
|
/* Get the current time of day and timezone information,
|
||||||
putting it into *TV and *TZ. If TZ is NULL, *TZ is not filled.
|
putting it into *TV and *TZ. If TZ is NULL, *TZ is not filled.
|
||||||
Returns 0 on success, -1 on errors. */
|
Returns 0 on success, -1 on errors. */
|
||||||
@@ -66,6 +64,6 @@ __gettimeofday (tv, tz)
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
libc_hidden_def (__gettimeofday)
|
||||||
INTDEF(__gettimeofday)
|
|
||||||
weak_alias (__gettimeofday, gettimeofday)
|
weak_alias (__gettimeofday, gettimeofday)
|
||||||
|
libc_hidden_weak (gettimeofday)
|
||||||
|
@@ -26,7 +26,7 @@ getpid - getpid Ei: __getpid getpid
|
|||||||
getpriority - getpriority i:ii getpriority
|
getpriority - getpriority i:ii getpriority
|
||||||
getrlimit - getrlimit i:ip __getrlimit getrlimit
|
getrlimit - getrlimit i:ip __getrlimit getrlimit
|
||||||
getrusage - getrusage i:ip __getrusage getrusage
|
getrusage - getrusage i:ip __getrusage getrusage
|
||||||
gettimeofday - gettimeofday i:PP __gettimeofday gettimeofday __gettimeofday_internal
|
gettimeofday - gettimeofday i:pP __gettimeofday gettimeofday
|
||||||
getuid - getuid Ei: __getuid getuid
|
getuid - getuid Ei: __getuid getuid
|
||||||
ioctl - ioctl i:iiI __ioctl ioctl
|
ioctl - ioctl i:iiI __ioctl ioctl
|
||||||
kill - kill i:ii __kill kill
|
kill - kill i:ii __kill kill
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) 2005 Free Software Foundation, Inc.
|
/* Copyright (C) 2005-2012 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
@@ -22,7 +22,6 @@
|
|||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <hp-timing.h>
|
#include <hp-timing.h>
|
||||||
|
|
||||||
#undef __gettimeofday
|
|
||||||
#include <bits/libc-vdso.h>
|
#include <bits/libc-vdso.h>
|
||||||
|
|
||||||
/* Get the current time of day and timezone information,
|
/* Get the current time of day and timezone information,
|
||||||
@@ -36,6 +35,6 @@ __gettimeofday (tv, tz)
|
|||||||
{
|
{
|
||||||
return INLINE_VSYSCALL (gettimeofday, 2, CHECK_1 (tv), CHECK_1 (tz));
|
return INLINE_VSYSCALL (gettimeofday, 2, CHECK_1 (tv), CHECK_1 (tz));
|
||||||
}
|
}
|
||||||
|
libc_hidden_def (__gettimeofday)
|
||||||
INTDEF (__gettimeofday)
|
|
||||||
weak_alias (__gettimeofday, gettimeofday)
|
weak_alias (__gettimeofday, gettimeofday)
|
||||||
|
libc_hidden_weak (gettimeofday)
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) 2008 Free Software Foundation, Inc.
|
/* Copyright (C) 2008-2012 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
@@ -22,7 +22,6 @@
|
|||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <hp-timing.h>
|
#include <hp-timing.h>
|
||||||
|
|
||||||
#undef __gettimeofday
|
|
||||||
#include <bits/libc-vdso.h>
|
#include <bits/libc-vdso.h>
|
||||||
|
|
||||||
/* Get the current time of day and timezone information,
|
/* Get the current time of day and timezone information,
|
||||||
@@ -36,6 +35,6 @@ __gettimeofday (tv, tz)
|
|||||||
{
|
{
|
||||||
return INLINE_VSYSCALL (gettimeofday, 2, CHECK_1 (tv), CHECK_1 (tz));
|
return INLINE_VSYSCALL (gettimeofday, 2, CHECK_1 (tv), CHECK_1 (tz));
|
||||||
}
|
}
|
||||||
|
libc_hidden_def (__gettimeofday)
|
||||||
INTDEF (__gettimeofday)
|
|
||||||
weak_alias (__gettimeofday, gettimeofday)
|
weak_alias (__gettimeofday, gettimeofday)
|
||||||
|
libc_hidden_weak (gettimeofday)
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) 2002, 2003, 2007, 2011 Free Software Foundation, Inc.
|
/* Copyright (C) 2002-2012 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
@@ -15,13 +15,14 @@
|
|||||||
License along with the GNU C Library; if not, see
|
License along with the GNU C Library; if not, see
|
||||||
<http://www.gnu.org/licenses/>. */
|
<http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
#include <dl-vdso.h>
|
#include <sys/time.h>
|
||||||
|
|
||||||
|
|
||||||
#define VSYSCALL_ADDR_vgettimeofday 0xffffffffff600000ul
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef SHARED
|
#ifdef SHARED
|
||||||
|
|
||||||
|
# include <dl-vdso.h>
|
||||||
|
|
||||||
|
# define VSYSCALL_ADDR_vgettimeofday 0xffffffffff600000ul
|
||||||
|
|
||||||
void *gettimeofday_ifunc (void) __asm__ ("__gettimeofday");
|
void *gettimeofday_ifunc (void) __asm__ ("__gettimeofday");
|
||||||
|
|
||||||
void *
|
void *
|
||||||
@@ -33,9 +34,16 @@ gettimeofday_ifunc (void)
|
|||||||
return (_dl_vdso_vsym ("__vdso_gettimeofday", &linux26)
|
return (_dl_vdso_vsym ("__vdso_gettimeofday", &linux26)
|
||||||
?: (void *) VSYSCALL_ADDR_vgettimeofday);
|
?: (void *) VSYSCALL_ADDR_vgettimeofday);
|
||||||
}
|
}
|
||||||
__asm (".type __gettimeofday, %gnu_indirect_function");
|
asm (".type __gettimeofday, %gnu_indirect_function");
|
||||||
|
|
||||||
|
/* This is doing "libc_hidden_def (__gettimeofday)" but the compiler won't
|
||||||
|
let us do it in C because it doesn't know we're defining __gettimeofday
|
||||||
|
here in this file. */
|
||||||
|
asm (".globl __GI___gettimeofday\n"
|
||||||
|
"__GI___gettimeofday = __gettimeofday");
|
||||||
|
|
||||||
#else
|
#else
|
||||||
# include <sys/time.h>
|
|
||||||
# include <sysdep.h>
|
# include <sysdep.h>
|
||||||
# include <errno.h>
|
# include <errno.h>
|
||||||
|
|
||||||
@@ -44,7 +52,8 @@ __gettimeofday (struct timeval *tv, struct timezone *tz)
|
|||||||
{
|
{
|
||||||
return INLINE_SYSCALL (gettimeofday, 2, tv, tz);
|
return INLINE_SYSCALL (gettimeofday, 2, tv, tz);
|
||||||
}
|
}
|
||||||
#endif
|
libc_hidden_def (__gettimeofday)
|
||||||
|
|
||||||
|
#endif
|
||||||
weak_alias (__gettimeofday, gettimeofday)
|
weak_alias (__gettimeofday, gettimeofday)
|
||||||
strong_alias (__gettimeofday, __gettimeofday_internal)
|
libc_hidden_weak (gettimeofday)
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) 1991, 1995, 1996, 1997, 2002 Free Software Foundation, Inc.
|
/* Copyright (C) 1991-2012 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
@@ -18,8 +18,6 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
|
||||||
#undef __gettimeofday
|
|
||||||
|
|
||||||
/* Get the current time of day and timezone information,
|
/* Get the current time of day and timezone information,
|
||||||
putting it into *TV and *TZ. If TZ is NULL, *TZ is not filled.
|
putting it into *TV and *TZ. If TZ is NULL, *TZ is not filled.
|
||||||
Returns 0 on success, -1 on errors. */
|
Returns 0 on success, -1 on errors. */
|
||||||
@@ -31,8 +29,9 @@ __gettimeofday (tv, tz)
|
|||||||
__set_errno (ENOSYS);
|
__set_errno (ENOSYS);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
stub_warning (gettimeofday)
|
libc_hidden_def (__gettimeofday)
|
||||||
|
|
||||||
INTDEF(__gettimeofday)
|
|
||||||
weak_alias (__gettimeofday, gettimeofday)
|
weak_alias (__gettimeofday, gettimeofday)
|
||||||
|
libc_hidden_weak (gettimeofday)
|
||||||
|
|
||||||
|
stub_warning (gettimeofday)
|
||||||
#include <stub-tag.h>
|
#include <stub-tag.h>
|
||||||
|
Reference in New Issue
Block a user