about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/ntp_gettime.c
Commit message (Collapse)AuthorAgeFilesLines
* linux: fix ntp_gettime abi break (BZ# 30156)Kacper Piwiński2023-03-101-2/+9
| | | | | | | | | | | | | | | | Between versions v2.11 and v2.12 struct ntptimeval got new fields. That wasn't a problem because new function ntp_gettimex was created (and made default) to support new struct. Old ntp_gettime was not using new fields so it was safe to call with old struct definition. Then commits 5613afe9e3dff and b6ad64b907a (added for 64 bit time_t support), ntp_gettime start setting new fields. Sets fields manually to maintain compatibility with v2.11 struct definition. Resolves #30156 Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Update copyright dates with scripts/update-copyrightsJoseph Myers2023-01-061-1/+1
|
* Update copyright dates with scripts/update-copyrightsPaul Eggert2022-01-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | I used these shell commands: ../glibc/scripts/update-copyrights $PWD/../gnulib/build-aux/update-copyright (cd ../glibc && git commit -am"[this commit message]") and then ignored the output, which consisted lines saying "FOO: warning: copyright statement not found" for each of 7061 files FOO. I then removed trailing white space from math/tgmath.h, support/tst-support-open-dev-null-range.c, and sysdeps/x86_64/multiarch/strlen-vec.S, to work around the following obscure pre-commit check failure diagnostics from Savannah. I don't know why I run into these diagnostics whereas others evidently do not. remote: *** 912-#endif remote: *** 913: remote: *** 914- remote: *** error: lines with trailing whitespace found ... remote: *** error: sysdeps/unix/sysv/linux/statx_cp.c: trailing lines
* Update copyright dates with scripts/update-copyrightsPaul Eggert2021-01-021-1/+1
| | | | | | | | | | | | | | | | I used these shell commands: ../glibc/scripts/update-copyrights $PWD/../gnulib/build-aux/update-copyright (cd ../glibc && git commit -am"[this commit message]") and then ignored the output, which consisted lines saying "FOO: warning: copyright statement not found" for each of 6694 files FOO. I then removed trailing white space from benchtests/bench-pthread-locks.c and iconvdata/tst-iconv-big5-hkscs-to-2ucs4.c, to work around this diagnostic from Savannah: remote: *** pre-commit check failed ... remote: *** error: lines with trailing whitespace found remote: error: hook declined to update refs/heads/master
* Linux: Add missing handling of tai field to __ntp_gettime64Florian Weimer2020-05-201-0/+1
| | | | | | | | | This fixes a build error: ../sysdeps/unix/sysv/linux/ntp_gettime.c: In function ‘__ntp_gettime’: ../sysdeps/unix/sysv/linux/ntp_gettime.c:56:10: error: ‘ntv64.tai’ is used uninitialized in this function [-Werror=uninitialized] 56 | *ntv = valid_ntptimeval64_to_ntptimeval (ntv64); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* y2038: linux: Provide __ntp_gettime64 implementationLukasz Majewski2020-05-201-3/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch provides new __ntp_gettime64 explicit 64 bit function for getting time parameters via NTP interface. Internally, the __clock_adjtime64 syscall is used instead of __adjtimex. This patch is necessary for having architectures with __WORDSIZE == 32 Y2038 safe. Moreover, a 32 bit version - __ntp_gettime has been refactored to internally use __ntp_gettime64. The __ntp_gettime is now supposed to be used on systems still supporting 32 bit time (__TIMESIZE != 64) - hence the necessary conversions between struct ntptimeval and 64 bit struct __ntptimeval64. Build tests: ./src/scripts/build-many-glibcs.py glibcs Run-time tests: - Run specific tests on ARM/x86 32bit systems (qemu): https://github.com/lmajewski/meta-y2038 and run tests: https://github.com/lmajewski/y2038-tests/commits/master Above tests were performed with Y2038 redirection applied as well as without to test the proper usage of both __ntp_gettime64 and __ntp_gettime. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Update copyright dates with scripts/update-copyrights.Joseph Myers2020-01-011-1/+1
|
* Prefer https to http for gnu.org and fsf.org URLsPaul Eggert2019-09-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also, change sources.redhat.com to sourceware.org. This patch was automatically generated by running the following shell script, which uses GNU sed, and which avoids modifying files imported from upstream: sed -ri ' s,(http|ftp)(://(.*\.)?(gnu|fsf|sourceware)\.org($|[^.]|\.[^a-z])),https\2,g s,(http|ftp)(://(.*\.)?)sources\.redhat\.com($|[^.]|\.[^a-z]),https\2sourceware.org\4,g ' \ $(find $(git ls-files) -prune -type f \ ! -name '*.po' \ ! -name 'ChangeLog*' \ ! -path COPYING ! -path COPYING.LIB \ ! -path manual/fdl-1.3.texi ! -path manual/lgpl-2.1.texi \ ! -path manual/texinfo.tex ! -path scripts/config.guess \ ! -path scripts/config.sub ! -path scripts/install-sh \ ! -path scripts/mkinstalldirs ! -path scripts/move-if-change \ ! -path INSTALL ! -path locale/programs/charmap-kw.h \ ! -path po/libc.pot ! -path sysdeps/gnu/errlist.c \ ! '(' -name configure \ -execdir test -f configure.ac -o -f configure.in ';' ')' \ ! '(' -name preconfigure \ -execdir test -f preconfigure.ac ';' ')' \ -print) and then by running 'make dist-prepare' to regenerate files built from the altered files, and then executing the following to cleanup: chmod a+x sysdeps/unix/sysv/linux/riscv/configure # Omit irrelevant whitespace and comment-only changes, # perhaps from a slightly-different Autoconf version. git checkout -f \ sysdeps/csky/configure \ sysdeps/hppa/configure \ sysdeps/riscv/configure \ sysdeps/unix/sysv/linux/csky/configure # Omit changes that caused a pre-commit check to fail like this: # remote: *** error: sysdeps/powerpc/powerpc64/ppc-mcount.S: trailing lines git checkout -f \ sysdeps/powerpc/powerpc64/ppc-mcount.S \ sysdeps/unix/sysv/linux/s390/s390-64/syscall.S # Omit change that caused a pre-commit check to fail like this: # remote: *** error: sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S: last line does not end in newline git checkout -f sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S
* Update copyright dates with scripts/update-copyrights.Joseph Myers2019-01-011-1/+1
| | | | | | | * All files with FSF copyright notices: Update copyright dates using scripts/update-copyrights. * locale/programs/charmap-kw.h: Regenerated. * locale/programs/locfile-kw.h: Likewise.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2018-01-011-1/+1
| | | | | | | * All files with FSF copyright notices: Update copyright dates using scripts/update-copyrights. * locale/programs/charmap-kw.h: Regenerated. * locale/programs/locfile-kw.h: Likewise.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2017-01-011-1/+1
|
* Update copyright dates with scripts/update-copyrights.Joseph Myers2016-01-041-1/+1
|
* Update copyright dates with scripts/update-copyrights.Joseph Myers2015-01-021-1/+1
|
* Don't use INTUSE with __adjtimex (bug 14132).Joseph Myers2014-10-081-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Bug 14132 is removal of the old INTDEF/INTUSE system of *_internal aliases as obsoleted by the hidden_proto / hidden_def system. Various cases were cleaned up in 2012, but some remain. This patch removes the use of this mechanism for __adjtimex. Tested for x86_64 that stripped installed shared libraries are unchanged by the patch. [BZ #14132] * sysdeps/unix/sysv/linux/include/sys/timex.h: New file. * sysdeps/unix/sysv/linux/adjtime.c [!ADJTIMEX] (ADJTIMEX): Do not use INTUSE. [!ADJTIMEX] (INTUSE(__adjtimex)): Remove declaration. * sysdeps/unix/sysv/linux/alpha/adjtime.c (__adjtimex_internal): Remove alias. (__adjtimex): Define using libc_hidden_ver. * sysdeps/unix/sysv/linux/ntp_gettime.c (INTUSE(__adjtimex)): Remove declaration. (ntp_gettime): Call __adjtimex directly. * sysdeps/unix/sysv/linux/ntp_gettimex.c (INTUSE(__adjtimex)): Remove declaration. (ntp_gettimex): Call __adjtimex directly. * sysdeps/unix/sysv/linux/syscalls.list (adjtimex): Remove __adjtimex_internal alias.
* Update copyright notices with scripts/update-copyrightsAllan McRae2014-01-011-1/+1
|
* Update copyright notices with scripts/update-copyrights.Joseph Myers2013-01-021-1/+1
|
* Replace FSF snail mail address with URLs.Paul Eggert2012-02-091-3/+2
|
* Update ntp_gettime for Linux.Ulrich Drepper2009-11-221-3/+6
| | | | | | | | | | | 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.
* Update.Ulrich Drepper2002-07-251-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | 2002-07-25 Ulrich Drepper <drepper@redhat.com> * sysdeps/wordsize-32/divdi3.c: Define __divdi3_internal. * sysdeps/wordsize-32/lldiv.c: Make gcc use __divdi3_internal instead of __divdi3. * sysdeps/unix/sysv/linux/adjtime.c: Use __adjtimex_internal. * sysdeps/unix/sysv/linux/ntp_gettime.c: Likewise. * sysdeps/unix/sysv/linux/syscalls.list: Add __adjtimex_internal alias for adjtimex syscall. * elf/dl-minimal.c: Define __assert_fail_internal. * assert/assert.c: Likewise. * include/assert.h: Define __assert_file macro if !SHARED and not NOT_IN_libc. * iconv/Makefile: Define NOT_IN_libc for objects in standalone programs. * locale/Makefile: Likewise. * nscd/Makefile: Likewise. * catgets/Makefile: Likewise. succesful seek call. Simplify error checking.
* Update to LGPL v2.1.Andreas Jaeger2001-07-061-8/+8
| | | | | | | | | | | | | | 2001-07-06 Paul Eggert <eggert@twinsun.com> * manual/argp.texi: Remove ignored LGPL copyright notice; it's not appropriate for documentation anyway. * manual/libc-texinfo.sh: "Library General Public License" -> "Lesser General Public License". 2001-07-06 Andreas Jaeger <aj@suse.de> * All files under GPL/LGPL version 2: Place under LGPL version 2.1.
* Update.Ulrich Drepper1999-01-071-0/+38
* sysdeps/unix/sysv/linux/Makefile [subdir=time] (sysdep_routines): Add ntp_adjtime and ntp_gettime. * sysdeps/unix/sysv/linux/Versions [GLIBC_2.1]: Add ntp_adjtime and ntp_gettime. 1998-12-29 Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de> * manual/time.texi (Precision Time): Add documentation for ntp_gettime and ntp_adjtime. 1998-12-28 Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de> * sysdeps/unix/sysv/linux/ntp_gettime.c: Created new file * sysdeps/unix/sysv/linux/ntp_adjtime.c: Created new file * sysdeps/unix/sysv/linux/sys/timex.h (struct ntptimeval): Added. Add prototypes for ntp_adjtime and ntp_gettime. 1999-01-07 Ulrich Drepper <drepper@cygnus.com>