about summary refs log tree commit diff
path: root/sysdeps/unix/sysv
diff options
context:
space:
mode:
authorRoland McGrath <roland@hack.frob.com>2012-05-24 11:37:30 -0700
committerRoland McGrath <roland@hack.frob.com>2012-05-24 13:12:34 -0700
commitd6c33fda03457ca8ca87a562fa2681af16ca4ea5 (patch)
tree322ac1d3d0cb979a0a0c1398333b42e0bc34cee7 /sysdeps/unix/sysv
parentb5a2bbe6cceeaa558a5cb174417ab083b2dc549c (diff)
downloadglibc-d6c33fda03457ca8ca87a562fa2681af16ca4ea5.tar.gz
glibc-d6c33fda03457ca8ca87a562fa2681af16ca4ea5.tar.xz
glibc-d6c33fda03457ca8ca87a562fa2681af16ca4ea5.zip
Switch gettimeofday from INTUSE to libc_hidden_proto.
Diffstat (limited to 'sysdeps/unix/sysv')
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/gettimeofday.c7
-rw-r--r--sysdeps/unix/sysv/linux/s390/gettimeofday.c7
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/gettimeofday.c25
3 files changed, 23 insertions, 16 deletions
diff --git a/sysdeps/unix/sysv/linux/powerpc/gettimeofday.c b/sysdeps/unix/sysv/linux/powerpc/gettimeofday.c
index b2ef2da973..737613516f 100644
--- a/sysdeps/unix/sysv/linux/powerpc/gettimeofday.c
+++ b/sysdeps/unix/sysv/linux/powerpc/gettimeofday.c
@@ -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.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -22,7 +22,6 @@
 #include <time.h>
 #include <hp-timing.h>
 
-#undef __gettimeofday
 #include <bits/libc-vdso.h>
 
 /* 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));
 }
-
-INTDEF (__gettimeofday)
+libc_hidden_def (__gettimeofday)
 weak_alias (__gettimeofday, gettimeofday)
+libc_hidden_weak (gettimeofday)
diff --git a/sysdeps/unix/sysv/linux/s390/gettimeofday.c b/sysdeps/unix/sysv/linux/s390/gettimeofday.c
index 63faef85b6..efbf1e8110 100644
--- a/sysdeps/unix/sysv/linux/s390/gettimeofday.c
+++ b/sysdeps/unix/sysv/linux/s390/gettimeofday.c
@@ -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.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -22,7 +22,6 @@
 #include <time.h>
 #include <hp-timing.h>
 
-#undef __gettimeofday
 #include <bits/libc-vdso.h>
 
 /* 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));
 }
-
-INTDEF (__gettimeofday)
+libc_hidden_def (__gettimeofday)
 weak_alias (__gettimeofday, gettimeofday)
+libc_hidden_weak (gettimeofday)
diff --git a/sysdeps/unix/sysv/linux/x86_64/gettimeofday.c b/sysdeps/unix/sysv/linux/x86_64/gettimeofday.c
index e41fddb297..d52f938e71 100644
--- a/sysdeps/unix/sysv/linux/x86_64/gettimeofday.c
+++ b/sysdeps/unix/sysv/linux/x86_64/gettimeofday.c
@@ -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.
 
    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
    <http://www.gnu.org/licenses/>.  */
 
-#include <dl-vdso.h>
+#include <sys/time.h>
 
+#ifdef SHARED
 
-#define VSYSCALL_ADDR_vgettimeofday	0xffffffffff600000ul
+# include <dl-vdso.h>
 
+# define VSYSCALL_ADDR_vgettimeofday	0xffffffffff600000ul
 
-#ifdef SHARED
 void *gettimeofday_ifunc (void) __asm__ ("__gettimeofday");
 
 void *
@@ -33,9 +34,16 @@ gettimeofday_ifunc (void)
   return (_dl_vdso_vsym ("__vdso_gettimeofday", &linux26)
 	  ?: (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
-# include <sys/time.h>
+
 # include <sysdep.h>
 # include <errno.h>
 
@@ -44,7 +52,8 @@ __gettimeofday (struct timeval *tv, struct timezone *tz)
 {
   return INLINE_SYSCALL (gettimeofday, 2, tv, tz);
 }
-#endif
+libc_hidden_def (__gettimeofday)
 
+#endif
 weak_alias (__gettimeofday, gettimeofday)
-strong_alias (__gettimeofday, __gettimeofday_internal)
+libc_hidden_weak (gettimeofday)