This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch, master, updated. glibc-2.11-38-geb41573


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  eb4157390cac6212921ef198353635e138dc0a00 (commit)
      from  89b432d7a5befb85048c97e881b2106e8df58e43 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=eb4157390cac6212921ef198353635e138dc0a00

commit eb4157390cac6212921ef198353635e138dc0a00
Author: Ulrich Drepper <drepper@redhat.com>
Date:   Sun Nov 22 11:07:04 2009 -0800

    Update ntp_gettime for Linux.
    
    The ntp_gettime implementation of NTP exports the tai field the kernel
    now produces.  This requires an ABI change since the ntptimeval structure
    changed.  Upstream kept the same name, there is nothing to do.  This
    patch changes the ntptimeval structure but keeps the old ntp_gettime
    definition.  A new ntp_gettimex function which is transparently invoked
    through the old name is introduced.  This has the advantage that even
    object files can remain compatible.  This wouldn't be the case if
    symbol versioning would be used to overload the name ntp_gettime.

diff --git a/ChangeLog b/ChangeLog
index dd688b2..4d3bd80 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2009-11-22  Ulrich Drepper  <drepper@redhat.com>
 
+	* sysdeps/unix/sysv/linux/ntp_gettimex.c:  New file.
+	* sysdeps/unix/sysv/linux/Makefile: Add rules to build ntp_gettimex.
+	* sysdeps/unix/sysv/linux/Versions: Export ntp_gettimex for GLIBC_2.12.
+	* sysdeps/unix/sysv/linux/sys/timex.h (ntptimeval): Add tai member and
+	some placeholders.  Redirect ntp_gettime to ntp_gettimex.
+	* sysdeps/unix/sysv/linux/ntp_gettime.c: Adjust for header change.
+
 	* sysdeps/unix/sysv/linux/sys/timex.h (MOD_TAI, MOD_MICRO, MOD_NANO):
 	Define.
 	(STA_RONLY): Add STA_NANO, STA_MODE, and STA_CLK.
diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile
index cee5d29..91c123b 100644
--- a/sysdeps/unix/sysv/linux/Makefile
+++ b/sysdeps/unix/sysv/linux/Makefile
@@ -84,8 +84,8 @@ endif
 $(inst_includedir)/bits/syscall.h: $(objpfx)syscall-list.h $(+force)
 	$(make-target-directory)
 	if test -r $@ && cmp -s $< $@; \
-        then echo 'bits/syscall.h unchanged'; \
-        else $(INSTALL_DATA) $< $@; fi
+	then echo 'bits/syscall.h unchanged'; \
+	else $(INSTALL_DATA) $< $@; fi
 
 ifndef no_deps
 # Get the generated list of dependencies (probably /usr/include/asm/unistd.h).
@@ -97,7 +97,7 @@ endif
 ifeq ($(subdir),time)
 sysdep_headers += sys/timex.h
 
-sysdep_routines += ntp_gettime
+sysdep_routines += ntp_gettime ntp_gettimex
 endif
 
 ifeq ($(subdir),socket)
diff --git a/sysdeps/unix/sysv/linux/Versions b/sysdeps/unix/sysv/linux/Versions
index 4c9129b..50c7051 100644
--- a/sysdeps/unix/sysv/linux/Versions
+++ b/sysdeps/unix/sysv/linux/Versions
@@ -144,6 +144,8 @@ libc {
   GLIBC_2.12 {
     #errlist-compat	134
     _sys_errlist; sys_errlist; _sys_nerr; sys_nerr;
+
+    ntp_gettimex;
   }
   GLIBC_PRIVATE {
     # functions used in other libraries
diff --git a/sysdeps/unix/sysv/linux/ntp_gettime.c b/sysdeps/unix/sysv/linux/ntp_gettime.c
index f78f168..8bae0d9 100644
--- a/sysdeps/unix/sysv/linux/ntp_gettime.c
+++ b/sysdeps/unix/sysv/linux/ntp_gettime.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2002, 2009 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
@@ -16,8 +16,12 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
+#define ntp_gettime ntp_gettime_redirect
+
 #include <sys/timex.h>
 
+#undef ntp_gettime
+
 #ifndef MOD_OFFSET
 # define modes mode
 #endif
@@ -27,8 +31,7 @@ extern int INTUSE(__adjtimex) (struct timex *__ntx);
 
 
 int
-ntp_gettime (ntv)
-     struct ntptimeval *ntv;
+ntp_gettime (struct ntptimeval *ntv)
 {
   struct timex tntx;
   int result;
diff --git a/sysdeps/unix/sysv/linux/ntp_gettime.c b/sysdeps/unix/sysv/linux/ntp_gettimex.c
similarity index 84%
copy from sysdeps/unix/sysv/linux/ntp_gettime.c
copy to sysdeps/unix/sysv/linux/ntp_gettimex.c
index f78f168..ed7851b 100644
--- a/sysdeps/unix/sysv/linux/ntp_gettime.c
+++ b/sysdeps/unix/sysv/linux/ntp_gettimex.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2002, 2009 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,8 +27,7 @@ extern int INTUSE(__adjtimex) (struct timex *__ntx);
 
 
 int
-ntp_gettime (ntv)
-     struct ntptimeval *ntv;
+ntp_gettimex (struct ntptimeval *ntv)
 {
   struct timex tntx;
   int result;
@@ -38,5 +37,10 @@ ntp_gettime (ntv)
   ntv->time = tntx.time;
   ntv->maxerror = tntx.maxerror;
   ntv->esterror = tntx.esterror;
+  ntv->tai = tntx.tai;
+  ntv->__unused1 = 0;
+  ntv->__unused2 = 0;
+  ntv->__unused3 = 0;
+  ntv->__unused4 = 0;
   return result;
 }
diff --git a/sysdeps/unix/sysv/linux/sys/timex.h b/sysdeps/unix/sysv/linux/sys/timex.h
index 88b87f1..e10311f 100644
--- a/sysdeps/unix/sysv/linux/sys/timex.h
+++ b/sysdeps/unix/sysv/linux/sys/timex.h
@@ -24,11 +24,19 @@
 
 /* These definitions from linux/timex.h as of 2.6.30.  */
 
+#define NTP_API	4	/* NTP API version */
+
 struct ntptimeval
 {
   struct timeval time;	/* current time (ro) */
   long int maxerror;	/* maximum error (us) (ro) */
   long int esterror;	/* estimated error (us) (ro) */
+  long int tai;		/* TAI offset (ro) */
+
+  long int __unused1;
+  long int __unused2;
+  long int __unused3;
+  long int __unused4;
 };
 
 struct timex
@@ -132,7 +140,13 @@ __BEGIN_DECLS
 extern int __adjtimex (struct timex *__ntx) __THROW;
 extern int adjtimex (struct timex *__ntx) __THROW;
 
-extern int ntp_gettime (struct ntptimeval *__ntv) __THROW;
+#if defined __GNUC__ && __GNUC__ >= 2
+extern int ntp_gettime (struct ntptimeval *__ntv)
+     __asm__ ("ntp_gettimex") __THROW;
+#else
+extern int ntp_gettimex (struct ntptimeval *__ntv) __THROW;
+# define ntp_gettime ntp_gettimex
+#endif
 extern int ntp_adjtime (struct timex *__tntx) __THROW;
 
 __END_DECLS

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                                          |    7 +++++++
 sysdeps/unix/sysv/linux/Makefile                   |    6 +++---
 sysdeps/unix/sysv/linux/Versions                   |    2 ++
 sysdeps/unix/sysv/linux/ntp_gettime.c              |    9 ++++++---
 .../sysv/linux/{ntp_gettime.c => ntp_gettimex.c}   |   10 +++++++---
 sysdeps/unix/sysv/linux/sys/timex.h                |   16 +++++++++++++++-
 6 files changed, 40 insertions(+), 10 deletions(-)
 copy sysdeps/unix/sysv/linux/{ntp_gettime.c => ntp_gettimex.c} (84%)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]