summaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/generic/setenv.c10
-rw-r--r--sysdeps/i386/huge_val.h16
-rw-r--r--sysdeps/libm-i387/e_scalb.S1
-rw-r--r--sysdeps/libm-i387/e_scalbf.S1
-rw-r--r--sysdeps/libm-i387/e_scalbl.S1
-rw-r--r--sysdeps/libm-ieee754/e_atan2l.c2
-rw-r--r--sysdeps/libm-ieee754/s_asinhl.c2
-rw-r--r--sysdeps/libm-ieee754/s_cexpf.c63
-rw-r--r--sysdeps/libm-ieee754/s_cexpl.c63
-rw-r--r--sysdeps/libm-ieee754/s_finitel.c2
-rw-r--r--sysdeps/libm-ieee754/s_fpclassifyl.c12
-rw-r--r--sysdeps/libm-ieee754/s_nan.c3
-rw-r--r--sysdeps/libm-ieee754/s_nanf.c3
-rw-r--r--sysdeps/libm-ieee754/s_nanl.c3
-rw-r--r--sysdeps/m68k/fpu/__math.h86
-rw-r--r--sysdeps/m68k/fpu/e_atan2.c100
-rw-r--r--sysdeps/m68k/fpu/e_atan2f.c5
-rw-r--r--sysdeps/m68k/fpu/e_atan2l.c5
-rw-r--r--sysdeps/m68k/fpu/e_pow.c137
-rw-r--r--sysdeps/m68k/fpu/e_powf.c5
-rw-r--r--sysdeps/m68k/fpu/e_powl.c5
-rw-r--r--sysdeps/m68k/fpu/s_exp2.c (renamed from sysdeps/m68k/fpu/s_logb.c)2
-rw-r--r--sysdeps/m68k/fpu/s_exp2f.c (renamed from sysdeps/m68k/fpu/s_logbf.c)2
-rw-r--r--sysdeps/m68k/fpu/s_exp2l.c (renamed from sysdeps/m68k/fpu/s_logbl.c)2
-rw-r--r--sysdeps/m68k/fpu/s_log2.c2
-rw-r--r--sysdeps/m68k/fpu/s_log2f.c2
-rw-r--r--sysdeps/m68k/fpu/s_log2l.c2
-rw-r--r--sysdeps/m68k/huge_val.h16
-rw-r--r--sysdeps/unix/sysv/linux/iovec.h48
-rw-r--r--sysdeps/unix/sysv/linux/msgctl.c30
-rw-r--r--sysdeps/unix/sysv/linux/msgget.c30
-rw-r--r--sysdeps/unix/sysv/linux/msgrcv.c32
-rw-r--r--sysdeps/unix/sysv/linux/msgsnd.c30
-rw-r--r--sysdeps/unix/sysv/linux/netinet/ip.h4
-rw-r--r--sysdeps/unix/sysv/linux/semctl.c30
-rw-r--r--sysdeps/unix/sysv/linux/semget.c30
-rw-r--r--sysdeps/unix/sysv/linux/semop.c30
-rw-r--r--sysdeps/unix/sysv/linux/shmat.c36
-rw-r--r--sysdeps/unix/sysv/linux/shmctl.c30
-rw-r--r--sysdeps/unix/sysv/linux/shmdt.c32
-rw-r--r--sysdeps/unix/sysv/linux/shmget.c30
-rw-r--r--sysdeps/unix/sysv/linux/sys/kd.h26
42 files changed, 652 insertions, 319 deletions
diff --git a/sysdeps/generic/setenv.c b/sysdeps/generic/setenv.c
index 94dc7472ec..11b5906a9d 100644
--- a/sysdeps/generic/setenv.c
+++ b/sysdeps/generic/setenv.c
@@ -56,6 +56,12 @@ __libc_lock_define_initialized (static, envlock)
# define UNLOCK
#endif
+/* In the GNU C library we must keep the namespace clean. */
+#ifdef _LIBC
+# define clearenv __clearenv
+#endif
+
+
/* If this variable is not a null pointer we allocated the current
environment. */
static char **last_environ;
@@ -188,3 +194,7 @@ clearenv ()
return 0;
}
+#ifdef _LIBC
+# undef clearenv
+weak_alias (__clearenv, clearenv)
+#endif
diff --git a/sysdeps/i386/huge_val.h b/sysdeps/i386/huge_val.h
index 8af745f6c1..0aad84902c 100644
--- a/sysdeps/i386/huge_val.h
+++ b/sysdeps/i386/huge_val.h
@@ -23,16 +23,10 @@
#include <features.h>
#include <sys/cdefs.h>
-#include <endian.h>
/* IEEE positive infinity (-HUGE_VAL is negative infinity). */
-#if __BYTE_ORDER == __BIG_ENDIAN
-#define __HUGE_VAL_bytes { 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 }
-#endif
-#if __BYTE_ORDER == __LITTLE_ENDIAN
#define __HUGE_VAL_bytes { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f }
-#endif
#define __huge_val_t union { unsigned char __c[8]; double __d; }
#ifdef __GNUC__
@@ -48,12 +42,7 @@ static __huge_val_t __huge_val = { __HUGE_VAL_bytes };
#ifdef __USE_ISOC9X
-#if __BYTE_ORDER == __BIG_ENDIAN
-#define __HUGE_VALF_bytes { 0x7f, 0x80, 0, 0 }
-#endif
-#if __BYTE_ORDER == __LITTLE_ENDIAN
#define __HUGE_VALF_bytes { 0, 0, 0x80, 0x7f }
-#endif
#define __huge_valf_t union { unsigned char __c[4]; float __f; }
#ifdef __GNUC__
@@ -65,12 +54,7 @@ static __huge_valf_t __huge_valf = { __HUGE_VALF_bytes };
#endif /* GCC. */
-#if __BYTE_ORDER == __BIG_ENDIAN
-#define __HUGE_VALL_bytes { 0x7f, 0xff, 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
-#endif
-#if __BYTE_ORDER == __LITTLE_ENDIAN
#define __HUGE_VALL_bytes { 0, 0, 0, 0, 0, 0, 0, 0x80, 0xff, 0x7f, 0, 0 }
-#endif
#define __huge_vall_t union { unsigned char __c[12]; long double __ld; }
#ifdef __GNUC__
diff --git a/sysdeps/libm-i387/e_scalb.S b/sysdeps/libm-i387/e_scalb.S
index db63dde56e..427a3b905e 100644
--- a/sysdeps/libm-i387/e_scalb.S
+++ b/sysdeps/libm-i387/e_scalb.S
@@ -11,5 +11,6 @@ ENTRY(__ieee754_scalb)
fldl 12(%esp)
fldl 4(%esp)
fscale
+ fstp %st(1)
ret
END(__ieee754_scalb)
diff --git a/sysdeps/libm-i387/e_scalbf.S b/sysdeps/libm-i387/e_scalbf.S
index 7de03db287..4c62134a0c 100644
--- a/sysdeps/libm-i387/e_scalbf.S
+++ b/sysdeps/libm-i387/e_scalbf.S
@@ -12,5 +12,6 @@ ENTRY(__ieee754_scalbf)
flds 8(%esp)
flds 4(%esp)
fscale
+ fstp %st(1)
ret
END(__ieee754_scalbf)
diff --git a/sysdeps/libm-i387/e_scalbl.S b/sysdeps/libm-i387/e_scalbl.S
index 7b20cc6f9c..3b746ad363 100644
--- a/sysdeps/libm-i387/e_scalbl.S
+++ b/sysdeps/libm-i387/e_scalbl.S
@@ -13,5 +13,6 @@ ENTRY(__ieee754_scalbl)
fldt 16(%esp)
fldt 4(%esp)
fscale
+ fstp %st(1)
ret
END(__ieee754_scalbl)
diff --git a/sysdeps/libm-ieee754/e_atan2l.c b/sysdeps/libm-ieee754/e_atan2l.c
index 6b76f96533..e60f2d41c1 100644
--- a/sysdeps/libm-ieee754/e_atan2l.c
+++ b/sysdeps/libm-ieee754/e_atan2l.c
@@ -126,7 +126,7 @@ pi_lo = -5.01655761266833202345176e-20L;/* 0xBFBE, 0xECE675D1, 0xFC8F8CBB */
case 1: {
u_int32_t sz;
GET_LDOUBLE_EXP(sz,z);
- SET_LDOUBLE_EXP(z,sy ^ 0x8000);
+ SET_LDOUBLE_EXP(z,sz ^ 0x8000);
}
return z ; /* atan(-,+) */
case 2: return pi-(z-pi_lo);/* atan(+,-) */
diff --git a/sysdeps/libm-ieee754/s_asinhl.c b/sysdeps/libm-ieee754/s_asinhl.c
index 865bc31052..d5b307753e 100644
--- a/sysdeps/libm-ieee754/s_asinhl.c
+++ b/sysdeps/libm-ieee754/s_asinhl.c
@@ -65,6 +65,6 @@ huge= 1.000000000000000000e+4900L;
t = x*x;
w =__log1pl(fabsl(x)+t/(one+__ieee754_sqrtl(one+t)));
}
- if(hx>0x7fff) return w; else return -w;
+ if(hx>0x8000) return -w; else return w;
}
weak_alias (__asinhl, asinhl)
diff --git a/sysdeps/libm-ieee754/s_cexpf.c b/sysdeps/libm-ieee754/s_cexpf.c
new file mode 100644
index 0000000000..14cfb19766
--- /dev/null
+++ b/sysdeps/libm-ieee754/s_cexpf.c
@@ -0,0 +1,63 @@
+/* Return value of complex exponential function for float complex value.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ 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. */
+
+#include <complex.h>
+#include <math.h>
+
+
+__complex__ float
+__cexpf (__complex__ float x)
+{
+ __complex__ float retval;
+
+ if (isfinite (__real__ x))
+ {
+ if (isfinite (__imag__ x))
+ {
+ retval = __expf (__real__ x) * (__cosf (__imag__ x)
+ + 1i * __sinf (__imag__ x));
+ }
+ else
+ /* If the imaginary part is +-inf or NaN and the real part is
+ not +-inf the result is NaN + iNan. */
+ retval = __nanf ("") + 1.0i * __nanf ("");
+ }
+ else if (__isinff (__real__ x))
+ {
+ if (isfinite (__imag__ x))
+ {
+ if (signbit (__real__ x) == 0 && __imag__ x == 0.0)
+ retval = HUGE_VALF;
+ else
+ retval = ((signbit (__real__ x) ? 0.0 : HUGE_VALF)
+ * (__cosf (__imag__ x) + 1i * __sinf (__imag__ x)));
+ }
+ else if (signbit (__real__ x))
+ retval = HUGE_VALF + 1.0i * __nanf ("");
+ else
+ retval = 0.0;
+ }
+ else
+ /* If the real part is NaN the result is NaN + iNan. */
+ retval = __nanf ("") + 1.0i * __nanf ("");
+
+ return retval;
+}
+weak_alias (__cexpf, cexpf)
diff --git a/sysdeps/libm-ieee754/s_cexpl.c b/sysdeps/libm-ieee754/s_cexpl.c
new file mode 100644
index 0000000000..6b3d409158
--- /dev/null
+++ b/sysdeps/libm-ieee754/s_cexpl.c
@@ -0,0 +1,63 @@
+/* Return value of complex exponential function for long double complex value.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ 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. */
+
+#include <complex.h>
+#include <math.h>
+
+
+__complex__ long double
+__cexpl (__complex__ long double x)
+{
+ __complex__ long double retval;
+
+ if (isfinite (__real__ x))
+ {
+ if (isfinite (__imag__ x))
+ {
+ retval = __expl (__real__ x) * (__cosl (__imag__ x)
+ + 1i * __sinl (__imag__ x));
+ }
+ else
+ /* If the imaginary part is +-inf or NaN and the real part is
+ not +-inf the result is NaN + iNan. */
+ retval = __nanl ("") + 1.0i * __nanl ("");
+ }
+ else if (__isinfl (__real__ x))
+ {
+ if (isfinite (__imag x))
+ {
+ if (signbit (__real__ x) == 0 && __imag__ x == 0.0)
+ retval = HUGE_VALL;
+ else
+ retval = ((signbit (__real__ x) ? 0.0 : HUGE_VALL)
+ * (__cosl (__imag__ x) + 1i * __sinl (__imag__ x)));
+ }
+ else if (signbit (__real__ x))
+ retval = HUGE_VALL + 1.0i * __nanl ("");
+ else
+ retval = 0.0;
+ }
+ else
+ /* If the real part is NaN the result is NaN + iNan. */
+ retval = __nanl ("") + 1.0i * __nanl ("");
+
+ return retval;
+}
+weak_alias (__cexpl, cexpl)
diff --git a/sysdeps/libm-ieee754/s_finitel.c b/sysdeps/libm-ieee754/s_finitel.c
index 4423726645..6e444e90d0 100644
--- a/sysdeps/libm-ieee754/s_finitel.c
+++ b/sysdeps/libm-ieee754/s_finitel.c
@@ -35,6 +35,6 @@ static char rcsid[] = "$NetBSD: $";
{
int32_t exp;
GET_LDOUBLE_EXP(exp,x);
- return (int)((u_int32_t)((exp&0x7fff)-0x7fff)>>15);
+ return (int)((u_int32_t)((exp&0x7fff)-0x7fff)>>31);
}
weak_alias (__finitel, finitel)
diff --git a/sysdeps/libm-ieee754/s_fpclassifyl.c b/sysdeps/libm-ieee754/s_fpclassifyl.c
index d7a0e943cf..4df0b44f75 100644
--- a/sysdeps/libm-ieee754/s_fpclassifyl.c
+++ b/sysdeps/libm-ieee754/s_fpclassifyl.c
@@ -2,6 +2,7 @@
Copyright (C) 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+ Fixed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>.
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
@@ -26,19 +27,18 @@
int
__fpclassifyl (long double x)
{
- u_int32_t ex, hx, lx;
+ u_int32_t ex, hx, lx, m;
int retval = FP_NORMAL;
GET_LDOUBLE_WORDS (ex, hx, lx, x);
- hx &= 0x7fffffff;
- hx |= lx;
+ m = (hx & 0x7fffffff) | lx;
ex &= 0x7fff;
- if ((ex | hx) == 0)
+ if ((ex | m) == 0)
retval = FP_ZERO;
- else if (ex == 0)
+ else if (ex == 0 && (hx & 0x80000000) == 0)
retval = FP_SUBNORMAL;
else if (ex == 0x7fff)
- retval = hx != 0 ? FP_NAN : FP_INFINITE;
+ retval = m != 0 ? FP_NAN : FP_INFINITE;
return retval;
}
diff --git a/sysdeps/libm-ieee754/s_nan.c b/sysdeps/libm-ieee754/s_nan.c
index 58551c1ad5..0d065d5c72 100644
--- a/sysdeps/libm-ieee754/s_nan.c
+++ b/sysdeps/libm-ieee754/s_nan.c
@@ -31,7 +31,7 @@
double
-nan (const char *tagp)
+__nan (const char *tagp)
{
#ifdef HANDLE_TAGP
/* If we ever should have use of the TAGP parameter we will use the
@@ -45,3 +45,4 @@ nan (const char *tagp)
return nan_value.d;
#endif
}
+weak_alias (__nan, nan)
diff --git a/sysdeps/libm-ieee754/s_nanf.c b/sysdeps/libm-ieee754/s_nanf.c
index e965b94b33..660f30daf3 100644
--- a/sysdeps/libm-ieee754/s_nanf.c
+++ b/sysdeps/libm-ieee754/s_nanf.c
@@ -31,7 +31,7 @@
float
-nanf (const char *tagp)
+__nanf (const char *tagp)
{
#ifdef HANDLE_TAGP
/* If we ever should have use of the TAGP parameter we will use the
@@ -45,3 +45,4 @@ nanf (const char *tagp)
return nan_value.f;
#endif
}
+weak_alias (__nanf, nanf)
diff --git a/sysdeps/libm-ieee754/s_nanl.c b/sysdeps/libm-ieee754/s_nanl.c
index df0180ee46..4ade80424f 100644
--- a/sysdeps/libm-ieee754/s_nanl.c
+++ b/sysdeps/libm-ieee754/s_nanl.c
@@ -31,7 +31,7 @@
long double
-nanl (const char *tagp)
+__nanl (const char *tagp)
{
#ifdef HANDLE_TAGP
/* If we ever should have use of the TAGP parameter we will use the
@@ -46,3 +46,4 @@ nanl (const char *tagp)
return nan_value.d;
#endif
}
+weak_alias (__nanl, nanl)
diff --git a/sysdeps/m68k/fpu/__math.h b/sysdeps/m68k/fpu/__math.h
index fe01c254d7..d6187015ea 100644
--- a/sysdeps/m68k/fpu/__math.h
+++ b/sysdeps/m68k/fpu/__math.h
@@ -85,7 +85,6 @@ __inline_mathop(__fabs, abs)
__inline_mathop(__rint, int)
__inline_mathop(__expm1, etoxm1)
__inline_mathop(__log1p, lognp1)
-__inline_mathop(__logb, log2)
__inline_mathop(__significand, getman)
__inline_mathop(__log2, log2)
@@ -103,7 +102,6 @@ __inline_mathop(tanh, tanh)
__inline_mathop(rint, int)
__inline_mathop(expm1, etoxm1)
__inline_mathop(log1p, lognp1)
-__inline_mathop(logb, log2)
#endif
#ifdef __USE_MISC
@@ -140,90 +138,6 @@ __m81_defun (float_type, __CONCAT(__ieee754_fmod,s), \
return __result; \
} \
\
-__m81_defun (float_type, __CONCAT(__ieee754_atan2,s), \
- (float_type __y, float_type __x)) \
-{ \
- float_type __pi, __pi_2; \
- \
- __asm ("fmovecr%.x %#0, %0" : "=f" (__pi)); \
- __asm ("fscale%.w %#-1, %0" : "=f" (__pi_2) : "0" (__pi)); \
- if (__x > 0) \
- { \
- if (__y > 0) \
- { \
- if (__x > __y) \
- return __m81_u(__CONCAT(__atan,s)) (__y / __x); \
- else \
- return __pi_2 - __m81_u(__CONCAT(__atan,s)) (__x / __y); \
- } \
- else \
- { \
- if (__x > -__y) \
- return __m81_u(__CONCAT(__atan,s)) (__y / __x); \
- else \
- return -__pi_2 - __m81_u(__CONCAT(__atan,s)) (__x / __y); \
- } \
- } \
- else \
- { \
- if (__y > 0) \
- { \
- if (-__x < __y) \
- return __pi + __m81_u(__CONCAT(__atan,s)) (__y / __x); \
- else \
- return __pi_2 - __m81_u(__CONCAT(__atan,s)) (__x / __y); \
- } \
- else \
- { \
- if (-__x > -__y) \
- return -__pi + __m81_u(__CONCAT(__atan,s)) (__y / __x); \
- else \
- return -__pi_2 - __m81_u(__CONCAT(__atan,s)) (__x / __y); \
- } \
- } \
-} \
- \
-__m81_defun (float_type, __CONCAT(__ieee754_pow,s), \
- (float_type __x, float_type __y)) \
-{ \
- float_type __result; \
- if (__x == 0.0) \
- { \
- if (__y <= 0.0) \
- __result = 0.0 / 0.0; \
- else \
- __result = 0.0; \
- } \
- else if (__y == 0.0 || __x == 1.0) \
- __result = 1.0; \
- else if (__y == 1.0) \
- __result = __x; \
- else if (__y == 2.0) \
- __result = __x * __x; \
- else if (__x == 10.0) \
- __asm("ftentox%.x %1, %0" : "=f" (__result) : "f" (__y)); \
- else if (__x == 2.0) \
- __asm("ftwotox%.x %1, %0" : "=f" (__result) : "f" (__y)); \
- else if (__x < 0.0) \
- { \
- float_type __temp = __m81_u (__CONCAT(__rint,s)) (__y); \
- if (__y == __temp) \
- { \
- int __i = (int) __y; \
- __result = (__m81_u(__CONCAT(__ieee754_exp,s)) \
- (__y * __m81_u(__CONCAT(__ieee754_log,s)) (-__x))); \
- if (__i & 1) \
- __result = -__result; \
- } \
- else \
- __result = 0.0 / 0.0; \
- } \
- else \
- __result = (__m81_u(__CONCAT(__ieee754_exp,s)) \
- (__y * __m81_u(__CONCAT(__ieee754_log,s)) (__x))); \
- return __result; \
-} \
- \
__m81_defun (float_type, __CONCAT(__ieee754_scalb,s), \
(float_type __x, float_type __n)) \
{ \
diff --git a/sysdeps/m68k/fpu/e_atan2.c b/sysdeps/m68k/fpu/e_atan2.c
index ae7a799ad1..58d7555f41 100644
--- a/sysdeps/m68k/fpu/e_atan2.c
+++ b/sysdeps/m68k/fpu/e_atan2.c
@@ -1,2 +1,98 @@
-#define FUNC __ieee754_atan2
-#include <e_fmod.c>
+/* Copyright (C) 1997 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. */
+
+#define __LIBC_M81_MATH_INLINES
+#include <math.h>
+#include "math_private.h"
+
+#ifndef SUFF
+#define SUFF
+#endif
+#ifndef float_type
+#define float_type double
+#endif
+
+#define __CONCATX(a,b) __CONCAT(a,b)
+
+float_type
+__CONCATX(__ieee754_atan2,SUFF) (float_type y, float_type x)
+{
+ float_type pi, pi_2, z;
+
+ __asm ("fmovecr%.x %#0, %0" : "=f" (pi));
+ __asm ("fscale%.w %#-1, %0" : "=f" (pi_2) : "0" (pi));
+ if (x != x || y != y)
+ z = x + y;
+ else if (y == 0)
+ {
+ if (signbit (x))
+ z = signbit (y) ? -pi : pi;
+ else
+ z = y;
+ }
+ else if (__m81_u(__CONCATX(__isinf,SUFF)) (x))
+ {
+ if (__m81_u(__CONCATX(__isinf,SUFF)) (y))
+ {
+ float_type pi_4;
+ __asm ("fscale%.w %#-1, %0" : "=f" (pi_4) : "0" (pi_2));
+ z = x > 0 ? pi_4 : 3 * pi_4;
+ }
+ else
+ z = x > 0 ? 0 : pi;
+ if (signbit (y))
+ z = -z;
+ }
+ else if (__m81_u(__CONCATX(__isinf,SUFF)) (y))
+ z = y > 0 ? pi_2 : -pi_2;
+ else if (x > 0)
+ {
+ if (y > 0)
+ {
+ if (x > y)
+ z = __m81_u(__CONCATX(__atan,SUFF)) (y / x);
+ else
+ z = pi_2 - __m81_u(__CONCATX(__atan,SUFF)) (x / y);
+ }
+ else
+ {
+ if (x > -y)
+ z = __m81_u(__CONCATX(__atan,SUFF)) (y / x);
+ else
+ z = -pi_2 - __m81_u(__CONCATX(__atan,SUFF)) (x / y);
+ }
+ }
+ else
+ {
+ if (y < 0)
+ {
+ if (-x > y)
+ z = -pi + __m81_u(__CONCATX(__atan,SUFF)) (y / x);
+ else
+ z = -pi_2 - __m81_u(__CONCATX(__atan,SUFF)) (x / y);
+ }
+ else
+ {
+ if (-x > y)
+ z = pi + __m81_u(__CONCATX(__atan,SUFF)) (y / x);
+ else
+ z = pi_2 - __m81_u(__CONCATX(__atan,SUFF)) (x / y);
+ }
+ }
+ return z;
+}
diff --git a/sysdeps/m68k/fpu/e_atan2f.c b/sysdeps/m68k/fpu/e_atan2f.c
index a4c5ebdfd3..a0c750a759 100644
--- a/sysdeps/m68k/fpu/e_atan2f.c
+++ b/sysdeps/m68k/fpu/e_atan2f.c
@@ -1,2 +1,3 @@
-#define FUNC __ieee754_atan2f
-#include <e_fmodf.c>
+#define SUFF f
+#define float_type float
+#include <e_atan2.c>
diff --git a/sysdeps/m68k/fpu/e_atan2l.c b/sysdeps/m68k/fpu/e_atan2l.c
index 0d43a77b9e..426ca94baa 100644
--- a/sysdeps/m68k/fpu/e_atan2l.c
+++ b/sysdeps/m68k/fpu/e_atan2l.c
@@ -1,2 +1,3 @@
-#define FUNC __ieee754_atan2l
-#include <e_fmodl.c>
+#define SUFF l
+#define float_type long double
+#include <e_atan2.c>
diff --git a/sysdeps/m68k/fpu/e_pow.c b/sysdeps/m68k/fpu/e_pow.c
index 29798a15ca..970e8b821b 100644
--- a/sysdeps/m68k/fpu/e_pow.c
+++ b/sysdeps/m68k/fpu/e_pow.c
@@ -1,2 +1,135 @@
-#define FUNC __ieee754_pow
-#include <e_fmod.c>
+/* Copyright (C) 1997 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. */
+
+#define __LIBC_M81_MATH_INLINES
+#include <math.h>
+#include "math_private.h"
+
+#ifndef SUFF
+#define SUFF
+#endif
+#ifndef float_type
+#define float_type double
+#endif
+
+#define __CONCATX(a,b) __CONCAT(a,b)
+
+float_type
+__CONCATX(__ieee754_pow,SUFF) (float_type x, float_type y)
+{
+ float_type z;
+ float_type ax;
+
+ if (y == 0.0)
+ return 1.0;
+ if (x != x || y != y)
+ return x + y;
+
+ if (__m81_u(__CONCATX(__isinf,SUFF)) (y))
+ {
+ ax = __CONCATX(fabs,SUFF) (x);
+ if (ax == 1)
+ return y - y;
+ if (ax > 1)
+ return y > 0 ? y : 0;
+ else
+ return y < 0 ? -y : 0;
+ }
+
+ if (__CONCATX(fabs,SUFF) (y) == 1)
+ return y > 0 ? x : 1 / x;
+
+ if (y == 2)
+ return x * x;
+ if (y == 0 && x >= 0)
+ return __m81_u(__CONCATX(__ieee754_sqrt,SUFF)) (x);
+
+ if (x == 10.0)
+ {
+ __asm ("ftentox%.x %1, %0" : "=f" (z) : "f" (y));
+ return z;
+ }
+ if (x == 2.0)
+ {
+ __asm ("ftwotox%.x %1, %0" : "=f" (z) : "f" (y));
+ return z;
+ }
+
+ ax = __CONCATX(fabs,SUFF) (x);
+ if (__m81_u(__CONCATX(__isinf,SUFF)) (x) || x == 0 || ax == 1)
+ {
+ z = ax;
+ if (y < 0)
+ z = 1 / z;
+ if (signbit (x))
+ {
+ float_type temp = __m81_u (__CONCATX(__rint,SUFF)) (y);
+ if (y != temp)
+ {
+ if (x == -1)
+ z = (z - z) / (z - z);
+ }
+ else
+ {
+ if (sizeof (float_type) == sizeof (float))
+ {
+ long i = (long) y;
+ if (i & 1)
+ z = -z;
+ }
+ else
+ {
+ long long i = (long long) y;
+ if ((float_type) i == y && i & 1)
+ z = -z;
+ }
+ }
+ }
+ return z;
+ }
+
+ if (x < 0.0)
+ {
+ float_type temp = __m81_u (__CONCATX(__rint,SUFF)) (y);
+ if (y == temp)
+ {
+ long long i = (long long) y;
+ z = (__m81_u(__CONCATX(__ieee754_exp,SUFF))
+ (y * __m81_u(__CONCATX(__ieee754_log,SUFF)) (-x)));
+ if (sizeof (float_type) == sizeof (float))
+ {
+ long i = (long) y;
+ if (i & 1)
+ z = -z;
+ }
+ else
+ {
+ /* If the conversion to long long was inexact assume that y
+ is an even integer. */
+ if ((float_type) i == y && i & 1)
+ z = -z;
+ }
+ }
+ else
+ z = (x - x) / (x - x);
+ }
+ else
+ z = (__m81_u(__CONCATX(__ieee754_exp,SUFF))
+ (y * __m81_u(__CONCATX(__ieee754_log,SUFF)) (x)));
+ return z;
+}
diff --git a/sysdeps/m68k/fpu/e_powf.c b/sysdeps/m68k/fpu/e_powf.c
index 978d32eacc..379014355a 100644
--- a/sysdeps/m68k/fpu/e_powf.c
+++ b/sysdeps/m68k/fpu/e_powf.c
@@ -1,2 +1,3 @@
-#define FUNC __ieee754_powf
-#include <e_fmodf.c>
+#define SUFF f
+#define float_type float
+#include <e_pow.c>
diff --git a/sysdeps/m68k/fpu/e_powl.c b/sysdeps/m68k/fpu/e_powl.c
index 0feec54fec..f71fa34a26 100644
--- a/sysdeps/m68k/fpu/e_powl.c
+++ b/sysdeps/m68k/fpu/e_powl.c
@@ -1,2 +1,3 @@
-#define FUNC __ieee754_powl
-#include <e_fmodl.c>
+#define SUFF l
+#define float_type long double
+#include <e_pow.c>
diff --git a/sysdeps/m68k/fpu/s_logb.c b/sysdeps/m68k/fpu/s_exp2.c
index 9903b3089a..389528092a 100644
--- a/sysdeps/m68k/fpu/s_logb.c
+++ b/sysdeps/m68k/fpu/s_exp2.c
@@ -1,2 +1,2 @@
-#define FUNC logb
+#define FUNC exp2
#include <s_atan.c>
diff --git a/sysdeps/m68k/fpu/s_logbf.c b/sysdeps/m68k/fpu/s_exp2f.c
index 6dcfee5807..20ac916d1a 100644
--- a/sysdeps/m68k/fpu/s_logbf.c
+++ b/sysdeps/m68k/fpu/s_exp2f.c
@@ -1,2 +1,2 @@
-#define FUNC logbf
+#define FUNC exp2f
#include <s_atanf.c>
diff --git a/sysdeps/m68k/fpu/s_logbl.c b/sysdeps/m68k/fpu/s_exp2l.c
index 7d06ac13c4..19121b929d 100644
--- a/sysdeps/m68k/fpu/s_logbl.c
+++ b/sysdeps/m68k/fpu/s_exp2l.c
@@ -1,2 +1,2 @@
-#define FUNC logbl
+#define FUNC exp2l
#include <s_atanl.c>
diff --git a/sysdeps/m68k/fpu/s_log2.c b/sysdeps/m68k/fpu/s_log2.c
new file mode 100644
index 0000000000..26e26bae95
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_log2.c
@@ -0,0 +1,2 @@
+#define FUNC log2
+#include <s_atan.c>
diff --git a/sysdeps/m68k/fpu/s_log2f.c b/sysdeps/m68k/fpu/s_log2f.c
new file mode 100644
index 0000000000..68494322b8
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_log2f.c
@@ -0,0 +1,2 @@
+#define FUNC log2f
+#include <s_atanf.c>
diff --git a/sysdeps/m68k/fpu/s_log2l.c b/sysdeps/m68k/fpu/s_log2l.c
new file mode 100644
index 0000000000..c4eb06332b
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_log2l.c
@@ -0,0 +1,2 @@
+#define FUNC log2l
+#include <s_atanl.c>
diff --git a/sysdeps/m68k/huge_val.h b/sysdeps/m68k/huge_val.h
index c2139580e8..79e87dc2db 100644
--- a/sysdeps/m68k/huge_val.h
+++ b/sysdeps/m68k/huge_val.h
@@ -23,16 +23,10 @@
#include <features.h>
#include <sys/cdefs.h>
-#include <endian.h>
/* IEEE positive infinity (-HUGE_VAL is negative infinity). */
-#if __BYTE_ORDER == __BIG_ENDIAN
#define __HUGE_VAL_bytes { 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 }
-#endif
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-#define __HUGE_VAL_bytes { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f }
-#endif
#define __huge_val_t union { unsigned char __c[8]; double __d; }
#ifdef __GNUC__
@@ -48,12 +42,7 @@ static __huge_val_t __huge_val = { __HUGE_VAL_bytes };
#ifdef __USE_ISOC9X
-#if __BYTE_ORDER == __BIG_ENDIAN
#define __HUGE_VALF_bytes { 0x7f, 0x80, 0, 0 }
-#endif
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-#define __HUGE_VALF_bytes { 0, 0, 0x80, 0x7f }
-#endif
#define __huge_valf_t union { unsigned char __c[4]; float __f; }
#ifdef __GNUC__
@@ -65,12 +54,7 @@ static __huge_valf_t __huge_valf = { __HUGE_VALF_bytes };
#endif /* GCC. */
-#if __BYTE_ORDER == __BIG_ENDIAN
#define __HUGE_VALL_bytes { 0x7f, 0xff, 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
-#endif
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-#define __HUGE_VALL_bytes { 0, 0, 0, 0, 0, 0, 0, 0x80, 0xff, 0x7f, 0, 0 }
-#endif
#define __huge_vall_t union { unsigned char __c[12]; long double __ld; }
#ifdef __GNUC__
diff --git a/sysdeps/unix/sysv/linux/iovec.h b/sysdeps/unix/sysv/linux/iovec.h
index 6e5e01d9b3..430edfc029 100644
--- a/sysdeps/unix/sysv/linux/iovec.h
+++ b/sysdeps/unix/sysv/linux/iovec.h
@@ -1,3 +1,47 @@
-/* The Linux kernel header defines `struct iovec' for us. */
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-#include <linux/uio.h>
+ 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 _IOVEC_H
+
+#define _IOVEC_H 1
+
+#include <sys/types.h>
+
+
+/* We should normally use the Linux kernel header file to define this
+ type and macros but this calls for trouble because of the header
+ includes other kernel headers. */
+
+/* Size of object which can be written atomically.
+
+ This macro has different values in different kernel versions. The
+ latest versions of ther kernel use 1024 and this is good choice. Since
+ the C library implementation of readv/writev is able to emulate the
+ functionality even if the currently running kernel does not support
+ this large value the readv/writev call will not fail because of this. */
+#define UIO_MAXIOV 1024
+
+
+/* Structure for scatter/gather I/O. */
+struct iovec
+ {
+ void *iov_base; /* Pointer to data. */
+ size_t iov_len; /* Length of data. */
+ };
+
+#endif /* iovec.h */
diff --git a/sysdeps/unix/sysv/linux/msgctl.c b/sysdeps/unix/sysv/linux/msgctl.c
index cd64d15cbe..6a0b7d683d 100644
--- a/sysdeps/unix/sysv/linux/msgctl.c
+++ b/sysdeps/unix/sysv/linux/msgctl.c
@@ -1,21 +1,21 @@
-/* Copyright (C) 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
+/* Copyright (C) 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
-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 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.
+ 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. */
+ 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. */
#include <sys/msg.h>
diff --git a/sysdeps/unix/sysv/linux/msgget.c b/sysdeps/unix/sysv/linux/msgget.c
index b1c29d6780..c073614ef1 100644
--- a/sysdeps/unix/sysv/linux/msgget.c
+++ b/sysdeps/unix/sysv/linux/msgget.c
@@ -1,21 +1,21 @@
-/* Copyright (C) 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
+/* Copyright (C) 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
-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 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.
+ 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. */
+ 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. */
#include <sys/msg.h>
#include <stdlib.h> /* for definition of NULL */
diff --git a/sysdeps/unix/sysv/linux/msgrcv.c b/sysdeps/unix/sysv/linux/msgrcv.c
index 21c6b75cac..40c3c95728 100644
--- a/sysdeps/unix/sysv/linux/msgrcv.c
+++ b/sysdeps/unix/sysv/linux/msgrcv.c
@@ -1,21 +1,21 @@
-/* Copyright (C) 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
+/* Copyright (C) 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
-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 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.
+ 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. */
+ 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. */
#include <sys/msg.h>
@@ -24,7 +24,7 @@ msgrcv (msqid, msgp, msgsz, msgtyp, msgflg)
int msqid;
void *msgp;
size_t msgsz;
- long msgtyp;
+ long int msgtyp;
int msgflg;
{
/* The problem here is that Linux' calling convention only allows up to
diff --git a/sysdeps/unix/sysv/linux/msgsnd.c b/sysdeps/unix/sysv/linux/msgsnd.c
index 6d2d3ef26b..739323495c 100644
--- a/sysdeps/unix/sysv/linux/msgsnd.c
+++ b/sysdeps/unix/sysv/linux/msgsnd.c
@@ -1,21 +1,21 @@
-/* Copyright (C) 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
+/* Copyright (C) 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
-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 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.
+ 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. */
+ 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. */
#include <sys/msg.h>
diff --git a/sysdeps/unix/sysv/linux/netinet/ip.h b/sysdeps/unix/sysv/linux/netinet/ip.h
index 89c2b1d296..6d50bb41d1 100644
--- a/sysdeps/unix/sysv/linux/netinet/ip.h
+++ b/sysdeps/unix/sysv/linux/netinet/ip.h
@@ -163,11 +163,11 @@ struct ip_timestamp
u_int8_t ipt_len; /* size of structure (variable) */
u_int8_t ipt_ptr; /* index of current entry */
#if __BYTE_ORDER == __LITTLE_ENDIAN
- u_int8_t ipt_flg:4, /* flags, see below */
+ u_int8_t ipt_flg:4; /* flags, see below */
u_int8_t ipt_oflw:4; /* overflow counter */
#endif
#if __BYTE_ORDER == __BIG_ENDIAN
- u_int8_t ipt_oflw:4, /* overflow counter */
+ u_int8_t ipt_oflw:4; /* overflow counter */
u_int8_t ipt_flg:4; /* flags, see below */
#endif
u_int32_t data[9];
diff --git a/sysdeps/unix/sysv/linux/semctl.c b/sysdeps/unix/sysv/linux/semctl.c
index dd0e7b9484..3d95e08d98 100644
--- a/sysdeps/unix/sysv/linux/semctl.c
+++ b/sysdeps/unix/sysv/linux/semctl.c
@@ -1,21 +1,21 @@
-/* Copyright (C) 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
+/* Copyright (C) 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
-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 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.
+ 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. */
+ 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. */
#include <sys/sem.h>
diff --git a/sysdeps/unix/sysv/linux/semget.c b/sysdeps/unix/sysv/linux/semget.c
index 6320e4720e..b9f41f5c7c 100644
--- a/sysdeps/unix/sysv/linux/semget.c
+++ b/sysdeps/unix/sysv/linux/semget.c
@@ -1,21 +1,21 @@
-/* Copyright (C) 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
+/* Copyright (C) 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
-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 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.
+ 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. */
+ 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. */
#include <sys/sem.h>
#include <stdlib.h> /* for definition of NULL */
diff --git a/sysdeps/unix/sysv/linux/semop.c b/sysdeps/unix/sysv/linux/semop.c
index 57f074e90e..563aaae414 100644
--- a/sysdeps/unix/sysv/linux/semop.c
+++ b/sysdeps/unix/sysv/linux/semop.c
@@ -1,21 +1,21 @@
-/* Copyright (C) 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
+/* Copyright (C) 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
-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 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.
+ 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. */
+ 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. */
#include <sys/sem.h>
diff --git a/sysdeps/unix/sysv/linux/shmat.c b/sysdeps/unix/sysv/linux/shmat.c
index b74b8a56ec..2ac07f21d0 100644
--- a/sysdeps/unix/sysv/linux/shmat.c
+++ b/sysdeps/unix/sysv/linux/shmat.c
@@ -1,21 +1,21 @@
-/* Copyright (C) 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
+/* Copyright (C) 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
-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 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.
+ 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. */
+ 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. */
#include <sys/shm.h>
@@ -23,15 +23,15 @@ Boston, MA 02111-1307, USA. */
segment of the calling process. SHMADDR and SHMFLG determine how
and where the segment is attached. */
-char *
+void *
shmat (shmid, shmaddr, shmflg)
int shmid;
- char *shmaddr;
+ const void *shmaddr;
int shmflg;
{
int retval;
unsigned long raddr;
retval = __ipc (IPCOP_shmat, shmid, shmflg, (int) &raddr, shmaddr);
- return retval < 0 ? (char *) retval : (char *) raddr;
+ return retval < 0 ? (void *) retval : (void *) raddr;
}
diff --git a/sysdeps/unix/sysv/linux/shmctl.c b/sysdeps/unix/sysv/linux/shmctl.c
index 81192a8996..f25d4194b5 100644
--- a/sysdeps/unix/sysv/linux/shmctl.c
+++ b/sysdeps/unix/sysv/linux/shmctl.c
@@ -1,21 +1,21 @@
-/* Copyright (C) 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
+/* Copyright (C) 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
-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 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.
+ 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. */
+ 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. */
#include <sys/shm.h>
diff --git a/sysdeps/unix/sysv/linux/shmdt.c b/sysdeps/unix/sysv/linux/shmdt.c
index 1e5bbe13b1..dcda701e45 100644
--- a/sysdeps/unix/sysv/linux/shmdt.c
+++ b/sysdeps/unix/sysv/linux/shmdt.c
@@ -1,21 +1,21 @@
-/* Copyright (C) 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
+/* Copyright (C) 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
-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 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.
+ 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. */
+ 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. */
#include <sys/shm.h>
@@ -24,7 +24,7 @@ Boston, MA 02111-1307, USA. */
int
shmdt (shmaddr)
- char *shmaddr;
+ const void *shmaddr;
{
return __ipc (IPCOP_shmdt, 0, 0, 0, shmaddr);
}
diff --git a/sysdeps/unix/sysv/linux/shmget.c b/sysdeps/unix/sysv/linux/shmget.c
index f0b2b6531d..8754191862 100644
--- a/sysdeps/unix/sysv/linux/shmget.c
+++ b/sysdeps/unix/sysv/linux/shmget.c
@@ -1,21 +1,21 @@
-/* Copyright (C) 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
+/* Copyright (C) 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
-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 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.
+ 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. */
+ 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. */
#include <sys/shm.h>
#include <stdlib.h> /* for definition of NULL */
diff --git a/sysdeps/unix/sysv/linux/sys/kd.h b/sysdeps/unix/sysv/linux/sys/kd.h
index 33b873f49c..0ff5220014 100644
--- a/sysdeps/unix/sysv/linux/sys/kd.h
+++ b/sysdeps/unix/sysv/linux/sys/kd.h
@@ -1 +1,27 @@
+/* Copyright (C) 1996, 1997 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 _SYS_KD_H
+#define _SYS_KD_H 1
+
+/* Make sure the <linux/types.h> header is not loaded. */
+#define _LINUX_TYPES_H 1
+
#include <linux/kd.h>
+
+#endif /* sys/kd.h */