1 From: Richard Henderson <rth at twiddle dot net>
3 Most of the patch concerns kernel-features.h, and using it in some
4 syscalls added before 2.2.0. Some new usage of INLINE_SYSCALL in
8 2003-06-20 Richard Henderson <rth at redhat dot com>
11 * sysdeps/unix/sysv/linux/alpha/Makefile (libpthread-routines):
12 Remove ptw-osf_sigprocmask.
15 * sysdeps/unix/alpha/sysdep.h (INLINE_SYSCALL1): Use __builtin_expect.
16 * sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_ST_INO_64_BIT)
18 (__ASSUME_TIMEVAL64): Set for alpha.
19 * sysdeps/unix/sysv/linux/alpha/Makefile (sysdep_routines): Remove
20 adjtimex, osf_sigprocmask, old_adjtimex.
21 * sysdeps/unix/sysv/linux/alpha/adjtime.c: Use INLINE_SYSCALL,
22 __ASSUME_TIMEVAL64. Reorg tv64 functions to avoid uninit variable.
23 * sysdeps/unix/sysv/linux/alpha/getitimer.S: Use __ASSUME_TIMEVAL64.
24 * sysdeps/unix/sysv/linux/alpha/getrusage.S: Likewise.
25 * sysdeps/unix/sysv/linux/alpha/gettimeofday.S: Likewise.
26 * sysdeps/unix/sysv/linux/alpha/select.S: Likewise.
27 * sysdeps/unix/sysv/linux/alpha/setitimer.S: Likewise.
28 * sysdeps/unix/sysv/linux/alpha/settimeofday.S: Likewise.
29 * sysdeps/unix/sysv/linux/alpha/utimes.S: Likewise.
30 * sysdeps/unix/sysv/linux/alpha/wait4.S: Likewise.
31 * sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S: Streamline
33 * sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S: Likewise.
34 * sysdeps/unix/sysv/linux/alpha/sigaction.c: New file.
35 * sysdeps/unix/sysv/linux/alpha/sigprocmask.c: Use INLINE_SYSCALL.
36 * sysdeps/unix/sysv/linux/alpha/ustat.c: Likewise.
37 * sysdeps/unix/sysv/linux/alpha/xmknod.c: Likewise.
38 * sysdeps/unix/sysv/linux/alpha/syscalls.list: Remove osf_sigprocmask,
39 sys_ustat, sys_mknod, adjtimex, old_adjtimex.
40 * sysdeps/unix/sysv/linux/alpha/sysdep.h (INLINE_SYSCALL): Don't
41 defer to __syscall_name; error for rt_sigaction.
42 * sysdeps/unix/sysv/linux/alpha/xstatconv.c: Include kernel_stat.h.
44 Index: linuxthreads/sysdeps/unix/sysv/linux/alpha/Makefile
45 ===================================================================
46 RCS file: /cvs/glibc/libc/linuxthreads/sysdeps/unix/sysv/linux/alpha/Makefile,v
47 retrieving revision 1.1
48 diff -c -p -d -u -r1.1 Makefile
49 --- linuxthreads/sysdeps/unix/sysv/linux/alpha/Makefile 6 Jan 2003 23:51:32 -0000 1.1
50 +++ linuxthreads/sysdeps/unix/sysv/linux/alpha/Makefile 20 Jun 2003 06:31:38 -0000
52 ifeq ($(subdir),linuxthreads)
53 -libpthread-routines += ptw-sysdep ptw-sigblock ptw-sigprocmask ptw-osf_sigprocmask
54 +libpthread-routines += ptw-sysdep ptw-sigblock ptw-sigprocmask
56 Index: sysdeps/unix/alpha/sysdep.h
57 ===================================================================
58 RCS file: /cvs/glibc/libc/sysdeps/unix/alpha/sysdep.h,v
59 retrieving revision 1.17
60 diff -c -p -d -u -r1.17 sysdep.h
61 --- sysdeps/unix/alpha/sysdep.h 23 Mar 2003 19:42:22 -0000 1.17
62 +++ sysdeps/unix/alpha/sysdep.h 20 Jun 2003 06:31:45 -0000
63 @@ -152,7 +152,7 @@ __LABEL(name) \
65 long _sc_ret, _sc_err; \
66 inline_syscall##nr(name, args); \
68 + if (__builtin_expect (_sc_err, 0)) \
70 __set_errno (_sc_ret); \
72 Index: sysdeps/unix/sysv/linux/kernel-features.h
73 ===================================================================
74 RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/kernel-features.h,v
75 retrieving revision 1.52
76 diff -c -p -d -u -r1.52 kernel-features.h
77 --- sysdeps/unix/sysv/linux/kernel-features.h 10 Jun 2003 02:28:19 -0000 1.52
78 +++ sysdeps/unix/sysv/linux/kernel-features.h 20 Jun 2003 06:31:46 -0000
80 # define __ASSUME_IPC64 1
83 -/* mips platforms had IPC64 all along. */
84 +/* MIPS platforms had IPC64 all along. */
86 # define __ASSUME_IPC64 1
89 /* The changed st_ino field appeared in 2.4.0-test6. But we cannot
90 distinguish this version from other 2.4.0 releases. Therefore play
91 save and assume it available is for 2.4.1 and up. */
92 -#if __LINUX_KERNEL_VERSION >= 132097
93 +#if __LINUX_KERNEL_VERSION >= 132097 && !defined __alpha__
94 # define __ASSUME_ST_INO_64_BIT 1
98 # define __ASSUME_ST_INO_64_BIT 1
99 # define __ASSUME_FCNTL64 1
100 # define __ASSUME_GETDENTS64_SYSCALL 1
103 +/* Alpha switched to a 64-bit timeval sometime before 2.2.0. */
104 +#if __LINUX_KERNEL_VERSION >= 131584 && defined __alpha__
105 +# define __ASSUME_TIMEVAL64 1
108 #if defined __mips__ && defined _ABIN32 && _MIPS_SIM == _ABIN32
109 Index: sysdeps/unix/sysv/linux/alpha/Makefile
110 ===================================================================
111 RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/alpha/Makefile,v
112 retrieving revision 1.20
113 diff -c -p -d -u -r1.20 Makefile
114 --- sysdeps/unix/sysv/linux/alpha/Makefile 24 Mar 2002 01:55:17 -0000 1.20
115 +++ sysdeps/unix/sysv/linux/alpha/Makefile 20 Jun 2003 06:31:47 -0000
116 @@ -6,12 +6,12 @@ ifeq ($(subdir),misc)
117 sysdep_headers += alpha/ptrace.h alpha/regdef.h sys/io.h
119 sysdep_routines += ieee_get_fp_control ieee_set_fp_control \
120 - ioperm osf_sigprocmask llseek adjtimex
123 # Support old timeval32 entry points
124 sysdep_routines += osf_select osf_gettimeofday osf_settimeofday \
125 osf_getitimer osf_setitimer osf_utimes \
126 - osf_getrusage osf_wait4 old_adjtimex
127 + osf_getrusage osf_wait4
129 # Support old ipc control
130 sysdep_routines += oldmsgctl oldsemctl oldshmctl
131 Index: sysdeps/unix/sysv/linux/alpha/adjtime.c
132 ===================================================================
133 RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/alpha/adjtime.c,v
134 retrieving revision 1.7
135 diff -c -p -d -u -r1.7 adjtime.c
136 --- sysdeps/unix/sysv/linux/alpha/adjtime.c 7 Jan 2003 23:51:48 -0000 1.7
137 +++ sysdeps/unix/sysv/linux/alpha/adjtime.c 20 Jun 2003 06:31:47 -0000
141 #include <shlib-compat.h>
143 +#include <sys/time.h>
144 +#include "kernel-features.h"
146 +#if !defined __ASSUME_TIMEVAL64 || SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)
150 @@ -55,7 +59,7 @@ struct timex32 {
151 #define TIMEVAL timeval32
152 #define TIMEX timex32
153 #define ADJTIME __adjtime_tv32
154 -#define ADJTIMEX(x) __adjtimex_tv32 (x)
155 +#define ADJTIMEX(x) INLINE_SYSCALL (old_adjtimex, 1, x)
156 #if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)
159 @@ -63,13 +67,18 @@ struct timex32 {
162 LINKAGE int ADJTIME (const struct TIMEVAL *itv, struct TIMEVAL *otv);
163 -extern int ADJTIMEX (struct TIMEX *);
165 #include <sysdeps/unix/sysv/linux/adjtime.c>
167 #if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)
168 +int __adjtimex_tv32 (struct timex32 *tx) { return ADJTIMEX (tx); }
169 +strong_alias (__adjtimex_tv32, __adjtimex_tv32_1);
170 +strong_alias (__adjtimex_tv32, __adjtimex_tv32_2);
171 +compat_symbol (libc, __adjtimex_tv32_1, __adjtimex, GLIBC_2_0);
172 +compat_symbol (libc, __adjtimex_tv32_2, adjtimex, GLIBC_2_0);
173 compat_symbol (libc, __adjtime_tv32, adjtime, GLIBC_2_0);
175 +#endif /* !__ASSUME_TIMEVAL64 || SHLIB_COMPAT */
178 #define TIMEVAL timeval
179 @@ -78,34 +87,38 @@ compat_symbol (libc, __adjtime_tv32, adj
181 #define ADJTIME __adjtime_tv64
183 -#define ADJTIMEX(x) __syscall_adjtimex_tv64 (x)
184 +#define ADJTIMEX(x) INLINE_SYSCALL (adjtimex, 1, x)
186 #define LINKAGE static
188 LINKAGE int ADJTIME (const struct TIMEVAL *itv, struct TIMEVAL *otv);
189 -extern int ADJTIMEX (struct TIMEX *);
191 #include <sysdeps/unix/sysv/linux/adjtime.c>
192 -static int missing_adjtimex = 0;
193 +#include <stdbool.h>
195 +#if !defined __ASSUME_TIMEVAL64
196 +static bool missing_adjtimex;
200 const struct timeval *itv;
203 + struct timeval32 itv32, otv32;
206 - if (!missing_adjtimex)
207 + switch (missing_adjtimex)
210 ret = __adjtime_tv64 (itv, otv);
211 if (ret && errno == ENOSYS)
212 missing_adjtimex = 1;
217 - if (missing_adjtimex)
219 - struct timeval32 itv32, otv32;
223 itv32.tv_sec = itv->tv_sec;
224 itv32.tv_usec = itv->tv_usec;
225 ret = __adjtime_tv32 (&itv32, &otv32);
226 @@ -114,31 +127,38 @@ __adjtime (itv, otv)
227 otv->tv_sec = otv32.tv_sec;
228 otv->tv_usec = otv32.tv_usec;
236 +strong_alias (__adjtime_tv64, __adjtime);
239 versioned_symbol (libc, __adjtime, adjtime, GLIBC_2_1);
241 -extern int __syscall_adjtimex_tv64 (struct timex *tx);
244 __adjtimex_tv64 (struct timex *tx)
246 +#if defined __ASSUME_TIMEVAL64
247 + return ADJTIMEX (tx);
249 + struct timex32 tx32;
252 - if (!missing_adjtimex)
254 - ret = __syscall_adjtimex_tv64 (tx);
255 - if (ret && errno == ENOSYS)
256 + switch (missing_adjtimex)
259 + ret = ADJTIMEX (tx);
260 + if (ret && errno == ENOSYS)
261 missing_adjtimex = 1;
266 - if (missing_adjtimex)
268 - struct timex32 tx32;
272 tx32.modes = tx->modes;
273 tx32.offset = tx->offset;
274 tx32.freq = tx->freq;
275 @@ -184,9 +204,11 @@ __adjtimex_tv64 (struct timex *tx)
276 tx->errcnt = tx32.errcnt;
277 tx->stbcnt = tx32.stbcnt;
286 strong_alias (__adjtimex_tv64, __adjtimex_internal);
287 Index: sysdeps/unix/sysv/linux/alpha/getitimer.S
288 ===================================================================
289 RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/alpha/getitimer.S,v
290 retrieving revision 1.5
291 diff -c -p -d -u -r1.5 getitimer.S
292 --- sysdeps/unix/sysv/linux/alpha/getitimer.S 8 Nov 2002 02:18:47 -0000 1.5
293 +++ sysdeps/unix/sysv/linux/alpha/getitimer.S 20 Jun 2003 06:31:47 -0000
295 -/* Copyright (C) 1998 Free Software Foundation, Inc.
296 +/* Copyright (C) 1998, 2003 Free Software Foundation, Inc.
297 This file is part of the GNU C Library.
299 The GNU C Library is free software; you can redistribute it and/or
303 #include <bits/errno.h>
304 +#include "kernel-features.h"
308 +#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
309 +#define GETITIMER __getitimer_tv64
311 +#define GETITIMER getitimer
314 +#if defined __ASSUME_TIMEVAL64
315 +PSEUDO(GETITIMER, getitimer, 2)
317 +PSEUDO_END(GETITIMER)
319 /* The problem here is that initially we made struct timeval compatible with
320 OSF/1, using int32. But we defined time_t with uint64, and later found
321 that POSIX requires tv_sec to be time_t.
323 functions which have RT equivalents. */
324 .comm __libc_missing_axp_tv64, 4
328 -#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
329 -#define GETITIMER __getitimer_tv64
331 -#define GETITIMER getitimer
337 @@ -100,6 +106,7 @@ $error:
338 SYSCALL_ERROR_HANDLER
341 +#endif /* __ASSUME_TIMEVAL64 */
343 #if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
344 default_symbol_version (__getitimer_tv64, getitimer, GLIBC_2.1)
345 Index: sysdeps/unix/sysv/linux/alpha/getrusage.S
346 ===================================================================
347 RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/alpha/getrusage.S,v
348 retrieving revision 1.7
349 diff -c -p -d -u -r1.7 getrusage.S
350 --- sysdeps/unix/sysv/linux/alpha/getrusage.S 8 Nov 2002 02:18:47 -0000 1.7
351 +++ sysdeps/unix/sysv/linux/alpha/getrusage.S 20 Jun 2003 06:31:47 -0000
353 -/* Copyright (C) 1998 Free Software Foundation, Inc.
354 +/* Copyright (C) 1998, 2003 Free Software Foundation, Inc.
355 This file is part of the GNU C Library.
357 The GNU C Library is free software; you can redistribute it and/or
361 #include <bits/errno.h>
362 +#include "kernel-features.h"
366 +#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
367 +#define GETRUSAGE __getrusage_tv64
369 +#define GETRUSAGE __getrusage
372 +#if defined __ASSUME_TIMEVAL64
373 +PSEUDO(GETRUSAGE, getrusage, 2)
375 +PSEUDO_END(GETRUSAGE)
377 /* The problem here is that initially we made struct timeval compatible with
378 OSF/1, using int32. But we defined time_t with uint64, and later found
379 that POSIX requires tv_sec to be time_t.
381 functions which have RT equivalents. */
382 .comm __libc_missing_axp_tv64, 4
386 -#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
387 -#define GETRUSAGE __getrusage_tv64
389 -#define GETRUSAGE __getrusage
395 @@ -132,6 +138,7 @@ $error:
396 SYSCALL_ERROR_HANDLER
399 +#endif /* __ASSUME_TIMEVAL64 */
401 #if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
402 strong_alias(__getrusage_tv64, ____getrusage_tv64)
403 Index: sysdeps/unix/sysv/linux/alpha/gettimeofday.S
404 ===================================================================
405 RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/alpha/gettimeofday.S,v
406 retrieving revision 1.7
407 diff -c -p -d -u -r1.7 gettimeofday.S
408 --- sysdeps/unix/sysv/linux/alpha/gettimeofday.S 6 Jun 2003 05:51:53 -0000 1.7
409 +++ sysdeps/unix/sysv/linux/alpha/gettimeofday.S 20 Jun 2003 06:31:47 -0000
411 -/* Copyright (C) 1998, 2002 Free Software Foundation, Inc.
412 +/* Copyright (C) 1998, 2002, 2003 Free Software Foundation, Inc.
413 This file is part of the GNU C Library.
415 The GNU C Library is free software; you can redistribute it and/or
419 #include <bits/errno.h>
420 +#include "kernel-features.h"
424 +#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
425 +#define GETTIMEOFDAY __gettimeofday_tv64
427 +#define GETTIMEOFDAY __gettimeofday
430 +#if defined __ASSUME_TIMEVAL64
431 +PSEUDO(GETTIMEOFDAY, gettimeofday, 2)
433 +PSEUDO_END(GETTIMEOFDAY)
436 /* The problem here is that initially we made struct timeval compatible with
437 OSF/1, using int32. But we defined time_t with uint64, and later found
439 functions which have RT equivalents. */
440 .comm __libc_missing_axp_tv64, 4
444 -#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
445 -#define GETTIMEOFDAY __gettimeofday_tv64
447 -#define GETTIMEOFDAY __gettimeofday
450 LEAF(GETTIMEOFDAY, 16)
453 @@ -97,6 +104,7 @@ $error:
454 SYSCALL_ERROR_HANDLER
457 +#endif /* __ASSUME_TIMEVAL64 */
459 #if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
460 default_symbol_version (__gettimeofday_tv64, __gettimeofday, GLIBC_2.1)
461 Index: sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S
462 ===================================================================
463 RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S,v
464 retrieving revision 1.10
465 diff -c -p -d -u -r1.10 ieee_get_fp_control.S
466 --- sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S 8 Nov 2002 02:18:47 -0000 1.10
467 +++ sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S 20 Jun 2003 06:31:47 -0000
469 -/* Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc.
470 +/* Copyright (C) 1993, 1995, 1996, 2003 Free Software Foundation, Inc.
471 This file is part of the GNU C Library.
472 Contributed by David Mosberger <davidm@azstarnet.com>, 1995.
474 @@ -32,9 +32,13 @@ LEAF(__ieee_get_fp_control, 16)
475 jsr AT, (AT), _mcount
489 @@ -48,10 +52,6 @@ LEAF(__ieee_get_fp_control, 16)
498 SYSCALL_ERROR_HANDLER
500 Index: sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S
501 ===================================================================
502 RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S,v
503 retrieving revision 1.11
504 diff -c -p -d -u -r1.11 ieee_set_fp_control.S
505 --- sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S 8 Nov 2002 02:18:47 -0000 1.11
506 +++ sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S 20 Jun 2003 06:31:47 -0000
508 -/* Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc.
509 +/* Copyright (C) 1993, 1995, 1996, 1997, 2003 Free Software Foundation, Inc.
510 This file is part of the GNU C Library.
511 Contributed by David Mosberger <davidm@azstarnet.com>, 1995.
513 @@ -30,9 +30,13 @@ LEAF(__ieee_set_fp_control, 16)
514 jsr AT, (AT), _mcount
528 @@ -47,10 +51,6 @@ LEAF(__ieee_set_fp_control, 16)
537 SYSCALL_ERROR_HANDLER
539 Index: sysdeps/unix/sysv/linux/alpha/select.S
540 ===================================================================
541 RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/alpha/select.S,v
542 retrieving revision 1.9
543 diff -c -p -d -u -r1.9 select.S
544 --- sysdeps/unix/sysv/linux/alpha/select.S 7 Jan 2003 00:48:34 -0000 1.9
545 +++ sysdeps/unix/sysv/linux/alpha/select.S 20 Jun 2003 06:31:47 -0000
547 #include <sysdep-cancel.h>
549 #include <bits/errno.h>
550 +#include "kernel-features.h"
554 +#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
555 +#define SELECT __select_tv64
557 +#define SELECT __select
560 +#if defined __ASSUME_TIMEVAL64
561 +PSEUDO(SELECT, select, 5)
565 /* The problem here is that initially we made struct timeval compatible with
566 OSF/1, using int32. But we defined time_t with uint64, and later found
567 that POSIX requires tv_sec to be time_t.
569 functions which have RT equivalents. */
570 .comm __libc_missing_axp_tv64, 4
574 -#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
575 -#define SELECT __select_tv64
577 -#define SELECT __select
583 @@ -210,6 +216,7 @@ $error:
584 SYSCALL_ERROR_HANDLER
587 +#endif /* __ASSUME_TIMEVAL64 */
589 #if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
590 default_symbol_version (__select_tv64, __select, GLIBC_2.1)
591 Index: sysdeps/unix/sysv/linux/alpha/setitimer.S
592 ===================================================================
593 RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/alpha/setitimer.S,v
594 retrieving revision 1.5
595 diff -c -p -d -u -r1.5 setitimer.S
596 --- sysdeps/unix/sysv/linux/alpha/setitimer.S 8 Nov 2002 02:18:47 -0000 1.5
597 +++ sysdeps/unix/sysv/linux/alpha/setitimer.S 20 Jun 2003 06:31:47 -0000
599 -/* Copyright (C) 1998 Free Software Foundation, Inc.
600 +/* Copyright (C) 1998, 2003 Free Software Foundation, Inc.
601 This file is part of the GNU C Library.
603 The GNU C Library is free software; you can redistribute it and/or
607 #include <bits/errno.h>
608 +#include "kernel-features.h"
612 +#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
613 +#define SETITIMER __setitimer_tv64
615 +#define SETITIMER __setitimer
618 +#if defined __ASSUME_TIMEVAL64
619 +PSEUDO(SETITIMER, setitimer, 3)
621 +PSEUDO_END(SETITIMER)
623 /* The problem here is that initially we made struct timeval compatible with
624 OSF/1, using int32. But we defined time_t with uint64, and later found
625 that POSIX requires tv_sec to be time_t.
627 functions which have RT equivalents. */
628 .comm __libc_missing_axp_tv64, 4
632 -#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
633 -#define SETITIMER __setitimer_tv64
635 -#define SETITIMER __setitimer
641 @@ -116,6 +122,7 @@ $error:
642 SYSCALL_ERROR_HANDLER
645 +#endif /* __ASSUME_TIMEVAL64 */
647 #if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
648 default_symbol_version (__setitimer_tv64, __setitimer, GLIBC_2.1)
649 Index: sysdeps/unix/sysv/linux/alpha/settimeofday.S
650 ===================================================================
651 RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/alpha/settimeofday.S,v
652 retrieving revision 1.5
653 diff -c -p -d -u -r1.5 settimeofday.S
654 --- sysdeps/unix/sysv/linux/alpha/settimeofday.S 8 Nov 2002 02:18:47 -0000 1.5
655 +++ sysdeps/unix/sysv/linux/alpha/settimeofday.S 20 Jun 2003 06:31:48 -0000
657 -/* Copyright (C) 1998 Free Software Foundation, Inc.
658 +/* Copyright (C) 1998, 2003 Free Software Foundation, Inc.
659 This file is part of the GNU C Library.
661 The GNU C Library is free software; you can redistribute it and/or
665 #include <bits/errno.h>
666 +#include "kernel-features.h"
670 +#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
671 +#define SETTIMEOFDAY __settimeofday_tv64
673 +#define SETTIMEOFDAY __settimeofday
676 +#if defined __ASSUME_TIMEVAL64
677 +PSEUDO(SETTIMEOFDAY, settimeofday, 2)
679 +PSEUDO_END(SETTIMEOFDAY)
681 /* The problem here is that initially we made struct timeval compatible with
682 OSF/1, using int32. But we defined time_t with uint64, and later found
683 that POSIX requires tv_sec to be time_t.
685 functions which have RT equivalents. */
686 .comm __libc_missing_axp_tv64, 4
690 -#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
691 -#define SETTIMEOFDAY __settimeofday_tv64
693 -#define SETTIMEOFDAY __settimeofday
696 LEAF(SETTIMEOFDAY, 16)
699 @@ -97,6 +103,7 @@ $error:
700 SYSCALL_ERROR_HANDLER
703 +#endif /* __ASSUME_TIMEVAL64 */
705 #if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
706 default_symbol_version (__settimeofday_tv64, __settimeofday, GLIBC_2.1)
707 Index: sysdeps/unix/sysv/linux/alpha/sigaction.c
708 ===================================================================
709 RCS file: sysdeps/unix/sysv/linux/alpha/sigaction.c
710 diff -N sysdeps/unix/sysv/linux/alpha/sigaction.c
711 --- /dev/null 1 Jan 1970 00:00:00 -0000
712 +++ sysdeps/unix/sysv/linux/alpha/sigaction.c 20 Jun 2003 06:31:48 -0000
714 +/* Copyright (C) 2003 Free Software Foundation, Inc.
715 + This file is part of the GNU C Library.
717 + The GNU C Library is free software; you can redistribute it and/or
718 + modify it under the terms of the GNU Lesser General Public
719 + License as published by the Free Software Foundation; either
720 + version 2.1 of the License, or (at your option) any later version.
722 + The GNU C Library is distributed in the hope that it will be useful,
723 + but WITHOUT ANY WARRANTY; without even the implied warranty of
724 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
725 + Lesser General Public License for more details.
727 + You should have received a copy of the GNU Lesser General Public
728 + License along with the GNU C Library; if not, write to the Free
729 + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
735 + * In order to get the hidden arguments for rt_sigaction set up
736 + * properly, we need to call the assembly version. Detect this in the
737 + * INLINE_SYSCALL macro, and fail to expand inline in that case.
740 +#undef INLINE_SYSCALL
741 +#define INLINE_SYSCALL(name, nr, args...) \
742 + (__NR_##name == __NR_rt_sigaction \
743 + ? __syscall_rt_sigaction(args) \
744 + : INLINE_SYSCALL1(name, nr, args))
746 +#include <sysdeps/unix/sysv/linux/sigaction.c>
747 Index: sysdeps/unix/sysv/linux/alpha/sigprocmask.c
748 ===================================================================
749 RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/alpha/sigprocmask.c,v
750 retrieving revision 1.3
751 diff -c -p -d -u -r1.3 sigprocmask.c
752 --- sysdeps/unix/sysv/linux/alpha/sigprocmask.c 6 Jul 2001 04:56:13 -0000 1.3
753 +++ sysdeps/unix/sysv/linux/alpha/sigprocmask.c 20 Jun 2003 06:31:48 -0000
755 -/* Copyright (C) 1993, 1995, 1997 Free Software Foundation, Inc.
756 +/* Copyright (C) 1993, 1995, 1997, 2003 Free Software Foundation, Inc.
757 This file is part of the GNU C Library.
758 Contributed by David Mosberger (davidm@azstarnet.com).
761 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
768 /* When there is kernel support for more than 64 signals, we'll have to
769 switch to a new system call convention here. */
771 -extern unsigned long __osf_sigprocmask (int how, unsigned long newmask);
774 __sigprocmask (int how, const sigset_t *set, sigset_t *oset)
776 @@ -32,15 +31,14 @@ __sigprocmask (int how, const sigset_t *
781 - setval = set->__val[0];
783 + setval = set->__val[0];
787 how = SIG_BLOCK; /* ensure blocked mask doesn't get changed */
789 - result = __osf_sigprocmask (how, setval);
791 + result = INLINE_SYSCALL (osf_sigprocmask, 2, how, setval);
793 /* If there are ever more than 63 signals, we need to recode this
794 in assembler since we wouldn't be able to distinguish a mask of
795 Index: sysdeps/unix/sysv/linux/alpha/syscalls.list
796 ===================================================================
797 RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/alpha/syscalls.list,v
798 retrieving revision 1.56
799 diff -c -p -d -u -r1.56 syscalls.list
800 --- sysdeps/unix/sysv/linux/alpha/syscalls.list 6 Jun 2003 05:52:52 -0000 1.56
801 +++ sysdeps/unix/sysv/linux/alpha/syscalls.list 20 Jun 2003 06:31:48 -0000
802 @@ -13,7 +13,6 @@ semtimedop - semtimedop i:ipip semtimedo
803 semget - semget i:iii __semget semget
804 oldsemctl EXTRA semctl i:iiii __old_semctl semctl@GLIBC_2.0
806 -osf_sigprocmask - osf_sigprocmask 2 __osf_sigprocmask
807 sigstack - sigstack 2 sigstack
808 vfork - vfork 0 __vfork vfork
810 @@ -34,10 +33,6 @@ truncate - truncate 2 truncate truncate6
811 readahead - readahead 3 __readahead readahead
812 sendfile - sendfile i:iipi sendfile sendfile64
814 -# these are actually common with the x86:
815 -sys_ustat ustat ustat 2 __syscall_ustat
816 -sys_mknod xmknod mknod 3 __syscall_mknod
818 # proper socket implementations:
819 accept - accept C:3 __libc_accept __accept accept
820 bind - bind 3 __bind bind
821 @@ -64,9 +59,6 @@ pciconfig_read EXTRA pciconfig_read 5 pc
822 pciconfig_write EXTRA pciconfig_write 5 pciconfig_write
823 pciconfig_iobase EXTRA pciconfig_iobase 3 __pciconfig_iobase pciconfig_iobase
825 -# Wrapper for adjtimex.
826 -adjtimex - syscall_adjtimex 1 __syscall_adjtimex syscall_adjtimex
828 # support old timeval32 entry points
829 osf_select - osf_select C:5 __select_tv32 __select@GLIBC_2.0 select@GLIBC_2.0
830 osf_gettimeofday - osf_gettimeofday 2 __gettimeofday_tv32 __gettimeofday@GLIBC_2.0 gettimeofday@GLIBC_2.0
831 @@ -76,7 +68,3 @@ osf_setitimer - osf_setitimer 3 __setiti
832 osf_utimes - osf_utimes 2 __utimes_tv32 utimes@GLIBC_2.0
833 osf_getrusage - osf_getrusage 2 __getrusage_tv32 getrusage@GLIBC_2.0
834 osf_wait4 - osf_wait4 2 __wait4_tv32 wait4@GLIBC_2.0
835 -old_adjtimex - old_adjtimex 1 __adjtimex_tv32 __adjtimex@GLIBC_2.0 adjtimex@GLIBC_2.0
837 -# and one for timeval64 entry points
838 -adjtimex adjtime adjtimex 1 __syscall_adjtimex_tv64
839 Index: sysdeps/unix/sysv/linux/alpha/sysdep.h
840 ===================================================================
841 RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/alpha/sysdep.h,v
842 retrieving revision 1.15
843 diff -c -p -d -u -r1.15 sysdep.h
844 --- sysdeps/unix/sysv/linux/alpha/sysdep.h 6 Jun 2003 05:52:52 -0000 1.15
845 +++ sysdeps/unix/sysv/linux/alpha/sysdep.h 20 Jun 2003 06:31:48 -0000
849 * In order to get the hidden arguments for rt_sigaction set up
850 - * properly, we need to call the assembly version. Detect this in the
851 - * INLINE_SYSCALL macro, and fail to expand inline in that case.
852 + * properly, we need to call the assembly version. This shouldn't
853 + * happen except for inside sigaction.c, where we handle this
854 + * specially. Catch other uses and error.
857 #undef INLINE_SYSCALL
858 -#define INLINE_SYSCALL(name, nr, args...) \
859 - (__NR_##name == __NR_rt_sigaction \
860 - ? __syscall_##name(args) \
861 - : INLINE_SYSCALL1(name, nr, args))
862 +#define INLINE_SYSCALL(name, nr, args...) \
864 + extern char ChEcK[__NR_##name == __NR_rt_sigaction ? -1 : 1] \
865 + __attribute__((unused)); \
866 + INLINE_SYSCALL1(name, nr, args); \
869 #undef INTERNAL_SYSCALL
870 #define INTERNAL_SYSCALL(name, err_out, nr, args...) \
871 Index: sysdeps/unix/sysv/linux/alpha/ustat.c
872 ===================================================================
873 RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/alpha/ustat.c,v
874 retrieving revision 1.3
875 diff -c -p -d -u -r1.3 ustat.c
876 --- sysdeps/unix/sysv/linux/alpha/ustat.c 6 Jul 2001 04:56:13 -0000 1.3
877 +++ sysdeps/unix/sysv/linux/alpha/ustat.c 20 Jun 2003 06:31:48 -0000
879 -/* Copyright (C) 1997 Free Software Foundation, Inc.
880 +/* Copyright (C) 1997, 2003 Free Software Foundation, Inc.
881 This file is part of the GNU C Library.
882 Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
885 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
889 #include <sys/ustat.h>
890 #include <sys/sysmacros.h>
893 -extern int __syscall_ustat (unsigned int dev, struct ustat *ubuf);
897 ustat (dev_t dev, struct ustat *ubuf)
898 @@ -31,5 +30,5 @@ ustat (dev_t dev, struct ustat *ubuf)
899 /* We must convert the value to dev_t type used by the kernel. */
900 k_dev = ((major (dev) & 0xff) << 8) | (minor (dev) & 0xff);
902 - return __syscall_ustat (k_dev, ubuf);
903 + return INLINE_SYSCALL (ustat, 2, k_dev, ubuf);
905 Index: sysdeps/unix/sysv/linux/alpha/utimes.S
906 ===================================================================
907 RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/alpha/utimes.S,v
908 retrieving revision 1.5
909 diff -c -p -d -u -r1.5 utimes.S
910 --- sysdeps/unix/sysv/linux/alpha/utimes.S 8 Nov 2002 02:18:47 -0000 1.5
911 +++ sysdeps/unix/sysv/linux/alpha/utimes.S 20 Jun 2003 06:31:48 -0000
913 -/* Copyright (C) 1998 Free Software Foundation, Inc.
914 +/* Copyright (C) 1998, 2003 Free Software Foundation, Inc.
915 This file is part of the GNU C Library.
917 The GNU C Library is free software; you can redistribute it and/or
921 #include <bits/errno.h>
922 +#include "kernel-features.h"
926 +#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
927 +#define UTIMES __utimes_tv64
929 +#define UTIMES __utimes
932 +#if defined __ASSUME_TIMEVAL64
933 +PSEUDO(UTIMES, utimes, 2)
937 /* The problem here is that initially we made struct timeval compatible with
938 OSF/1, using int32. But we defined time_t with uint64, and later found
939 that POSIX requires tv_sec to be time_t.
941 functions which have RT equivalents. */
942 .comm __libc_missing_axp_tv64, 4
946 -#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
947 -#define UTIMES __utimes_tv64
949 -#define UTIMES __utimes
955 @@ -102,6 +108,7 @@ $error:
956 SYSCALL_ERROR_HANDLER
959 +#endif /* __ASSUME_TIMEVAL64 */
961 #if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
962 default_symbol_version (__utimes_tv64, __utimes, GLIBC_2.1)
963 Index: sysdeps/unix/sysv/linux/alpha/wait4.S
964 ===================================================================
965 RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/alpha/wait4.S,v
966 retrieving revision 1.5
967 diff -c -p -d -u -r1.5 wait4.S
968 --- sysdeps/unix/sysv/linux/alpha/wait4.S 8 Nov 2002 02:18:47 -0000 1.5
969 +++ sysdeps/unix/sysv/linux/alpha/wait4.S 20 Jun 2003 06:31:48 -0000
971 -/* Copyright (C) 1998 Free Software Foundation, Inc.
972 +/* Copyright (C) 1998, 2003 Free Software Foundation, Inc.
973 This file is part of the GNU C Library.
975 The GNU C Library is free software; you can redistribute it and/or
979 #include <bits/errno.h>
980 +#include "kernel-features.h"
984 +#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
985 +#define WAIT4 __wait4_tv64
987 +#define WAIT4 __wait4
990 +#if defined __ASSUME_TIMEVAL64
991 +PSEUDO(WAIT4, wait4, 4)
995 /* The problem here is that initially we made struct timeval compatible with
996 OSF/1, using int32. But we defined time_t with uint64, and later found
997 that POSIX requires tv_sec to be time_t.
999 functions which have RT equivalents. */
1000 .comm __libc_missing_axp_tv64, 4
1004 -#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
1005 -#define WAIT4 __wait4_tv64
1007 -#define WAIT4 __wait4
1013 @@ -135,6 +141,7 @@ $error:
1014 SYSCALL_ERROR_HANDLER
1017 +#endif /* __ASSUME_TIMEVAL64 */
1019 #if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
1020 default_symbol_version (__wait4_tv64, __wait4, GLIBC_2.1)
1021 Index: sysdeps/unix/sysv/linux/alpha/xmknod.c
1022 ===================================================================
1023 RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/alpha/xmknod.c,v
1024 retrieving revision 1.4
1025 diff -c -p -d -u -r1.4 xmknod.c
1026 --- sysdeps/unix/sysv/linux/alpha/xmknod.c 4 Aug 2002 09:23:45 -0000 1.4
1027 +++ sysdeps/unix/sysv/linux/alpha/xmknod.c 20 Jun 2003 06:31:48 -0000
1029 /* xmknod call using old-style Unix mknod system call.
1030 - Copyright (C) 1991,1993,1995,1996,1997,2002 Free Software Foundation, Inc.
1031 + Copyright (C) 1991,1993,1995,1996,1997,2002,2003
1032 + Free Software Foundation, Inc.
1033 This file is part of the GNU C Library.
1035 The GNU C Library is free software; you can redistribute it and/or
1037 #include <sys/types.h>
1038 #include <sys/stat.h>
1039 #include <sys/sysmacros.h>
1041 -extern int __syscall_mknod (const char *, unsigned int, unsigned int);
1042 +#include <sysdep.h>
1044 /* Create a device file named PATH, with permission and special bits MODE
1045 and device number DEV (which can be constructed from major and minor
1046 @@ -41,7 +41,7 @@ __xmknod (int vers, const char *path, mo
1047 /* We must convert the value to dev_t type used by the kernel. */
1048 k_dev = ((major (*dev) & 0xff) << 8) | (minor (*dev) & 0xff);
1050 - return __syscall_mknod (path, mode, k_dev);
1051 + return INLINE_SYSCALL (mknod, 3, path, mode, k_dev);
1054 weak_alias (__xmknod, _xmknod)