1 /* Copyright (C) 1998 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public License as
6 published by the Free Software Foundation; either version 2 of the
7 License, or (at your option) any later version.
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
14 You should have received a copy of the GNU Library General Public
15 License along with the GNU C Library; see the file COPYING.LIB. If not,
16 write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 Boston, MA 02111-1307, USA. */
21 #include <bits/errno.h>
23 /* The problem here is that initially we made struct timeval compatible with
24 OSF/1, using int32. But we defined time_t with uint64, and later found
25 that POSIX requires tv_sec to be time_t.
27 So now we have to do compatibility stuff. */
29 /* The variable is shared between all wrappers around signal handling
30 functions which have RT equivalents. */
31 .comm __libc_missing_axp_tv64, 4
35 #if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
36 #define GETITIMER __getitimer_tv64
38 #define GETITIMER getitimer
52 ldl t0, __libc_missing_axp_tv64
54 /* Save arguments in case we do need to fall back. */
60 ldi v0, SYS_ify(getitimer)
68 /* If we didn't get ENOSYS, it is a real error. */
70 $err64: cmpeq v0, ENOSYS, t0
72 stl t0, __libc_missing_axp_tv64
74 /* Recover the saved arguments. */
79 $do32: ldi v0, SYS_ify(osf_getitimer)
83 /* Copy back to proper format. */
99 lda pv, __syscall_error
101 jmp zero, (pv), __syscall_error
105 #if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
106 default_symbol_version (__getitimer_tv64, getitimer, GLIBC_2.1)