aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-11-30 14:21:53 +0000
committerUlrich Drepper <drepper@redhat.com>1998-11-30 14:21:53 +0000
commit348ed5157bb4b6ef0e38f18ab8fd8d9910544e6e (patch)
tree8292846db47f486376760bcbf5f3dc6ef9a260a9 /sysdeps
parent3f7b3d9b1f5fe48edeaa532355a7fb04a1836fa2 (diff)
downloadglibc-348ed5157bb4b6ef0e38f18ab8fd8d9910544e6e.zip
glibc-348ed5157bb4b6ef0e38f18ab8fd8d9910544e6e.tar.gz
glibc-348ed5157bb4b6ef0e38f18ab8fd8d9910544e6e.tar.bz2
Update.
1998-11-30 Andreas Jaeger <aj@arthur.rhein-neckar.de> * nscd/nscd_getpw_r.c: Include nscd_proto.h for prototypes. * sysdeps/generic/errno-loc.c: Include <errno.h> for prototype, undefine errno to get variable. * sysdeps/unix/sysv/linux/i386/setfsuid.c: Include <sys/fsuid.h> instead of <unistd.h> for prototype. * sysdeps/unix/sysv/linux/i386/setfsgid.c: Likewise. 1998-11-30 Ulrich Drepper <drepper@cygnus.com> * misc/err.h: Correct comments and use protected attribute keywords. Reported by Joseph Myers <jsm28@cam.ac.uk>. 1998-11-29 Roland McGrath <roland@baalperazim.frob.com> * malloc/thread-m.h [_LIBC]: Include <bits/libc-tsd.h>, and remove tsd stuff from pthreads/cthreads libc sections. Use __libc_tsd_define for MALLOC key. [_LIBC] (tsd_key_t, tsd_key_create): Define to a zero-size type and a no-op, respectively. [_LIBC] (tsd_setspecific, tsd_getspecific): Use __libc_tsd_get/set. * elf/dl-error.c: Include <bits/libc-tsd.h>. Use __libc_tsd_define for DL_ERROR key. (tsd_setspecific, tsd_getspecific): Rewritten using __libc_tsd_get/set. * sysdeps/mach/hurd/bits/libc-tsd.h: New file. * sysdeps/generic/bits/libc-tsd.h: New file. * Makefile (distribute): Add bits/libc-tsd.h. 1998-10-12 Roland McGrath <roland@baalperazim.frob.com> * elf/dl-error.c: Remove kludge to check for ld.so load address. There is no need if weak undefined symbols are not used in ld.so; see linuxthreads/ChangeLog for changes to files linuxthreads/sysdeps/pthread/bits/libc-lock.h and linuxthreads/sysdeps/pthread/bits/libc-tsd.h. 1998-11-30 Andreas Jaeger <aj@arthur.rhein-neckar.de> * sysdeps/i386/bits/string.h (__memset_cc): Fix typo (s->__s). * sysdeps/i386/i486/bits/string.h: Add prototypes for all new inline functions. * sysdeps/i386/bits/string.h: Likewise. 1998-11-30 Andreas Jaeger <aj@arthur.rhein-neckar.de> * sysdeps/unix/sysv/linux/alpha/bits/ipc.h: Remove ipc_kludge. 1998-11-30 Andreas Schwab <schwab@issan.cs.uni-dortmund.de> * db2/progs/db_load/db_load.c (main): Avoid -Wparentheses warning.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/generic/bits/libc-tsd.h51
-rw-r--r--sysdeps/generic/errno-loc.c5
-rw-r--r--sysdeps/i386/bits/string.h16
-rw-r--r--sysdeps/i386/i486/bits/string.h99
-rw-r--r--sysdeps/mach/hurd/bits/libc-tsd.h37
-rw-r--r--sysdeps/unix/sysv/linux/alpha/bits/ipc.h9
-rw-r--r--sysdeps/unix/sysv/linux/i386/setfsgid.c2
-rw-r--r--sysdeps/unix/sysv/linux/i386/setfsuid.c2
8 files changed, 207 insertions, 14 deletions
diff --git a/sysdeps/generic/bits/libc-tsd.h b/sysdeps/generic/bits/libc-tsd.h
new file mode 100644
index 0000000..6048d99
--- /dev/null
+++ b/sysdeps/generic/bits/libc-tsd.h
@@ -0,0 +1,51 @@
+/* libc-internal interface for thread-specific data. Stub version.
+ Copyright (C) 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _BITS_LIBC_TSD_H
+#define _BITS_LIBC_TSD_H 1
+
+/* This file defines the following macros for accessing a small fixed
+ set of thread-specific `void *' data used only internally by libc.
+
+ __libc_tsd_define(CLASS, KEY) -- Define or declare a `void *' datum
+ for KEY. CLASS can be `static' for
+ keys used in only one source file,
+ empty for global definitions, or
+ `extern' for global declarations.
+ __libc_tsd_get(KEY) -- Return the `void *' datum for KEY.
+ __libc_tsd_set(KEY, VALUE) -- Set the datum for KEY to VALUE.
+
+ The set of available KEY's will usually be provided as an enum,
+ and contains (at least):
+ _LIBC_TSD_KEY_MALLOC
+ _LIBC_TSD_KEY_DL_ERROR
+ All uses must be the literal _LIBC_TSD_* name in the __libc_tsd_* macros.
+ Some implementations may not provide any enum at all and instead
+ using string pasting in the macros. */
+
+/* This is the generic/stub implementation for wholly single-threaded
+ systems. We don't define an enum for the possible key values, because
+ the KEYs translate directly into variables by macro magic. */
+
+#define __libc_tsd_define(CLASS, KEY) CLASS void *__libc_tsd_##KEY##_data;
+#define __libc_tsd_get(KEY) (__libc_tsd_##KEY##_data)
+#define __libc_tsd_set(KEY, VALUE) (__libc_tsd_##KEY##_data = (VALUE))
+
+
+#endif /* bits/libc-tsd.h */
diff --git a/sysdeps/generic/errno-loc.c b/sysdeps/generic/errno-loc.c
index 46b9f17..43fea06 100644
--- a/sysdeps/generic/errno-loc.c
+++ b/sysdeps/generic/errno-loc.c
@@ -1,6 +1,6 @@
/* MT support function to get address of `errno' variable, non-threaded
version.
- Copyright (C) 1996 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,7 +18,8 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-extern int errno;
+#include <errno.h>
+#undef errno
int *
weak_const_function
diff --git a/sysdeps/i386/bits/string.h b/sysdeps/i386/bits/string.h
index 6885cbb..016f414 100644
--- a/sysdeps/i386/bits/string.h
+++ b/sysdeps/i386/bits/string.h
@@ -45,6 +45,9 @@
: memcpy (dest, src, n)))
/* This looks horribly ugly, but the compiler can optimize it totally,
as the count is constant. */
+__STRING_INLINE void *__memcpy_c (void *__dest, __const void *__src,
+ size_t __n);
+
__STRING_INLINE void *
__memcpy_c (void *__dest, __const void *__src, size_t __n)
{
@@ -170,6 +173,9 @@ memmove (void *__dest, __const void *__src, size_t __n)
: __memset_cg (s, 0x01010101UL * (unsigned char) (c), n))\
: __memset_gg (s, c, n)))
+__STRING_INLINE void *__memset_cc (void *__s, unsigned long int __pattern,
+ size_t __n);
+
__STRING_INLINE void *
__memset_cc (void *__s, unsigned long int __pattern, size_t __n)
{
@@ -211,7 +217,7 @@ __memset_cc (void *__s, unsigned long int __pattern, size_t __n)
return __s;
case 2:
__COMMON_CODE ("\n\tstosw");
- return s;
+ return __s;
case 3:
__COMMON_CODE ("\n\tstosw\n\tstosb");
return __s;
@@ -219,6 +225,8 @@ __memset_cc (void *__s, unsigned long int __pattern, size_t __n)
#undef __COMMON_CODE
}
+__STRING_INLINE void *__memset_cg (void *__s, unsigned long __c, size_t __n);
+
__STRING_INLINE void *
__memset_cg (void *__s, unsigned long __c, size_t __n)
{
@@ -240,6 +248,8 @@ __memset_cg (void *__s, unsigned long __c, size_t __n)
return __s;
}
+__STRING_INLINE void *__memset_gg (void *__s, char __c, size_t __n);
+
__STRING_INLINE void *
__memset_gg (void *__s, char __c, size_t __n)
{
@@ -455,6 +465,8 @@ strncmp (__const char *__s1, __const char *__s2, size_t __n)
? __strchr_c (s, ((c) & 0xff) << 8) \
: __strchr_g (s, c)))
+__STRING_INLINE char *__strchr_g (__const char *__s, int __c);
+
__STRING_INLINE char *
__strchr_g (__const char *__s, int __c)
{
@@ -478,6 +490,8 @@ __strchr_g (__const char *__s, int __c)
return __res - 1;
}
+__STRING_INLINE char *__strchr_c (__const char *__s, int __c);
+
__STRING_INLINE char *
__strchr_c (__const char *__s, int __c)
{
diff --git a/sysdeps/i386/i486/bits/string.h b/sysdeps/i386/i486/bits/string.h
index 9c4bb52..5fe2062 100644
--- a/sysdeps/i386/i486/bits/string.h
+++ b/sysdeps/i386/i486/bits/string.h
@@ -59,6 +59,9 @@
? __memcpy_by2 (dest, src, n) \
: __memcpy_g (dest, src, n))))
+__STRING_INLINE void *__memcpy_by4 (void *__dest, __const void *__src,
+ size_t __n);
+
__STRING_INLINE void *
__memcpy_by4 (void *__dest, __const void *__src, size_t __n)
{
@@ -78,6 +81,9 @@ __memcpy_by4 (void *__dest, __const void *__src, size_t __n)
return __dest;
}
+__STRING_INLINE void *__memcpy_by2 (void *__dest, __const void *__src,
+ size_t __n);
+
__STRING_INLINE void *
__memcpy_by2 (void *__dest, __const void *__src, size_t __n)
{
@@ -102,7 +108,10 @@ __memcpy_by2 (void *__dest, __const void *__src, size_t __n)
return __dest;
}
-__STRING_INLINE void *
+__STRING_INLINE void *__memcpy_g (void *__dest, __const void *__src,
+ size_t __n);
+
+ __STRING_INLINE void *
__memcpy_g (void *__dest, __const void *__src, size_t __n)
{
register unsigned long int __d0, __d1, __d2;
@@ -203,6 +212,8 @@ memcmp (__const void *__s1, __const void *__s2, size_t __n)
? __memset_gc_by2 (s, c, n) \
: __memset_gg (s, c, n))))
+__STRING_INLINE void *__memset_cc_by4 (void *__s, int __c, size_t __n);
+
__STRING_INLINE void *
__memset_cc_by4 (void *__s, int __c, size_t __n)
{
@@ -220,6 +231,8 @@ __memset_cc_by4 (void *__s, int __c, size_t __n)
return __s;
}
+__STRING_INLINE void *__memset_cc_by2 (void *__s, int __c, size_t __n);
+
__STRING_INLINE void *
__memset_cc_by2 (void *__s, int __c, size_t __n)
{
@@ -241,6 +254,8 @@ __memset_cc_by2 (void *__s, int __c, size_t __n)
return __s;
}
+__STRING_INLINE void *__memset_gc_by4 (void *__s, int __c, size_t __n);
+
__STRING_INLINE void *
__memset_gc_by4 (void *__s, int __c, size_t __n)
{
@@ -262,6 +277,8 @@ __memset_gc_by4 (void *__s, int __c, size_t __n)
return __s;
}
+__STRING_INLINE void *__memset_gc_by2 (void *__s, int __c, size_t __n);
+
__STRING_INLINE void *
__memset_gc_by2 (void *__s, int __c, size_t __n)
{
@@ -287,6 +304,8 @@ __memset_gc_by2 (void *__s, int __c, size_t __n)
return __s;
}
+__STRING_INLINE void *__memset_cg (void *__s, int __c, size_t __n);
+
__STRING_INLINE void *
__memset_cg (void *__s, int __c, size_t __n)
{
@@ -304,6 +323,8 @@ __memset_cg (void *__s, int __c, size_t __n)
return __s;
}
+__STRING_INLINE void *__memset_gg (void *__s, int __c, size_t __n);
+
__STRING_INLINE void *
__memset_gg (void *__s, int __c, size_t __n)
{
@@ -362,6 +383,8 @@ memchr (__const void *__s, int __c, size_t __n)
(__extension__ (__builtin_constant_p (str) \
? __builtin_strlen (str) \
: __strlen_g (str)))
+__STRING_INLINE size_t __strlen_g (__const char *__str);
+
__STRING_INLINE size_t
__strlen_g (__const char *__str)
{
@@ -438,6 +461,8 @@ __strlen_g (__const char *__str)
} \
(char *) __dest; }))
+__STRING_INLINE char *__strcpy_g (char *__dest, __const char *__src);
+
__STRING_INLINE char *
__strcpy_g (char *__dest, __const char *__src)
{
@@ -530,6 +555,9 @@ __strcpy_g (char *__dest, __const char *__src)
} \
(char *) __dest; }))
+__STRING_INLINE char *__mempcpy_by4 (char *__dest, __const char *__src,
+ size_t __srclen);
+
__STRING_INLINE char *
__mempcpy_by4 (char *__dest, __const char *__src, size_t __srclen)
{
@@ -549,6 +577,9 @@ __mempcpy_by4 (char *__dest, __const char *__src, size_t __srclen)
return __tmp;
}
+__STRING_INLINE char *__mempcpy_by2 (char *__dest, __const char *__src,
+ size_t __srclen);
+
__STRING_INLINE char *
__mempcpy_by2 (char *__dest, __const char *__src, size_t __srclen)
{
@@ -573,6 +604,9 @@ __mempcpy_by2 (char *__dest, __const char *__src, size_t __srclen)
return __tmp + 2;
}
+__STRING_INLINE char *__mempcpy_byn (char *__dest, __const char *__src,
+ size_t __srclen);
+
__STRING_INLINE char *
__mempcpy_byn (char *__dest, __const char *__src, size_t __srclen)
{
@@ -595,6 +629,8 @@ __mempcpy_byn (char *__dest, __const char *__src, size_t __srclen)
return __tmp;
}
+__STRING_INLINE char *__stpcpy_g (char *__dest, __const char *__src);
+
__STRING_INLINE char *
__stpcpy_g (char *__dest, __const char *__src)
{
@@ -633,6 +669,9 @@ __stpcpy_g (char *__dest, __const char *__src)
? __strncpy_by2 (dest, src, srclen, n) \
: __strncpy_byn (dest, src, srclen, n)))
+__STRING_INLINE char *__strncpy_by4 (char *__dest, __const char __src[],
+ size_t __srclen, size_t __n);
+
__STRING_INLINE char *
__strncpy_by4 (char *__dest, __const char __src[], size_t __srclen, size_t __n)
{
@@ -653,6 +692,9 @@ __strncpy_by4 (char *__dest, __const char __src[], size_t __srclen, size_t __n)
return __dest;
}
+__STRING_INLINE char *__strncpy_by2 (char *__dest, __const char __src[],
+ size_t __srclen, size_t __n);
+
__STRING_INLINE char *
__strncpy_by2 (char *__dest, __const char __src[], size_t __srclen, size_t __n)
{
@@ -678,6 +720,9 @@ __strncpy_by2 (char *__dest, __const char __src[], size_t __srclen, size_t __n)
return __dest;
}
+__STRING_INLINE char *__strncpy_byn (char *__dest, __const char __src[],
+ size_t __srclen, size_t __n);
+
__STRING_INLINE char *
__strncpy_byn (char *__dest, __const char __src[], size_t __srclen, size_t __n)
{
@@ -701,6 +746,9 @@ __strncpy_byn (char *__dest, __const char __src[], size_t __srclen, size_t __n)
return __dest;
}
+__STRING_INLINE char *__strncpy_gg (char *__dest, __const char *__src,
+ size_t __n);
+
__STRING_INLINE char *
__strncpy_gg (char *__dest, __const char *__src, size_t __n)
{
@@ -738,6 +786,9 @@ __strncpy_gg (char *__dest, __const char *__src, size_t __n)
? __strcat_c (dest, src, strlen (src) + 1) \
: __strcat_g (dest, src)))
+__STRING_INLINE char *__strcat_c (char *__dest, __const char __src[],
+ size_t __srclen);
+
__STRING_INLINE char *
__strcat_c (char *__dest, __const char __src[], size_t __srclen)
{
@@ -765,6 +816,8 @@ __strcat_c (char *__dest, __const char __src[], size_t __srclen)
return __dest;
}
+__STRING_INLINE char *__strcat_g (char *__dest, __const char *__src);
+
__STRING_INLINE char *
__strcat_g (char *__dest, __const char *__src)
{
@@ -800,6 +853,9 @@ __strcat_g (char *__dest, __const char *__src)
(__const char *) src, n), __dest)) \
: __strncat_g (__dest, src, n); }))
+__STRING_INLINE char *__strncat_g (char *__dest, __const char __src[],
+ size_t __n);
+
__STRING_INLINE char *
__strncat_g (char *__dest, __const char __src[], size_t __n)
{
@@ -918,6 +974,8 @@ __strncat_g (char *__dest, __const char __src[], size_t __n)
} \
__result; }))
+__STRING_INLINE int __strcmp_gg (__const char *__s1, __const char *__s2);
+
__STRING_INLINE int
__strcmp_gg (__const char *__s1, __const char *__s2)
{
@@ -954,6 +1012,9 @@ __strcmp_gg (__const char *__s1, __const char *__s2)
? strcmp (s1, s2) \
: __strncmp_g (s1, s2, n))))
+__STRING_INLINE int __strncmp_g (__const char *__s1, __const char *__s2,
+ size_t __n);
+
__STRING_INLINE int
__strncmp_g (__const char *__s1, __const char *__s2, size_t __n)
{
@@ -991,6 +1052,8 @@ __strncmp_g (__const char *__s1, __const char *__s2, size_t __n)
? __strchr_c (s, ((c) & 0xff) << 8) \
: __strchr_g (s, c)))
+__STRING_INLINE char *__strchr_c (__const char *__s, int __c);
+
__STRING_INLINE char *
__strchr_c (__const char *__s, int __c)
{
@@ -1012,6 +1075,8 @@ __strchr_c (__const char *__s, int __c)
return __res;
}
+__STRING_INLINE char *__strchr_g (__const char *__s, int __c);
+
__STRING_INLINE char *
__strchr_g (__const char *__s, int __c)
{
@@ -1053,6 +1118,8 @@ __strchr_g (__const char *__s, int __c)
: __strrchr_g (s, c)))
#ifdef __i686__
+__STRING_INLINE char *__strrchr_c (__const char *__s, int __c);
+
__STRING_INLINE char *
__strrchr_c (__const char *__s, int __c)
{
@@ -1072,6 +1139,8 @@ __strrchr_c (__const char *__s, int __c)
return __res - 1;
}
+__STRING_INLINE char *__strrchr_g (__const char *__s, int __c);
+
__STRING_INLINE char *
__strrchr_g (__const char *__s, int __c)
{
@@ -1092,6 +1161,8 @@ __strrchr_g (__const char *__s, int __c)
return __res - 1;
}
#else
+__STRING_INLINE char *__strrchr_c (__const char *__s, int __c);
+
__STRING_INLINE char *
__strrchr_c (__const char *__s, int __c)
{
@@ -1113,6 +1184,8 @@ __strrchr_c (__const char *__s, int __c)
return __res;
}
+__STRING_INLINE char *__strrchr_g (__const char *__s, int __c);
+
__STRING_INLINE char *
__strrchr_g (__const char *__s, int __c)
{
@@ -1159,6 +1232,8 @@ __strrchr_g (__const char *__s, int __c)
: __strcspn_cg (s, reject, strlen (reject)))) \
: __strcspn_g (s, reject)))
+__STRING_INLINE size_t __strcspn_c1 (__const char *__s, int __reject);
+
__STRING_INLINE size_t
__strcspn_c1 (__const char *__s, int __reject)
{
@@ -1179,6 +1254,9 @@ __strcspn_c1 (__const char *__s, int __reject)
return (__res - 1) - __s;
}
+__STRING_INLINE size_t __strcspn_cg (__const char *__s, __const char __reject[],
+ size_t __reject_len);
+
__STRING_INLINE size_t
__strcspn_cg (__const char *__s, __const char __reject[], size_t __reject_len)
{
@@ -1201,7 +1279,9 @@ __strcspn_cg (__const char *__s, __const char __reject[], size_t __reject_len)
return (__res - 1) - __s;
}
+__STRING_INLINE size_t __strcspn_g (__const char *__s, __const char *__reject);
#ifdef __PIC__
+
__STRING_INLINE size_t
__strcspn_g (__const char *__s, __const char *__reject)
{
@@ -1269,6 +1349,8 @@ __strcspn_g (__const char *__s, __const char *__reject)
: __strspn_cg (s, accept, strlen (accept)))) \
: __strspn_g (s, accept)))
+__STRING_INLINE size_t __strspn_c1 (__const char *__s, int __accept);
+
__STRING_INLINE size_t
__strspn_c1 (__const char *__s, int __accept)
{
@@ -1287,6 +1369,9 @@ __strspn_c1 (__const char *__s, int __accept)
return (__res - 1) - __s;
}
+__STRING_INLINE size_t __strspn_cg (__const char *__s, __const char __accept[],
+ size_t __accept_len);
+
__STRING_INLINE size_t
__strspn_cg (__const char *__s, __const char __accept[], size_t __accept_len)
{
@@ -1309,7 +1394,9 @@ __strspn_cg (__const char *__s, __const char __accept[], size_t __accept_len)
return (__res - 1) - __s;
}
+__STRING_INLINE size_t __strspn_g (__const char *__s, __const char *__accept);
#ifdef __PIC__
+
__STRING_INLINE size_t
__strspn_g (__const char *__s, __const char *__accept)
{
@@ -1375,6 +1462,9 @@ __strspn_g (__const char *__s, __const char *__accept)
: __strpbrk_cg (s, accept, strlen (accept)))) \
: __strpbrk_g (s, accept)))
+__STRING_INLINE char *__strpbrk_cg (__const char *__s, __const char __accept[],
+ size_t __accept_len);
+
__STRING_INLINE char *
__strpbrk_cg (__const char *__s, __const char __accept[], size_t __accept_len)
{
@@ -1401,7 +1491,9 @@ __strpbrk_cg (__const char *__s, __const char __accept[], size_t __accept_len)
return __res;
}
+__STRING_INLINE char *__strpbrk_g (__const char *__s, __const char *__accept);
#ifdef __PIC__
+
__STRING_INLINE char *
__strpbrk_g (__const char *__s, __const char *__accept)
{
@@ -1479,6 +1571,9 @@ __strpbrk_g (__const char *__s, __const char *__accept)
/* Please note that this function need not handle NEEDLEs with a
length shorter than two. */
+__STRING_INLINE char *__strstr_cg (__const char *__haystack, __const char __needle[],
+ size_t __needle_len);
+
__STRING_INLINE char *
__strstr_cg (__const char *__haystack, __const char __needle[],
size_t __needle_len)
@@ -1504,7 +1599,9 @@ __strstr_cg (__const char *__haystack, __const char __needle[],
return __res;
}
+__STRING_INLINE char *__strstr_g (__const char *__haystack, __const char *__needle);
#ifdef __PIC__
+
__STRING_INLINE char *
__strstr_g (__const char *__haystack, __const char *__needle)
{
diff --git a/sysdeps/mach/hurd/bits/libc-tsd.h b/sysdeps/mach/hurd/bits/libc-tsd.h
new file mode 100644
index 0000000..6f074c7
--- /dev/null
+++ b/sysdeps/mach/hurd/bits/libc-tsd.h
@@ -0,0 +1,37 @@
+/* libc-internal interface for thread-specific data. Hurd version.
+ Copyright (C) 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _BITS_LIBC_TSD_H
+#define _BITS_LIBC_TSD_H 1
+
+#include <hurd/threadvar.h>
+
+#define __libc_tsd_define(CLASS, KEY) /* nothing, always have threadvars */
+
+#define __libc_tsd_threadvar_location(KEY) \
+ ((void **) __hurd_threadvar_location (_HURD_THREADVAR_##KEY))
+
+#define __libc_tsd_get(KEY) \
+ (*__libc_tsd_threadvar_location (KEY))
+
+#define __libc_tsd_set(KEY, VALUE) \
+ (*__libc_tsd_threadvar_location (KEY) = (VALUE))
+
+
+#endif /* bits/libc-tsd.h */
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/ipc.h b/sysdeps/unix/sysv/linux/alpha/bits/ipc.h
index ec116f6..7b644e8 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/ipc.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/ipc.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -50,13 +50,6 @@ struct ipc_perm
};
-/* Kludge to work around Linux' restriction of only up to five
- arguments to a system call. */
-struct ipc_kludge
- {
- void *msgp;
- long int msgtyp;
- };
__BEGIN_DECLS
diff --git a/sysdeps/unix/sysv/linux/i386/setfsgid.c b/sysdeps/unix/sysv/linux/i386/setfsgid.c
index 1614431..434b193 100644
--- a/sysdeps/unix/sysv/linux/i386/setfsgid.c
+++ b/sysdeps/unix/sysv/linux/i386/setfsgid.c
@@ -17,8 +17,8 @@
Boston, MA 02111-1307, USA. */
#include <errno.h>
-#include <unistd.h>
#include <sys/types.h>
+#include <sys/fsuid.h>
#include <sysdep.h>
#include <sys/syscall.h>
diff --git a/sysdeps/unix/sysv/linux/i386/setfsuid.c b/sysdeps/unix/sysv/linux/i386/setfsuid.c
index a2983a5..f377169 100644
--- a/sysdeps/unix/sysv/linux/i386/setfsuid.c
+++ b/sysdeps/unix/sysv/linux/i386/setfsuid.c
@@ -17,8 +17,8 @@
Boston, MA 02111-1307, USA. */
#include <errno.h>
-#include <unistd.h>
#include <sys/types.h>
+#include <sys/fsuid.h>
#include <sysdep.h>
#include <sys/syscall.h>