]> git.pld-linux.org Git - packages/glibc.git/blob - glibc-alpha-tv64.patch
- do not use TLS for alphaev6 neither
[packages/glibc.git] / glibc-alpha-tv64.patch
1 From: Richard Henderson <rth at twiddle dot net>
2
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
5 various places.
6
7
8  2003-06-20  Richard Henderson  <rth at redhat dot com>
9  
10 linuxthreads/
11         * sysdeps/unix/sysv/linux/alpha/Makefile (libpthread-routines): 
12         Remove ptw-osf_sigprocmask.
13
14 libc/
15         * sysdeps/unix/alpha/sysdep.h (INLINE_SYSCALL1): Use __builtin_expect.
16         * sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_ST_INO_64_BIT)
17         Unset for alpha.
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
32         PIC code sequence.
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.
43
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
51 @@ -1,3 +1,3 @@
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
55  endif
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)                                               \
64  ({                                             \
65         long _sc_ret, _sc_err;                  \
66         inline_syscall##nr(name, args);         \
67 -       if (_sc_err)                            \
68 +       if (__builtin_expect (_sc_err, 0))      \
69           {                                     \
70             __set_errno (_sc_ret);              \
71             _sc_ret = -1L;                      \
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
79 @@ -136,7 +136,7 @@
80  # define __ASSUME_IPC64                1
81  #endif
82  
83 -/* mips platforms had IPC64 all along.  */
84 +/* MIPS platforms had IPC64 all along.  */
85  #if defined __mips__
86  # define __ASSUME_IPC64                1
87  #endif
88 @@ -156,7 +156,7 @@
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
95  #endif
96  
97 @@ -250,6 +250,11 @@
98  # define __ASSUME_ST_INO_64_BIT                1
99  # define __ASSUME_FCNTL64              1
100  # define __ASSUME_GETDENTS64_SYSCALL   1
101 +#endif
102 +
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
106  #endif
107  
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
118  
119  sysdep_routines += ieee_get_fp_control ieee_set_fp_control \
120 -                  ioperm osf_sigprocmask llseek adjtimex
121 +                  ioperm llseek
122  
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
128  
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
138 @@ -17,7 +17,11 @@
139     02111-1307 USA.  */
140  
141  #include <shlib-compat.h>
142 +#include <sysdep.h>
143 +#include <sys/time.h>
144 +#include "kernel-features.h"
145  
146 +#if !defined __ASSUME_TIMEVAL64 || SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)
147  struct timeval32
148  {
149      int tv_sec, tv_usec;
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)
157  #define LINKAGE
158  #else
159 @@ -63,13 +67,18 @@ struct timex32 {
160  #endif
161  
162  LINKAGE int ADJTIME (const struct TIMEVAL *itv, struct TIMEVAL *otv);
163 -extern int ADJTIMEX (struct TIMEX *);
164  
165  #include <sysdeps/unix/sysv/linux/adjtime.c>
166  
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);
174  #endif
175 +#endif /* !__ASSUME_TIMEVAL64 || SHLIB_COMPAT */
176  
177  #undef TIMEVAL
178  #define TIMEVAL                timeval
179 @@ -78,34 +87,38 @@ compat_symbol (libc, __adjtime_tv32, adj
180  #undef ADJTIME
181  #define ADJTIME                __adjtime_tv64
182  #undef ADJTIMEX
183 -#define ADJTIMEX(x)    __syscall_adjtimex_tv64 (x)
184 +#define ADJTIMEX(x)    INLINE_SYSCALL (adjtimex, 1, x)
185  #undef LINKAGE
186  #define LINKAGE                static
187  
188  LINKAGE int ADJTIME (const struct TIMEVAL *itv, struct TIMEVAL *otv);
189 -extern int ADJTIMEX (struct TIMEX *);
190  
191  #include <sysdeps/unix/sysv/linux/adjtime.c>
192 -static int missing_adjtimex = 0;
193 +#include <stdbool.h>
194 +
195 +#if !defined __ASSUME_TIMEVAL64
196 +static bool missing_adjtimex;
197  
198  int
199  __adjtime (itv, otv)
200       const struct timeval *itv;
201       struct timeval *otv;
202  {
203 +  struct timeval32 itv32, otv32;
204    int ret;
205  
206 -  if (!missing_adjtimex)
207 +  switch (missing_adjtimex)
208      {
209 +    case false:
210        ret = __adjtime_tv64 (itv, otv);
211        if (ret && errno == ENOSYS)
212         missing_adjtimex = 1;
213 -    }
214 +      else
215 +       break;
216  
217 -  if (missing_adjtimex)
218 -    {
219 -      struct timeval32 itv32, otv32;
220 +      /* FALLTHRU */
221  
222 +    default:
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;
229         }
230 +      break;
231      }
232  
233    return ret;
234  }
235 +#else
236 +strong_alias (__adjtime_tv64, __adjtime);
237 +#endif
238  
239  versioned_symbol (libc, __adjtime, adjtime, GLIBC_2_1);
240  
241 -extern int __syscall_adjtimex_tv64 (struct timex *tx);
242 -
243  int
244  __adjtimex_tv64 (struct timex *tx)
245  {
246 +#if defined __ASSUME_TIMEVAL64
247 +  return ADJTIMEX (tx);
248 +#else
249 +  struct timex32 tx32;
250    int ret;
251  
252 -  if (!missing_adjtimex)
253 -   {
254 -     ret = __syscall_adjtimex_tv64 (tx);
255 -     if (ret && errno == ENOSYS)
256 +  switch (missing_adjtimex)
257 +    {
258 +    case false:
259 +      ret = ADJTIMEX (tx);
260 +      if (ret && errno == ENOSYS)
261         missing_adjtimex = 1;
262 -   }
263 +      else
264 +       break;
265  
266 -  if (missing_adjtimex)
267 -    {
268 -      struct timex32 tx32;
269 +      /* FALLTHRU */
270  
271 +    default:
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;
278         }
279 +      break;
280      }
281  
282    return ret;
283 +#endif
284  }
285  
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
294 @@ -1,4 +1,4 @@
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.
298  
299     The GNU C Library is free software; you can redistribute it and/or
300 @@ -19,7 +19,21 @@
301  #include <sysdep.h>
302  #define _ERRNO_H        1
303  #include <bits/errno.h>
304 +#include "kernel-features.h"
305  
306 +.text
307 +
308 +#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
309 +#define GETITIMER      __getitimer_tv64
310 +#else
311 +#define GETITIMER      getitimer
312 +#endif
313 +
314 +#if defined __ASSUME_TIMEVAL64
315 +PSEUDO(GETITIMER, getitimer, 2)
316 +       ret
317 +PSEUDO_END(GETITIMER)
318 +#else
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.
322 @@ -30,14 +44,6 @@
323     functions which have RT equivalents.  */
324  .comm __libc_missing_axp_tv64, 4
325  
326 -.text
327 -
328 -#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
329 -#define GETITIMER      __getitimer_tv64
330 -#else
331 -#define GETITIMER      getitimer
332 -#endif
333 -
334  LEAF(GETITIMER, 16)
335         ldgp    gp, 0(pv)
336         subq    sp, 16, sp
337 @@ -100,6 +106,7 @@ $error:
338         SYSCALL_ERROR_HANDLER
339  
340  END(GETITIMER)
341 +#endif /* __ASSUME_TIMEVAL64 */
342  
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
352 @@ -1,4 +1,4 @@
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.
356  
357     The GNU C Library is free software; you can redistribute it and/or
358 @@ -19,7 +19,21 @@
359  #include <sysdep.h>
360  #define _ERRNO_H        1
361  #include <bits/errno.h>
362 +#include "kernel-features.h"
363  
364 +.text
365 +
366 +#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
367 +#define GETRUSAGE      __getrusage_tv64
368 +#else
369 +#define GETRUSAGE      __getrusage
370 +#endif
371 +
372 +#if defined __ASSUME_TIMEVAL64
373 +PSEUDO(GETRUSAGE, getrusage, 2)
374 +       ret
375 +PSEUDO_END(GETRUSAGE)
376 +#else
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.
380 @@ -30,14 +44,6 @@
381     functions which have RT equivalents.  */
382  .comm __libc_missing_axp_tv64, 4
383  
384 -.text
385 -
386 -#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
387 -#define GETRUSAGE      __getrusage_tv64
388 -#else
389 -#define GETRUSAGE      __getrusage
390 -#endif
391 -
392  LEAF(GETRUSAGE, 16)
393         ldgp    gp, 0(pv)
394         subq    sp, 16, sp
395 @@ -132,6 +138,7 @@ $error:
396         SYSCALL_ERROR_HANDLER
397  
398  END(GETRUSAGE)
399 +#endif /* __ASSUME_TIMEVAL64 */
400  
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
410 @@ -1,4 +1,4 @@
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.
414  
415     The GNU C Library is free software; you can redistribute it and/or
416 @@ -19,6 +19,21 @@
417  #include <sysdep.h>
418  #define _ERRNO_H        1
419  #include <bits/errno.h>
420 +#include "kernel-features.h"
421 +
422 +.text
423 +
424 +#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
425 +#define GETTIMEOFDAY   __gettimeofday_tv64
426 +#else
427 +#define GETTIMEOFDAY   __gettimeofday
428 +#endif
429 +
430 +#if defined __ASSUME_TIMEVAL64
431 +PSEUDO(GETTIMEOFDAY, gettimeofday, 2)
432 +       ret
433 +PSEUDO_END(GETTIMEOFDAY)
434 +#else
435  
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
438 @@ -30,14 +45,6 @@
439     functions which have RT equivalents.  */
440  .comm __libc_missing_axp_tv64, 4
441  
442 -.text
443 -
444 -#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
445 -#define GETTIMEOFDAY   __gettimeofday_tv64
446 -#else
447 -#define GETTIMEOFDAY   __gettimeofday
448 -#endif
449 -
450  LEAF(GETTIMEOFDAY, 16)
451         ldgp    gp, 0(pv)
452         subq    sp, 16, sp
453 @@ -97,6 +104,7 @@ $error:
454         SYSCALL_ERROR_HANDLER
455  
456  END(GETTIMEOFDAY)
457 +#endif /* __ASSUME_TIMEVAL64 */
458  
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
468 @@ -1,4 +1,4 @@
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.
473  
474 @@ -32,9 +32,13 @@ LEAF(__ieee_get_fp_control, 16)
475         jsr     AT, (AT), _mcount
476         .set at
477         .prologue 1
478 -#else
479 +#elif defined PIC
480         lda     sp, -16(sp)
481         .prologue 0
482 +#else
483 +       ldgp    gp, 0(pv)
484 +       lda     sp, -16(sp)
485 +       .prologue 1
486  #endif
487  
488         mov     sp, a1
489 @@ -48,10 +52,6 @@ LEAF(__ieee_get_fp_control, 16)
490         ret
491  
492  $error:
493 -#ifndef PROF
494 -       br      gp, 1f
495 -1:     ldgp    gp, 0(gp)
496 -#endif
497         lda     sp, 16(sp)
498         SYSCALL_ERROR_HANDLER
499  
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
507 @@ -1,4 +1,4 @@
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.
512  
513 @@ -30,9 +30,13 @@ LEAF(__ieee_set_fp_control, 16)
514         jsr     AT, (AT), _mcount
515         .set at
516         .prologue 1
517 -#else
518 +#elif defined PIC
519         lda     sp, -16(sp)
520         .prologue 0
521 +#else
522 +       ldgp    gp, 0(pv)
523 +       lda     sp, -16(sp)
524 +       .prologue 1
525  #endif
526  
527         stq     a0, 0(sp)
528 @@ -47,10 +51,6 @@ LEAF(__ieee_set_fp_control, 16)
529         ret
530  
531  $error:
532 -#ifndef PROF
533 -       br      gp, 1f
534 -1:     ldgp    gp, 0(gp)
535 -#endif
536         lda     sp, 16(sp)
537         SYSCALL_ERROR_HANDLER
538  
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
546 @@ -19,7 +19,21 @@
547  #include <sysdep-cancel.h>
548  #define _ERRNO_H        1
549  #include <bits/errno.h>
550 +#include "kernel-features.h"
551 +
552 +.text
553 +
554 +#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
555 +#define SELECT __select_tv64
556 +#else
557 +#define SELECT __select
558 +#endif
559  
560 +#if defined __ASSUME_TIMEVAL64
561 +PSEUDO(SELECT, select, 5)
562 +       ret
563 +PSEUDO_END(SELECT)
564 +#else
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.
568 @@ -30,14 +44,6 @@
569     functions which have RT equivalents.  */
570  .comm __libc_missing_axp_tv64, 4
571  
572 -.text
573 -
574 -#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
575 -#define SELECT __select_tv64
576 -#else
577 -#define SELECT __select
578 -#endif
579 -
580  LEAF(SELECT, 64)
581         ldgp    gp, 0(pv)
582         subq    sp, 64, sp
583 @@ -210,6 +216,7 @@ $error:
584         SYSCALL_ERROR_HANDLER
585  
586  END(SELECT)
587 +#endif /* __ASSUME_TIMEVAL64 */
588  
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
598 @@ -1,4 +1,4 @@
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.
602  
603     The GNU C Library is free software; you can redistribute it and/or
604 @@ -19,7 +19,21 @@
605  #include <sysdep.h>
606  #define _ERRNO_H        1
607  #include <bits/errno.h>
608 +#include "kernel-features.h"
609  
610 +.text
611 +
612 +#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
613 +#define SETITIMER      __setitimer_tv64
614 +#else
615 +#define SETITIMER      __setitimer
616 +#endif
617 +
618 +#if defined __ASSUME_TIMEVAL64
619 +PSEUDO(SETITIMER, setitimer, 3)
620 +       ret
621 +PSEUDO_END(SETITIMER)
622 +#else
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.
626 @@ -30,14 +44,6 @@
627     functions which have RT equivalents.  */
628  .comm __libc_missing_axp_tv64, 4
629  
630 -.text
631 -
632 -#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
633 -#define SETITIMER      __setitimer_tv64
634 -#else
635 -#define SETITIMER      __setitimer
636 -#endif
637 -
638  LEAF(SETITIMER, 48)
639         ldgp    gp, 0(pv)
640         subq    sp, 48, sp
641 @@ -116,6 +122,7 @@ $error:
642         SYSCALL_ERROR_HANDLER
643  
644  END(SETITIMER)
645 +#endif /* __ASSUME_TIMEVAL64 */
646  
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
656 @@ -1,4 +1,4 @@
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.
660  
661     The GNU C Library is free software; you can redistribute it and/or
662 @@ -19,7 +19,21 @@
663  #include <sysdep.h>
664  #define _ERRNO_H        1
665  #include <bits/errno.h>
666 +#include "kernel-features.h"
667  
668 +.text
669 +
670 +#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
671 +#define SETTIMEOFDAY   __settimeofday_tv64
672 +#else
673 +#define SETTIMEOFDAY   __settimeofday
674 +#endif
675 +
676 +#if defined __ASSUME_TIMEVAL64
677 +PSEUDO(SETTIMEOFDAY, settimeofday, 2)
678 +       ret
679 +PSEUDO_END(SETTIMEOFDAY)
680 +#else
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.
684 @@ -30,14 +44,6 @@
685     functions which have RT equivalents.  */
686  .comm __libc_missing_axp_tv64, 4
687  
688 -.text
689 -
690 -#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
691 -#define SETTIMEOFDAY   __settimeofday_tv64
692 -#else
693 -#define SETTIMEOFDAY   __settimeofday
694 -#endif
695 -
696  LEAF(SETTIMEOFDAY, 16)
697         ldgp    gp, 0(pv)
698         subq    sp, 16, sp
699 @@ -97,6 +103,7 @@ $error:
700         SYSCALL_ERROR_HANDLER
701  
702  END(SETTIMEOFDAY)
703 +#endif /* __ASSUME_TIMEVAL64 */
704  
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
713 @@ -0,0 +1,33 @@
714 +/* Copyright (C) 2003 Free Software Foundation, Inc.
715 +   This file is part of the GNU C Library.
716 +
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.
721 +
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.
726 +
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
730 +   02111-1307 USA.  */
731 +
732 +#include <sysdep.h>
733 +
734 +/*
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.
738 + */
739 +
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))
745 +
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
754 @@ -1,4 +1,4 @@
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).
759  
760 @@ -17,14 +17,13 @@
761     Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
762     02111-1307 USA.  */
763  
764 +#include <errno.h>
765  #include <sysdep.h>
766  #include <signal.h>
767  
768  /* When there is kernel support for more than 64 signals, we'll have to
769     switch to a new system call convention here.  */
770  
771 -extern unsigned long __osf_sigprocmask (int how, unsigned long newmask);
772 -
773  int
774  __sigprocmask (int how, const sigset_t *set, sigset_t *oset)
775  {
776 @@ -32,15 +31,14 @@ __sigprocmask (int how, const sigset_t *
777    long result;
778  
779    if (set)
780 -    {
781 -      setval = set->__val[0];
782 -    }
783 +    setval = set->__val[0];
784    else
785      {
786        setval = 0;
787        how = SIG_BLOCK; /* ensure blocked mask doesn't get changed */
788      }
789 -  result = __osf_sigprocmask (how, setval);
790 +
791 +  result = INLINE_SYSCALL (osf_sigprocmask, 2, how, setval);
792    if (result == -1)
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
805  
806 -osf_sigprocmask        -       osf_sigprocmask 2       __osf_sigprocmask
807  sigstack       -       sigstack        2       sigstack
808  vfork          -       vfork           0       __vfork         vfork
809  
810 @@ -34,10 +33,6 @@ truncate     -       truncate        2       truncate        truncate6
811  readahead      -       readahead       3       __readahead     readahead
812  sendfile       -       sendfile        i:iipi  sendfile        sendfile64
813  
814 -# these are actually common with the x86:
815 -sys_ustat      ustat   ustat           2       __syscall_ustat
816 -sys_mknod      xmknod  mknod           3       __syscall_mknod
817 -
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
824  
825 -# Wrapper for adjtimex.
826 -adjtimex       -       syscall_adjtimex 1      __syscall_adjtimex syscall_adjtimex
827 -
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
836 -
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
846 @@ -67,15 +67,18 @@
847  
848  /*
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.
855   */
856  
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...)                              \
863 +({                                                                     \
864 +       extern char ChEcK[__NR_##name == __NR_rt_sigaction ? -1 : 1]    \
865 +         __attribute__((unused));                                      \
866 +       INLINE_SYSCALL1(name, nr, args);                                \
867 +})
868  
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
878 @@ -1,4 +1,4 @@
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.
883  
884 @@ -17,11 +17,10 @@
885     Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
886     02111-1307 USA.  */
887  
888 +#include <errno.h>
889  #include <sys/ustat.h>
890  #include <sys/sysmacros.h>
891 -
892 -
893 -extern int __syscall_ustat (unsigned int dev, struct ustat *ubuf);
894 +#include <sysdep.h>
895  
896  int
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);
901  
902 -  return __syscall_ustat (k_dev, ubuf);
903 +  return INLINE_SYSCALL (ustat, 2, k_dev, ubuf);
904  }
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
912 @@ -1,4 +1,4 @@
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.
916  
917     The GNU C Library is free software; you can redistribute it and/or
918 @@ -19,7 +19,21 @@
919  #include <sysdep.h>
920  #define _ERRNO_H        1
921  #include <bits/errno.h>
922 +#include "kernel-features.h"
923  
924 +.text
925 +
926 +#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
927 +#define UTIMES __utimes_tv64
928 +#else
929 +#define UTIMES __utimes
930 +#endif
931 +
932 +#if defined __ASSUME_TIMEVAL64
933 +PSEUDO(UTIMES, utimes, 2)
934 +       ret
935 +PSEUDO_END(UTIMES)
936 +#else
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.
940 @@ -30,14 +44,6 @@
941     functions which have RT equivalents.  */
942  .comm __libc_missing_axp_tv64, 4
943  
944 -.text
945 -
946 -#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
947 -#define UTIMES __utimes_tv64
948 -#else
949 -#define UTIMES __utimes
950 -#endif
951 -
952  LEAF(UTIMES, 16)
953         ldgp    gp, 0(pv)
954         subq    sp, 16, sp
955 @@ -102,6 +108,7 @@ $error:
956         SYSCALL_ERROR_HANDLER
957  
958  END(UTIMES)
959 +#endif /* __ASSUME_TIMEVAL64 */
960  
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
970 @@ -1,4 +1,4 @@
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.
974  
975     The GNU C Library is free software; you can redistribute it and/or
976 @@ -19,7 +19,21 @@
977  #include <sysdep.h>
978  #define _ERRNO_H        1
979  #include <bits/errno.h>
980 +#include "kernel-features.h"
981  
982 +.text
983 +
984 +#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
985 +#define WAIT4  __wait4_tv64
986 +#else
987 +#define WAIT4  __wait4
988 +#endif
989 +
990 +#if defined __ASSUME_TIMEVAL64
991 +PSEUDO(WAIT4, wait4, 4)
992 +       ret
993 +PSEUDO_END(WAIT4)
994 +#else
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.
998 @@ -30,14 +44,6 @@
999     functions which have RT equivalents.  */
1000  .comm __libc_missing_axp_tv64, 4
1001  
1002 -.text
1003 -
1004 -#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
1005 -#define WAIT4  __wait4_tv64
1006 -#else
1007 -#define WAIT4  __wait4
1008 -#endif
1009 -
1010  LEAF(WAIT4, 32)
1011         ldgp    gp, 0(pv)
1012         subq    sp, 32, sp
1013 @@ -135,6 +141,7 @@ $error:
1014         SYSCALL_ERROR_HANDLER
1015  
1016  END(WAIT4)
1017 +#endif /* __ASSUME_TIMEVAL64 */
1018  
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
1028 @@ -1,5 +1,6 @@
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.
1034  
1035     The GNU C Library is free software; you can redistribute it and/or
1036 @@ -21,8 +22,7 @@
1037  #include <sys/types.h>
1038  #include <sys/stat.h>
1039  #include <sys/sysmacros.h>
1040 -
1041 -extern int __syscall_mknod (const char *, unsigned int, unsigned int);
1042 +#include <sysdep.h>
1043  
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);
1049  
1050 -  return __syscall_mknod (path, mode, k_dev);
1051 +  return INLINE_SYSCALL (mknod, 3, path, mode, k_dev);
1052  }
1053  
1054  weak_alias (__xmknod, _xmknod)
This page took 0.163793 seconds and 3 git commands to generate.