OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [glibc/] [hacks.diff] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1534 robertmh
diff -Nur glibc-2.3.1.old/elf/dynamic-link.h glibc-2.3.1/elf/dynamic-link.h
2
--- glibc-2.3.1.old/elf/dynamic-link.h  2002-09-27 04:46:27.000000000 +0200
3
+++ glibc-2.3.1/elf/dynamic-link.h      2005-06-27 23:24:47.000000000 +0200
4
@@ -266,12 +266,7 @@
5
 
6
 /* This can't just be an inline function because GCC is too dumb
7
    to inline functions containing inlines themselves.  */
8
-# define ELF_DYNAMIC_RELOCATE(map, lazy, consider_profile) \
9
-  do {                                                                       \
10
-    int edr_lazy = elf_machine_runtime_setup ((map), (lazy),                 \
11
-                                             (consider_profile));            \
12
-    ELF_DYNAMIC_DO_REL ((map), edr_lazy);                                    \
13
-    ELF_DYNAMIC_DO_RELA ((map), edr_lazy);                                   \
14
-  } while (0)
15
+# define ELF_DYNAMIC_RELOCATE(map, lazy, consider_profile) 0
16
+/* FIXME */
17
 
18
 #endif
19
diff -Nur glibc-2.3.1.old/libio/iofflush.c glibc-2.3.1/libio/iofflush.c
20
--- glibc-2.3.1.old/libio/iofflush.c    2002-02-25 06:21:51.000000000 +0100
21
+++ glibc-2.3.1/libio/iofflush.c        2005-06-23 17:56:40.000000000 +0200
22
@@ -53,5 +53,6 @@
23
 
24
 #ifndef _IO_MTSAFE_IO
25
 weak_alias (_IO_fflush, fflush_unlocked)
26
+libc_hidden_weak (fflush_unlocked)
27
 #endif
28
 #endif
29
diff -Nur glibc-2.3.1.old/libio/iofwrite.c glibc-2.3.1/libio/iofwrite.c
30
--- glibc-2.3.1.old/libio/iofwrite.c    2002-08-10 20:08:29.000000000 +0200
31
+++ glibc-2.3.1/libio/iofwrite.c        2005-06-23 17:56:41.000000000 +0200
32
@@ -58,5 +58,6 @@
33
 libc_hidden_weak (fwrite)
34
 # ifndef _IO_MTSAFE_IO
35
 weak_alias (_IO_fwrite, fwrite_unlocked)
36
+libc_hidden_weak (fwrite_unlocked)
37
 # endif
38
 #endif
39
diff -Nur glibc-2.3.1.old/socket/sys/socket.h glibc-2.3.1/socket/sys/socket.h
40
--- glibc-2.3.1.old/socket/sys/socket.h 2001-07-07 21:21:17.000000000 +0200
41
+++ glibc-2.3.1/socket/sys/socket.h     2005-07-04 00:13:42.000000000 +0200
42
@@ -62,7 +62,9 @@
43
    uses with any of the listed types to be allowed without complaint.
44
    G++ 2.7 does not support transparent unions so there we want the
45
    old-style declaration, too.  */
46
-#if defined __cplusplus || !__GNUC_PREREQ (2, 7) || !defined __USE_GNU
47
+#if 1
48
+/* FIXME: the new-style declarations conflict with our implementation of
49
+   INLINE_SYSCALL */
50
 # define __SOCKADDR_ARG                struct sockaddr *__restrict
51
 # define __CONST_SOCKADDR_ARG  __const struct sockaddr *
52
 #else
53
diff -Nur glibc-2.3.1.old/stdio-common/sscanf.c glibc-2.3.1/stdio-common/sscanf.c
54
--- glibc-2.3.1.old/stdio-common/sscanf.c       2002-08-10 20:09:08.000000000 +0200
55
+++ glibc-2.3.1/stdio-common/sscanf.c   2005-06-23 18:38:10.000000000 +0200
56
@@ -27,9 +27,7 @@
57
 /* Read formatted input from S, according to the format string FORMAT.  */
58
 /* VARARGS2 */
59
 int
60
-sscanf (s, format)
61
-     const char *s;
62
-     const char *format;
63
+sscanf (const char *s, const char *format, ...)
64
 {
65
   va_list arg;
66
   int done;
67
diff -Nur glibc-2.3.1.old/sysdeps/generic/check_fds.c glibc-2.3.1/sysdeps/generic/check_fds.c
68
--- glibc-2.3.1.old/sysdeps/generic/check_fds.c 2002-04-14 20:27:21.000000000 +0200
69
+++ glibc-2.3.1/sysdeps/generic/check_fds.c     2005-06-27 22:43:55.000000000 +0200
70
@@ -47,7 +47,8 @@
71
       /* Something is wrong with this descriptor, it's probably not
72
         opened.  Open /dev/null so that the SUID program we are
73
         about to start does not accidently use this descriptor.  */
74
-      int nullfd = __libc_open (_PATH_DEVNULL, mode);
75
+      /* FIXME: what's the prob with __libc_open ?!? */
76
+      int nullfd = open (_PATH_DEVNULL, mode);
77
       /* We are very paranoid here.  With all means we try to ensure
78
         that we are actually opening the /dev/null device and nothing
79
         else.
80
diff -Nur glibc-2.3.1.old/sysdeps/generic/clone.c glibc-2.3.1/sysdeps/generic/clone.c
81
--- glibc-2.3.1.old/sysdeps/generic/clone.c     1970-01-01 01:00:00.000000000 +0100
82
+++ glibc-2.3.1/sysdeps/generic/clone.c 2005-06-24 01:16:47.000000000 +0200
83
@@ -0,0 +1,32 @@
84
+/* Copyright (C) 1991, 1995, 1996, 1997 Free Software Foundation, Inc.
85
+   This file is part of the GNU C Library.
86
+
87
+   The GNU C Library is free software; you can redistribute it and/or
88
+   modify it under the terms of the GNU Lesser General Public
89
+   License as published by the Free Software Foundation; either
90
+   version 2.1 of the License, or (at your option) any later version.
91
+
92
+   The GNU C Library is distributed in the hope that it will be useful,
93
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
94
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
95
+   Lesser General Public License for more details.
96
+
97
+   You should have received a copy of the GNU Lesser General Public
98
+   License along with the GNU C Library; if not, write to the Free
99
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
100
+   02111-1307 USA.  */
101
+
102
+#include <errno.h>
103
+#include <unistd.h>
104
+
105
+
106
+int
107
+__clone ()
108
+{
109
+  __set_errno (ENOSYS);
110
+  return -1;
111
+}
112
+stub_warning (clone)
113
+
114
+weak_alias (__clone, clone)
115
+#include <stub-tag.h>
116
diff -Nur glibc-2.3.1.old/sysdeps/generic/dl-cache.c glibc-2.3.1/sysdeps/generic/dl-cache.c
117
--- glibc-2.3.1.old/sysdeps/generic/dl-cache.c  2002-02-06 18:23:41.000000000 +0100
118
+++ glibc-2.3.1/sysdeps/generic/dl-cache.c      2005-06-27 23:17:12.000000000 +0200
119
@@ -208,7 +208,7 @@
120
       unsigned long int *hwcap;
121
       uint64_t platform;
122
 #ifndef SHARED
123
-      weak_extern (_dl_hwcap);
124
+/* FIXME */
125
 #endif
126
 
127
       /* This is where the strings start.  */
128
@@ -217,7 +217,7 @@
129
       /* Now we can compute how large the string table is.  */
130
       cache_data_size = (const char *) cache + cachesize - cache_data;
131
 
132
-      hwcap = &GL(dl_hwcap);
133
+      hwcap = NULL;  /* FIXME */
134
       platform = _dl_string_platform (GL(dl_platform));
135
       if (platform != -1)
136
        platform = 1ULL << platform;
137
diff -Nur glibc-2.3.1.old/sysdeps/generic/initfini.c glibc-2.3.1/sysdeps/generic/initfini.c
138
--- glibc-2.3.1.old/sysdeps/generic/initfini.c  2001-09-25 03:13:41.000000000 +0200
139
+++ glibc-2.3.1/sysdeps/generic/initfini.c      2005-06-26 04:07:08.000000000 +0200
140
@@ -65,11 +65,13 @@
141
 static void
142
 call_gmon_start(void)
143
 {
144
+#ifdef PROF
145
   extern void __gmon_start__ (void) __attribute__ ((weak)); /*weak_extern (__gmon_start__);*/
146
   void (*gmon_start) (void) = __gmon_start__;
147
 
148
   if (gmon_start)
149
     gmon_start ();
150
+#endif
151
 }
152
 
153
 SECTION (".init");
154
diff -Nur glibc-2.3.1.old/sysdeps/generic/libc-start.c glibc-2.3.1/sysdeps/generic/libc-start.c
155
--- glibc-2.3.1.old/sysdeps/generic/libc-start.c        2002-09-15 20:53:15.000000000 +0200
156
+++ glibc-2.3.1/sysdeps/generic/libc-start.c    2005-07-03 15:42:09.000000000 +0200
157
@@ -94,10 +95,12 @@
158
      we need to setup errno.  If there is no thread library and we
159
      handle TLS the function is defined in the libc to initialized the
160
      TLS handling.  */
161
+#ifdef USE_TLS
162
 # if !(USE_TLS - 0)
163
   if (__pthread_initialize_minimal)
164
 # endif
165
     __pthread_initialize_minimal ();
166
+#endif
167
 
168
   /* Some security at this point.  Prevent starting a SUID binary where
169
      the standard file descriptors are not opened.  We have to do this
170
diff -Nur glibc-2.3.1.old/sysdeps/generic/mount.c glibc-2.3.1/sysdeps/generic/mount.c
171
--- glibc-2.3.1.old/sysdeps/generic/mount.c     1970-01-01 01:00:00.000000000 +0100
172
+++ glibc-2.3.1/sysdeps/generic/mount.c 2005-06-25 16:17:13.000000000 +0200
173
@@ -0,0 +1,33 @@
174
+/* Copyright (C) 2005 Free Software Foundation, Inc.
175
+   This file is part of the GNU C Library.
176
+
177
+   The GNU C Library is free software; you can redistribute it and/or
178
+   modify it under the terms of the GNU Lesser General Public
179
+   License as published by the Free Software Foundation; either
180
+   version 2.1 of the License, or (at your option) any later version.
181
+
182
+   The GNU C Library is distributed in the hope that it will be useful,
183
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
184
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
185
+   Lesser General Public License for more details.
186
+
187
+   You should have received a copy of the GNU Lesser General Public
188
+   License along with the GNU C Library; if not, write to the Free
189
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
190
+   02111-1307 USA.  */
191
+
192
+#include <errno.h>
193
+#include <unistd.h>
194
+
195
+int
196
+__mount (const char *__special_file, const char *__dir,
197
+        const char *__fstype, unsigned long int __rwflag,
198
+        const void *__data)
199
+{
200
+  __set_errno (ENOSYS);
201
+  return -1;
202
+}
203
+weak_alias (__mount, mount);
204
+
205
+stub_warning (mount)
206
+#include <stub-tag.h>
207
diff -Nur glibc-2.3.1.old/sysdeps/generic/swapon.c glibc-2.3.1/sysdeps/generic/swapon.c
208
--- glibc-2.3.1.old/sysdeps/generic/swapon.c    2001-07-07 21:21:22.000000000 +0200
209
+++ glibc-2.3.1/sysdeps/generic/swapon.c        2005-06-24 01:13:30.000000000 +0200
210
@@ -23,8 +23,7 @@
211
 /* Make the block special device PATH available to the system for swapping.
212
    This call is restricted to the super-user.  */
213
 int
214
-swapon (path)
215
-     const char *path;
216
+swapon (const char *path, int flags)
217
 {
218
   __set_errno (ENOSYS);
219
   return -1;
220
diff -Nur glibc-2.3.1.old/sysdeps/generic/umount.c glibc-2.3.1/sysdeps/generic/umount.c
221
--- glibc-2.3.1.old/sysdeps/generic/umount.c    1970-01-01 01:00:00.000000000 +0100
222
+++ glibc-2.3.1/sysdeps/generic/umount.c        2005-06-25 16:17:08.000000000 +0200
223
@@ -0,0 +1,31 @@
224
+/* Copyright (C) 2005 Free Software Foundation, Inc.
225
+   This file is part of the GNU C Library.
226
+
227
+   The GNU C Library is free software; you can redistribute it and/or
228
+   modify it under the terms of the GNU Lesser General Public
229
+   License as published by the Free Software Foundation; either
230
+   version 2.1 of the License, or (at your option) any later version.
231
+
232
+   The GNU C Library is distributed in the hope that it will be useful,
233
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
234
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
235
+   Lesser General Public License for more details.
236
+
237
+   You should have received a copy of the GNU Lesser General Public
238
+   License along with the GNU C Library; if not, write to the Free
239
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
240
+   02111-1307 USA.  */
241
+
242
+#include <errno.h>
243
+#include <unistd.h>
244
+
245
+int
246
+__umount (const char *name)
247
+{
248
+  __set_errno (ENOSYS);
249
+  return -1;
250
+}
251
+weak_alias (__umount, umount);
252
+
253
+stub_warning (umount)
254
+#include <stub-tag.h>
255
diff -Nur glibc-2.3.1.old/sysdeps/generic/umount2.c glibc-2.3.1/sysdeps/generic/umount2.c
256
--- glibc-2.3.1.old/sysdeps/generic/umount2.c   1970-01-01 01:00:00.000000000 +0100
257
+++ glibc-2.3.1/sysdeps/generic/umount2.c       2005-06-25 16:19:06.000000000 +0200
258
@@ -0,0 +1,31 @@
259
+/* Copyright (C) 2005 Free Software Foundation, Inc.
260
+   This file is part of the GNU C Library.
261
+
262
+   The GNU C Library is free software; you can redistribute it and/or
263
+   modify it under the terms of the GNU Lesser General Public
264
+   License as published by the Free Software Foundation; either
265
+   version 2.1 of the License, or (at your option) any later version.
266
+
267
+   The GNU C Library is distributed in the hope that it will be useful,
268
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
269
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
270
+   Lesser General Public License for more details.
271
+
272
+   You should have received a copy of the GNU Lesser General Public
273
+   License along with the GNU C Library; if not, write to the Free
274
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
275
+   02111-1307 USA.  */
276
+
277
+#include <errno.h>
278
+#include <unistd.h>
279
+
280
+int
281
+__umount2 (const char *name, int flags)
282
+{
283
+  __set_errno (ENOSYS);
284
+  return -1;
285
+}
286
+weak_alias (__umount2, umount2);
287
+
288
+stub_warning (umount2)
289
+#include <stub-tag.h>
290
diff -Nur glibc-2.3.1.old/sysdeps/posix/open64.c glibc-2.3.1/sysdeps/posix/open64.c
291
--- glibc-2.3.1.old/sysdeps/posix/open64.c      2002-08-02 23:46:59.000000000 +0200
292
+++ glibc-2.3.1/sysdeps/posix/open64.c  2005-06-27 22:44:53.000000000 +0200
293
@@ -35,7 +35,8 @@
294
       va_end (arg);
295
     }
296
 
297
-  return __libc_open (file, oflag | O_LARGEFILE, mode);
298
+  /* FIXME: what's the prob with __libc_open ?!? */
299
+  return open (file, oflag | O_LARGEFILE, mode);
300
 }
301
 weak_alias (__libc_open64, BP_SYM (__open64))
302
 libc_hidden_weak (BP_SYM (__open64))
303
diff -Nur glibc-2.3.1.old/sysdeps/unix/fork.S glibc-2.3.1/sysdeps/unix/fork.S
304
--- glibc-2.3.1.old/sysdeps/unix/fork.S 2002-08-26 23:16:13.000000000 +0200
305
+++ glibc-2.3.1/sysdeps/unix/fork.S     1970-01-01 01:00:00.000000000 +0100
306
@@ -1,33 +0,0 @@
307
-/* Copyright (C) 1991,92,94,95,97,2002 Free Software Foundation, Inc.
308
-   This file is part of the GNU C Library.
309
-
310
-   The GNU C Library is free software; you can redistribute it and/or
311
-   modify it under the terms of the GNU Lesser General Public
312
-   License as published by the Free Software Foundation; either
313
-   version 2.1 of the License, or (at your option) any later version.
314
-
315
-   The GNU C Library is distributed in the hope that it will be useful,
316
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
317
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
318
-   Lesser General Public License for more details.
319
-
320
-   You should have received a copy of the GNU Lesser General Public
321
-   License along with the GNU C Library; if not, write to the Free
322
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
323
-   02111-1307 USA.  */
324
-
325
-#include <sysdep.h>
326
-
327
-/* This code works for at least m68k.  */
328
-
329
-SYSCALL__ (fork, 0)
330
-       /* R1 is now 0 for the parent and 1 for the child.  Decrement it to
331
-          make it -1 (all bits set) for the parent, and 0 (no bits set)
332
-          for the child.  Then AND it with R0, so the parent gets
333
-          R0&-1==R0, and the child gets R0&0==0.  */
334
-       subl #1, r1
335
-       andl r1, r0
336
-       ret
337
-PSEUDO_END (__fork)
338
-
339
-weak_alias (__fork, fork)
340
diff -Nur glibc-2.3.1.old/sysdeps/unix/getegid.S glibc-2.3.1/sysdeps/unix/getegid.S
341
--- glibc-2.3.1.old/sysdeps/unix/getegid.S      2001-07-07 21:21:29.000000000 +0200
342
+++ glibc-2.3.1/sysdeps/unix/getegid.S  1970-01-01 01:00:00.000000000 +0100
343
@@ -1,30 +0,0 @@
344
-/* Copyright (C) 1991, 1992, 1995, 1997 Free Software Foundation, Inc.
345
-   This file is part of the GNU C Library.
346
-
347
-   The GNU C Library is free software; you can redistribute it and/or
348
-   modify it under the terms of the GNU Lesser General Public
349
-   License as published by the Free Software Foundation; either
350
-   version 2.1 of the License, or (at your option) any later version.
351
-
352
-   The GNU C Library is distributed in the hope that it will be useful,
353
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
354
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
355
-   Lesser General Public License for more details.
356
-
357
-   You should have received a copy of the GNU Lesser General Public
358
-   License along with the GNU C Library; if not, write to the Free
359
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
360
-   02111-1307 USA.  */
361
-
362
-#include <sysdep.h>
363
-
364
-#ifdef SYS_getegid
365
-SYSCALL__ (getegid, 0)
366
-#else
367
-PSEUDO (__getegid, getgid, 0)
368
-       MOVE(r1, r0)
369
-#endif
370
-       ret
371
-PSEUDO_END(__getegid)
372
-
373
-weak_alias (__getegid, getegid)
374
diff -Nur glibc-2.3.1.old/sysdeps/unix/geteuid.S glibc-2.3.1/sysdeps/unix/geteuid.S
375
--- glibc-2.3.1.old/sysdeps/unix/geteuid.S      2001-07-07 21:21:29.000000000 +0200
376
+++ glibc-2.3.1/sysdeps/unix/geteuid.S  1970-01-01 01:00:00.000000000 +0100
377
@@ -1,30 +0,0 @@
378
-/* Copyright (C) 1991, 1992, 1995, 1997 Free Software Foundation, Inc.
379
-   This file is part of the GNU C Library.
380
-
381
-   The GNU C Library is free software; you can redistribute it and/or
382
-   modify it under the terms of the GNU Lesser General Public
383
-   License as published by the Free Software Foundation; either
384
-   version 2.1 of the License, or (at your option) any later version.
385
-
386
-   The GNU C Library is distributed in the hope that it will be useful,
387
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
388
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
389
-   Lesser General Public License for more details.
390
-
391
-   You should have received a copy of the GNU Lesser General Public
392
-   License along with the GNU C Library; if not, write to the Free
393
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
394
-   02111-1307 USA.  */
395
-
396
-#include <sysdep.h>
397
-
398
-#ifdef SYS_geteuid
399
-SYSCALL__ (geteuid, 0)
400
-#else
401
-PSEUDO (__geteuid, getuid, 0)
402
-       MOVE(r1, r0)
403
-#endif
404
-       ret
405
-PSEUDO_END(__geteuid)
406
-
407
-weak_alias (__geteuid, geteuid)
408
diff -Nur glibc-2.3.1.old/sysdeps/unix/getppid.S glibc-2.3.1/sysdeps/unix/getppid.S
409
--- glibc-2.3.1.old/sysdeps/unix/getppid.S      2001-07-07 21:21:29.000000000 +0200
410
+++ glibc-2.3.1/sysdeps/unix/getppid.S  1970-01-01 01:00:00.000000000 +0100
411
@@ -1,30 +0,0 @@
412
-/* Copyright (C) 1991, 1992, 1995, 1997 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
-   modify it under the terms of the GNU Lesser General Public
417
-   License as published by the Free Software Foundation; either
418
-   version 2.1 of the License, or (at your option) any later version.
419
-
420
-   The GNU C Library is distributed in the hope that it will be useful,
421
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
422
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
423
-   Lesser General Public License for more details.
424
-
425
-   You should have received a copy of the GNU Lesser General Public
426
-   License along with the GNU C Library; if not, write to the Free
427
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
428
-   02111-1307 USA.  */
429
-
430
-#include <sysdep.h>
431
-
432
-#ifdef SYS_getppid
433
-SYSCALL__ (getppid, 0)
434
-#else
435
-PSEUDO (__getppid, getpid, 0)
436
-       MOVE(r1, r0)
437
-#endif
438
-       ret
439
-PSEUDO_END(__getppid)
440
-
441
-weak_alias (__getppid, getppid)
442
diff -Nur glibc-2.3.1.old/sysdeps/unix/syscall.S glibc-2.3.1/sysdeps/unix/syscall.S
443
--- glibc-2.3.1.old/sysdeps/unix/syscall.S      2001-07-07 21:21:29.000000000 +0200
444
+++ glibc-2.3.1/sysdeps/unix/syscall.S  1970-01-01 01:00:00.000000000 +0100
445
@@ -1,30 +0,0 @@
446
-/* Copyright (C) 1993, 1997 Free Software Foundation, Inc.
447
-   This file is part of the GNU C Library.
448
-
449
-   The GNU C Library is free software; you can redistribute it and/or
450
-   modify it under the terms of the GNU Lesser General Public
451
-   License as published by the Free Software Foundation; either
452
-   version 2.1 of the License, or (at your option) any later version.
453
-
454
-   The GNU C Library is distributed in the hope that it will be useful,
455
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
456
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
457
-   Lesser General Public License for more details.
458
-
459
-   You should have received a copy of the GNU Lesser General Public
460
-   License along with the GNU C Library; if not, write to the Free
461
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
462
-   02111-1307 USA.  */
463
-
464
-#include <sysdep.h>
465
-
466
-#ifndef SYS_syscall
467
-#define SYS_syscall    0
468
-#endif
469
-
470
-/* This works if the kernel does an "indirect system call" for system call 0,
471
-   taking the first argument word off the stack as the system call number.  */
472
-
473
-SYSCALL (syscall, 1)
474
-       ret
475
-PSEUDO_END(syscall)
476
diff -Nur glibc-2.3.1.old/sysdeps/unix/sysv/linux/bits/errno.h glibc-2.3.1/sysdeps/unix/sysv/linux/bits/errno.h
477
--- glibc-2.3.1.old/sysdeps/unix/sysv/linux/bits/errno.h        2002-08-29 01:39:22.000000000 +0200
478
+++ glibc-2.3.1/sysdeps/unix/sysv/linux/bits/errno.h    2005-06-23 18:15:12.000000000 +0200
479
@@ -40,6 +40,9 @@
480
 #  if !defined _LIBC || defined _LIBC_REENTRANT
481
 /* When using threads, errno is a per-thread value.  */
482
 #   define errno (*__errno_location ())
483
+#  else
484
+#   define errno errno
485
+    extern int errno;
486
 #  endif
487
 # endif /* !__ASSEMBLER__ */
488
 #endif /* _ERRNO_H */
489
diff -Nur glibc-2.3.1.old/sysdeps/unix/sysv/linux/setegid.c glibc-2.3.1/sysdeps/unix/sysv/linux/setegid.c
490
--- glibc-2.3.1.old/sysdeps/unix/sysv/linux/setegid.c   2002-08-13 16:29:42.000000000 +0200
491
+++ glibc-2.3.1/sysdeps/unix/sysv/linux/setegid.c       2005-07-03 23:32:24.000000000 +0200
492
@@ -20,10 +20,12 @@
493
 #include <sys/syscall.h>
494
 #include <sys/types.h>
495
 #include <unistd.h>
496
+#include <sysdep.h>
497
 
498
 #ifdef __NR_setresgid
499
 
500
-extern int __setresgid (gid_t rgid, gid_t egid, gid_t sgid);
501
+//extern int __setresgid (gid_t rgid, gid_t egid, gid_t sgid);
502
+#define __setresgid(a,b,c) INLINE_SYSCALL(setresgid,3,a,b,c)
503
 
504
 int
505
 setegid (gid_t gid)
506
diff -Nur glibc-2.3.1.old/sysdeps/unix/sysv/linux/seteuid.c glibc-2.3.1/sysdeps/unix/sysv/linux/seteuid.c
507
--- glibc-2.3.1.old/sysdeps/unix/sysv/linux/seteuid.c   2002-08-13 16:29:42.000000000 +0200
508
+++ glibc-2.3.1/sysdeps/unix/sysv/linux/seteuid.c       2005-06-27 23:29:21.000000000 +0200
509
@@ -20,12 +20,14 @@
510
 #include <sys/syscall.h>
511
 #include <sys/types.h>
512
 #include <unistd.h>
513
+#include <sysdep.h>
514
 
515
 #include "kernel-features.h"
516
 
517
 #if defined __NR_setresuid || __ASSUME_SETRESUID_SYSCALL > 0
518
 
519
-extern int __setresuid (uid_t ruid, uid_t euid, uid_t suid);
520
+// extern int __setresuid (uid_t ruid, uid_t euid, uid_t suid);
521
+#define __setresuid(a,b,c) INLINE_SYSCALL(setresuid,3,a,b,c)
522
 
523
 int
524
 seteuid (uid_t uid)
525
diff -Nur glibc-2.3.1.old/sysdeps/unix/sysv/linux/umount.S glibc-2.3.1/sysdeps/unix/sysv/linux/umount.S
526
--- glibc-2.3.1.old/sysdeps/unix/sysv/linux/umount.S    1998-08-20 21:15:40.000000000 +0200
527
+++ glibc-2.3.1/sysdeps/unix/sysv/linux/umount.S        1970-01-01 01:00:00.000000000 +0100
528
@@ -1,12 +0,0 @@
529
-/* This hack is necessary since the kernel people are making "strange"
530
-   changes.  They simply rename old system calls.  */
531
-
532
-#include <sysdep.h>
533
-#ifdef __NR_oldumount
534
-PSEUDO (__umount, oldumount, 1)
535
-#else
536
-PSEUDO (__umount, umount, 1)
537
-#endif
538
-       ret
539
-PSEUDO_END(__umount)
540
-weak_alias (__umount, umount)
541
diff -Nur glibc-2.3.1.old/sysdeps/unix/sysv/linux/umount2.S glibc-2.3.1/sysdeps/unix/sysv/linux/umount2.S
542
--- glibc-2.3.1.old/sysdeps/unix/sysv/linux/umount2.S   1998-08-20 21:15:49.000000000 +0200
543
+++ glibc-2.3.1/sysdeps/unix/sysv/linux/umount2.S       1970-01-01 01:00:00.000000000 +0100
544
@@ -1,13 +0,0 @@
545
-/* umount system call with two parameters.  */
546
-
547
-#include <sysdep.h>
548
-#if defined __NR_oldumount || defined __NR_umount2
549
-#ifdef __NR_oldumount
550
-PSEUDO (__umount2, umount, 2)
551
-#else
552
-PSEUDO (__umount2, umount2, 2)
553
-#endif
554
-       ret
555
-PSEUDO_END(__umount2)
556
-weak_alias (__umount2, umount2)
557
-#endif

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.