about summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/generic/bits/fcntl.h4
-rw-r--r--sysdeps/mach/hurd/bits/fcntl.h4
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/s_ceil.S60
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/s_ceilf.S56
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/s_floor.S58
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/s_floorf.S54
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/s_llrint.S (renamed from sysdeps/powerpc/powerpc64/fpu/s_llrint.c)32
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/s_llrintf.S (renamed from sysdeps/powerpc/powerpc64/fpu/s_llrintf.c)28
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/s_llround.S67
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/s_llroundf.S59
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/s_lround.S2
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/s_lroundf.S2
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/s_rint.S54
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/s_rintf.S47
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/s_round.S75
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/s_roundf.S71
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/s_trunc.S67
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/s_truncf.S63
-rw-r--r--sysdeps/unix/bsd/bits/fcntl.h4
-rw-r--r--sysdeps/unix/bsd/bsd4.4/bits/fcntl.h4
-rw-r--r--sysdeps/unix/bsd/sun/sunos4/bits/fcntl.h4
-rw-r--r--sysdeps/unix/bsd/ultrix4/bits/fcntl.h4
-rw-r--r--sysdeps/unix/common/bits/fcntl.h5
-rw-r--r--sysdeps/unix/sysv/aix/bits/fcntl.h4
-rw-r--r--sysdeps/unix/sysv/irix4/bits/fcntl.h4
-rw-r--r--sysdeps/unix/sysv/linux/Versions3
-rw-r--r--sysdeps/unix/sysv/linux/alpha/bits/fcntl.h4
-rw-r--r--sysdeps/unix/sysv/linux/arm/bits/fcntl.h4
-rw-r--r--sysdeps/unix/sysv/linux/cris/bits/fcntl.h5
-rw-r--r--sysdeps/unix/sysv/linux/hppa/bits/fcntl.h4
-rw-r--r--sysdeps/unix/sysv/linux/i386/bits/fcntl.h5
-rw-r--r--sysdeps/unix/sysv/linux/ia64/bits/fcntl.h4
-rw-r--r--sysdeps/unix/sysv/linux/m68k/bits/fcntl.h4
-rw-r--r--sysdeps/unix/sysv/linux/mips/bits/fcntl.h4
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h5
-rw-r--r--sysdeps/unix/sysv/linux/s390/bits/fcntl.h4
-rw-r--r--sysdeps/unix/sysv/linux/sh/bits/fcntl.h5
-rw-r--r--sysdeps/unix/sysv/linux/sparc/bits/fcntl.h5
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/Versions3
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h4
40 files changed, 814 insertions, 81 deletions
diff --git a/sysdeps/generic/bits/fcntl.h b/sysdeps/generic/bits/fcntl.h
index f23667eb95..b397f812f1 100644
--- a/sysdeps/generic/bits/fcntl.h
+++ b/sysdeps/generic/bits/fcntl.h
@@ -1,5 +1,5 @@
 /* O_*, F_*, FD_* bit values for stub configuration.
-   Copyright (C) 1991, 1992, 1997, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1991, 1992, 1997, 2000, 2004 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
@@ -54,7 +54,7 @@
 #define	F_SETFD		2	/* Set file descriptor flags.  */
 #define	F_GETFL		3	/* Get file status flags.  */
 #define	F_SETFL		4	/* Set file status flags.  */
-#if defined __USE_BSD || defined __USE_XOPEN2K
+#if defined __USE_BSD || defined __USE_UNIX98
 # define F_GETOWN	5	/* Get owner (receiver of SIGIO).  */
 # define F_SETOWN	6	/* Set owner (receiver of SIGIO).  */
 #endif
diff --git a/sysdeps/mach/hurd/bits/fcntl.h b/sysdeps/mach/hurd/bits/fcntl.h
index 09da177e69..e709cc6fb1 100644
--- a/sysdeps/mach/hurd/bits/fcntl.h
+++ b/sysdeps/mach/hurd/bits/fcntl.h
@@ -1,5 +1,5 @@
 /* O_*, F_*, FD_* bit values for GNU.
-   Copyright (C) 1993,94,96,97,98,99,2000,01 Free Software Foundation, Inc.
+   Copyright (C) 1993,94,96,97,98,99,2000,01,04 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
@@ -153,7 +153,7 @@
 #define	F_SETFD		2	/* Set file descriptor flags.  */
 #define	F_GETFL		3	/* Get file status flags.  */
 #define	F_SETFL		4	/* Set file status flags.  */
-#if defined __USE_BSD || defined __USE_XOPEN2K
+#if defined __USE_BSD || defined __USE_UNIX98
 # define F_GETOWN	5	/* Get owner (receiver of SIGIO).  */
 # define F_SETOWN	6	/* Set owner (receiver of SIGIO).  */
 #endif
diff --git a/sysdeps/powerpc/powerpc64/fpu/s_ceil.S b/sysdeps/powerpc/powerpc64/fpu/s_ceil.S
new file mode 100644
index 0000000000..127f302666
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/fpu/s_ceil.S
@@ -0,0 +1,60 @@
+/* ceil function.  PowerPC64 version.
+   Copyright (C) 2004 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 Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 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
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <sysdep.h>
+
+	.section	".toc","aw"
+.LC0:	/* 2**52 */
+	.tc FD_43300000_0[TC],0x4330000000000000
+.LC1:	/* -0.0 */
+	.tc FD_80000000_0[TC],0x8000000000000000
+	.section	".text"
+
+ENTRY (__ceil)
+	mffs	fp11		/* Save current FPU rounding mode.  */
+	lfd	fp13,.LC0@toc(2)
+	fabs	fp0,fp1
+	fsub	fp12,fp13,fp13	/* generate 0.0  */
+	fcmpu	cr7,fp0,fp13	/* if (fabs(x) > TWO52)  */
+	fcmpu	cr6,fp1,fp12	/* if (x > 0.0)  */
+	bnllr-	cr7
+	mtfsfi	7,2		/* Set rounding mode toward +inf.  */
+	ble-	cr6,.L4
+	fadd	fp1,fp1,fp13	/* x+= TWO52;  */
+	fsub	fp1,fp1,fp13	/* x-= TWO52;  */
+.L9:	
+	mtfsf	0x01,fp11	/* restore previous rounding mode.  */
+	blr
+.L4:
+	bge-	cr6,.L9		/* if (x < 0.0)  */
+	fsub	fp1,fp1,fp13	/* x-= TWO52;  */
+	fadd	fp1,fp1,fp13	/* x+= TWO52;  */
+	fcmpu	cr5,fp1,fp12	/* if (x > 0.0)  */
+	mtfsf	0x01,fp11	/* restore previous rounding mode.  */
+	bnelr+	cr5
+	lfd	fp1,.LC1@toc(2)	/* x must be -0.0 for the 0.0 case.  */	
+	blr
+	END (__ceil)
+
+weak_alias (__ceil, ceil)
+
+#ifdef NO_LONG_DOUBLE
+weak_alias (__ceil, ceill)
+strong_alias (__ceil, __ceill)
+#endif
diff --git a/sysdeps/powerpc/powerpc64/fpu/s_ceilf.S b/sysdeps/powerpc/powerpc64/fpu/s_ceilf.S
new file mode 100644
index 0000000000..34f61423cc
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/fpu/s_ceilf.S
@@ -0,0 +1,56 @@
+/* float ceil function.  PowerPC64 version.
+   Copyright (C) 2004 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 Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 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
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <sysdep.h>
+
+	.section	".toc","aw"
+.LC0:	/* 2**23 */
+	.tc FD_41600000_0[TC],0x4160000000000000
+.LC1:	/* -0.0 */
+	.tc FD_80000000_0[TC],0x8000000000000000
+	.section	".text"
+
+ENTRY (__ceilf)
+	mffs	fp11		/* Save current FPU rounding mode.  */
+	lfd	fp13,.LC0@toc(2)
+	fabs	fp0,fp1
+	fsubs	fp12,fp13,fp13	/* generate 0.0  */
+	fcmpu	cr7,fp0,fp13	/* if (fabs(x) > TWO23)  */
+	fcmpu	cr6,fp1,fp12	/* if (x > 0.0)  */
+	bnllr-	cr7
+	mtfsfi	7,2		/* Set rounding mode toward +inf.  */
+	ble-	cr6,.L4
+	fadds	fp1,fp1,fp13	/* x+= TWO23;  */
+	fsubs	fp1,fp1,fp13	/* x-= TWO23;  */
+.L9:	
+	mtfsf	0x01,fp11	/* restore previous rounding mode.  */
+	blr
+.L4:
+	bge-	cr6,.L9		/* if (x < 0.0)  */
+	fsubs	fp1,fp1,fp13	/* x-= TWO23;  */
+	fadds	fp1,fp1,fp13	/* x+= TWO23;  */
+	fcmpu	cr5,fp1,fp12	/* if (x > 0.0)  */
+	mtfsf	0x01,fp11	/* restore previous rounding mode.  */
+	bnelr+	cr5
+	lfd	fp1,.LC1@toc(2)	/* x must be -0.0 for the 0.0 case.  */	
+	blr
+	END (__ceilf)
+
+weak_alias (__ceilf, ceilf)
+
diff --git a/sysdeps/powerpc/powerpc64/fpu/s_floor.S b/sysdeps/powerpc/powerpc64/fpu/s_floor.S
new file mode 100644
index 0000000000..57fd63cd66
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/fpu/s_floor.S
@@ -0,0 +1,58 @@
+/* Floor function.  PowerPC64 version.
+   Copyright (C) 2004 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 Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 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
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <sysdep.h>
+
+	.section	".toc","aw"
+.LC0:	/* 2**52 */
+	.tc FD_43300000_0[TC],0x4330000000000000
+	.section	".text"
+
+ENTRY (__floor)
+	mffs	fp11		/* Save current FPU rounding mode.  */
+	lfd	fp13,.LC0@toc(2)
+	fabs	fp0,fp1
+	fsub	fp12,fp13,fp13	/* generate 0.0  */
+	fcmpu	cr7,fp0,fp13	/* if (fabs(x) > TWO52)  */
+	fcmpu	cr6,fp1,fp12	/* if (x > 0.0)  */
+	bnllr-	cr7
+	mtfsfi	7,3		/* Set rounding mode toward -inf.  */
+	ble-	cr6,.L4
+	fadd	fp1,fp1,fp13	/* x+= TWO52;  */
+	fsub	fp1,fp1,fp13	/* x-= TWO52;  */
+	fcmpu	cr5,fp1,fp12	/* if (x > 0.0)  */
+	mtfsf	0x01,fp11	/* restore previous rounding mode.  */
+	bnelr+	cr5
+	fmr	fp1,fp12	/* x must be +0.0 for the 0.0 case.  */
+	blr
+.L4:
+	bge-	cr6,.L9		/* if (x < 0.0)  */
+	fsub	fp1,fp1,fp13	/* x-= TWO52;  */
+	fadd	fp1,fp1,fp13	/* x+= TWO52;  */
+.L9:
+	mtfsf	0x01,fp11	/* restore previous rounding mode.  */	
+	blr
+	END (__floor)
+
+weak_alias (__floor, floor)
+
+#ifdef NO_LONG_DOUBLE
+weak_alias (__floor, floorl)
+strong_alias (__floor, __floorl)
+#endif
diff --git a/sysdeps/powerpc/powerpc64/fpu/s_floorf.S b/sysdeps/powerpc/powerpc64/fpu/s_floorf.S
new file mode 100644
index 0000000000..cde92b9174
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/fpu/s_floorf.S
@@ -0,0 +1,54 @@
+/* float Floor function.  PowerPC64 version.
+   Copyright (C) 2004 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 Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 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
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <sysdep.h>
+
+	.section	".toc","aw"
+.LC0:	/* 2**23 */
+	.tc FD_41600000_0[TC],0x4160000000000000
+	.section	".text"
+
+ENTRY (__floorf)
+	mffs	fp11		/* Save current FPU rounding mode.  */
+	lfd	fp13,.LC0@toc(2)
+	fabs	fp0,fp1
+	fsubs	fp12,fp13,fp13	/* generate 0.0  */
+	fcmpu	cr7,fp0,fp13	/* if (fabs(x) > TWO23)  */
+	fcmpu	cr6,fp1,fp12	/* if (x > 0.0)  */
+	bnllr-	cr7
+	mtfsfi	7,3		/* Set rounding mode toward -inf.  */
+	ble-	cr6,.L4
+	fadds	fp1,fp1,fp13	/* x+= TWO23;  */
+	fsubs	fp1,fp1,fp13	/* x-= TWO23;  */
+	fcmpu	cr5,fp1,fp12	/* if (x > 0.0)  */
+	mtfsf	0x01,fp11	/* restore previous rounding mode.  */
+	bnelr+	cr5
+	fmr	fp1,fp12	/* x must be +0.0 for the 0.0 case.  */
+	blr
+.L4:
+	bge-	cr6,.L9		/* if (x < 0.0)  */
+	fsubs	fp1,fp1,fp13	/* x-= TWO23;  */
+	fadds	fp1,fp1,fp13	/* x+= TWO23;  */
+.L9:
+	mtfsf	0x01,fp11	/* restore previous rounding mode.  */	
+	blr
+	END (__floorf)
+
+weak_alias (__floorf, floorf)
+
diff --git a/sysdeps/powerpc/powerpc64/fpu/s_llrint.c b/sysdeps/powerpc/powerpc64/fpu/s_llrint.S
index f6ea3f4e0f..bc976a7edb 100644
--- a/sysdeps/powerpc/powerpc64/fpu/s_llrint.c
+++ b/sysdeps/powerpc/powerpc64/fpu/s_llrint.S
@@ -1,5 +1,5 @@
-/* Round a double value to a long long in the current rounding mode.
-   Copyright (C) 1997, 2004 Free Software Foundation, Inc.
+/* Round double to long int.  PowerPC64 version.
+   Copyright (C) 2004 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
@@ -17,27 +17,23 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
-/* Kludge to avoid decls that will confuse strong_alias below.  */
-#define __lrint XXX__lrint
-#define __lrintl XXX__lrintl
-#define lrint XXXlrint
-#define lrintl XXXlrintl
+#include <sysdep.h>
 
-#include "math.h"
+/* long long int[r3] __llrint (double x[fp1])  */
+ENTRY (__llrint)	
+	fctid	fp13,fp1
+	stfd	fp13,-16(r1)
+	nop	/* Insure the following load is in a different dispatch group */
+	nop	/* to avoid pipe stall on POWER4&5.  */
+	nop
+	ld	r3,-16(r1)	
+	blr
+	END (__llrint)
 
-#undef __lrint
-#undef __lrintl
-#undef lrint
-#undef lrintl
-
-long long int
-__llrint (double x)
-{
-  return (long long int) __rint (x);
-}
 strong_alias (__llrint, __lrint)
 weak_alias (__llrint, llrint)
 weak_alias (__lrint, lrint)
+
 #ifdef NO_LONG_DOUBLE
 strong_alias (__llrint, __llrintl)
 weak_alias (__llrint, llrintl)
diff --git a/sysdeps/powerpc/powerpc64/fpu/s_llrintf.c b/sysdeps/powerpc/powerpc64/fpu/s_llrintf.S
index 7d8e22a700..aef84de831 100644
--- a/sysdeps/powerpc/powerpc64/fpu/s_llrintf.c
+++ b/sysdeps/powerpc/powerpc64/fpu/s_llrintf.S
@@ -1,5 +1,5 @@
-/* Round a float value to a long long in the current rounding mode.
-   Copyright (C) 1997, 2004 Free Software Foundation, Inc.
+/* Round double to long int.  PowerPC64 version.
+   Copyright (C) 2004 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
@@ -17,20 +17,20 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
-/* Kludge to avoid decls that will confuse strong_alias below.  */
-#define __lrintf XXX__lrintf
-#define lrintf XXXlrintf
+#include <sysdep.h>
 
-#include "math.h"
+/* long long int[r3] __llrintf (float x[fp1])  */
+ENTRY (__llrintf)	
+	fctid	fp13,fp1
+	stfd	fp13,-16(r1)
+	nop	/* Insure the following load is in a different dispatch group */
+	nop	/* to avoid pipe stall on POWER4&5.  */
+	nop
+	ld	r3,-16(r1)	
+	blr
+	END (__llrintf)
 
-#undef __lrintf
-#undef lrintf
-
-long long int
-__llrintf (float x)
-{
-  return (long long int) __rintf (x);
-}
 strong_alias (__llrintf, __lrintf)
 weak_alias (__llrintf, llrintf)
 weak_alias (__lrintf, lrintf)
+
diff --git a/sysdeps/powerpc/powerpc64/fpu/s_llround.S b/sysdeps/powerpc/powerpc64/fpu/s_llround.S
new file mode 100644
index 0000000000..320ef0f6d8
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/fpu/s_llround.S
@@ -0,0 +1,67 @@
+/* llround function.  PowerPC64 version.
+   Copyright (C) 2004 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 Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 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
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <sysdep.h>
+
+	.section	".toc","aw"
+.LC0:	/* -0.0 */
+	.tc FD_00000000_0[TC],0x0000000000000000
+.LC1:	/* 0.5 */
+	.tc FD_3fe00000_0[TC],0x3fe0000000000000
+	.section	".text"
+	
+/* long long [r3] llround (float x [fp1])
+   IEEE 1003.1 llround function.  IEEE specifies "round to the nearest 
+   integer value, rounding halfway cases away from zero, regardless of
+   the current rounding mode."  However PowerPC Architecture defines
+   "round to Nearest" as "Choose the best approximation. In case of a 
+   tie, choose the one that is even (least significant bit o).". 
+   So we can't use the PowerPC "round to Nearest" mode. Instead we set
+   "round toward Zero" mode and round by adding +-0.5 before rounding
+   to the integer value.  */
+
+ENTRY (__llround)
+	lfd	fp12,.LC0@toc(2)
+	lfd	fp10,.LC1@toc(2)
+	fcmpu	cr6,fp1,fp12	/* if (x > 0.0)  */
+	ble-	cr6,.L4
+	fadd	fp1,fp1,fp10	/* x+= 0.5;  */
+.L9:
+	fctidz	fp2,fp1		/* Convert To Integer DW llround toward 0.  */
+	stfd	fp2,-16(r1)
+	nop	/* Insure the following load is in a different dispatch group */
+	nop	/* to avoid pipe stall on POWER4&5.  */
+	nop
+	ld	r3,-16(r1)
+	blr
+.L4:
+	fsub	fp1,fp1,fp10	/* x-= 0.5;  */
+	b	.L9
+	END (__llround)
+
+strong_alias (__llround, __lround)
+weak_alias (__llround, llround)
+weak_alias (__lround, lround)
+
+#ifdef NO_LONG_DOUBLE
+weak_alias (__llround, llroundl)
+strong_alias (__llround, __llroundl)
+weak_alias (__lround, lroundl)
+strong_alias (__lround, __lroundl)
+#endif
diff --git a/sysdeps/powerpc/powerpc64/fpu/s_llroundf.S b/sysdeps/powerpc/powerpc64/fpu/s_llroundf.S
new file mode 100644
index 0000000000..ff923056b1
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/fpu/s_llroundf.S
@@ -0,0 +1,59 @@
+/* llroundf function.  PowerPC64 version.
+   Copyright (C) 2004 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 Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 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
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <sysdep.h>
+
+	.section	".toc","aw"
+.LC0:	/* -0.0 */
+	.tc FD_00000000_0[TC],0x0000000000000000
+.LC1:	/* 0.5 */
+	.tc FD_3fe00000_0[TC],0x3fe0000000000000
+	.section	".text"
+	
+/* long long [r3] llroundf (float x [fp1])
+   IEEE 1003.1 llroundf function.  IEEE specifies "roundf to the nearest 
+   integer value, roundfing halfway cases away from zero, regardless of
+   the current roundfing mode."  However PowerPC Architecture defines
+   "roundf to Nearest" as "Choose the best approximation. In case of a 
+   tie, choose the one that is even (least significant bit o).". 
+   So we can't use the PowerPC "round to Nearest" mode. Instead we set
+   "round toward Zero" mode and round by adding +-0.5 before rounding
+   to the integer value.  */
+
+ENTRY (__llroundf)
+	lfd	fp12,.LC0@toc(2)
+	lfd	fp10,.LC1@toc(2)
+	fcmpu	cr6,fp1,fp12	/* if (x < 0.0)  */
+	fsubs	fp3,fp1,fp10	/* x-= 0.5;  */
+	ble-	cr6,.L9
+	fadds	fp3,fp1,fp10	/* x+= 0.5;  */
+.L9:
+	fctidz	fp2,fp3		/* Convert To Integer DW round toward 0.  */
+	stfd	fp2,-16(r1)
+	nop	/* Insure the following load is in a different dispatch group */
+	nop	/* to avoid pipe stall on POWER4&5.  */
+	nop
+	ld	r3,-16(r1)
+	blr
+	END (__llroundf)
+
+strong_alias (__llroundf, __lroundf)
+weak_alias (__llroundf, llroundf)
+weak_alias (__lroundf, lroundf)
+
diff --git a/sysdeps/powerpc/powerpc64/fpu/s_lround.S b/sysdeps/powerpc/powerpc64/fpu/s_lround.S
new file mode 100644
index 0000000000..883bba1c5d
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/fpu/s_lround.S
@@ -0,0 +1,2 @@
+/* __lround is in s_llround.S  */
+/* __lround is in s_llround.S  */
diff --git a/sysdeps/powerpc/powerpc64/fpu/s_lroundf.S b/sysdeps/powerpc/powerpc64/fpu/s_lroundf.S
new file mode 100644
index 0000000000..15506f6801
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/fpu/s_lroundf.S
@@ -0,0 +1,2 @@
+/* __lroundf is in s_llroundf.S  */
+/* __lroundf is in s_llroundf.S  */
diff --git a/sysdeps/powerpc/powerpc64/fpu/s_rint.S b/sysdeps/powerpc/powerpc64/fpu/s_rint.S
new file mode 100644
index 0000000000..f7db7ff80a
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/fpu/s_rint.S
@@ -0,0 +1,54 @@
+/* Round to int floating-point values.  PowerPC64 version.
+   Copyright (C) 2004 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 Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 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
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+/* This has been coded in assembler because GCC makes such a mess of it
+   when it's coded in C.  */
+
+#include <sysdep.h>
+
+	.section	".toc","aw"
+.LC0:	/* 2**52 */
+	.tc FD_43300000_0[TC],0x4330000000000000
+	.section	".text"
+
+ENTRY (__rint)
+	lfd	fp13,.LC0@toc(2)
+	fabs	fp0,fp1
+	fsub	fp12,fp13,fp13	/* generate 0.0  */
+	fcmpu	cr7,fp0,fp13	/* if (fabs(x) > TWO52)  */
+	fcmpu	cr6,fp1,fp12	/* if (x > 0.0)  */
+	bnllr-	cr7
+	bng-	cr6,.L4
+	fadd	fp1,fp1,fp13	/* x+= TWO52;  */
+	fsub	fp1,fp1,fp13	/* x-= TWO52;  */
+	blr
+.L4:
+	bnllr-	cr6		/* if (x < 0.0)  */
+	fsub	fp1,fp13,fp1	/* x = TWO52 - x;  */
+	fsub	fp0,fp1,fp13	/* x = - (x - TWO52);  */
+	fneg	fp1,fp0
+	blr
+	END (__rint)
+
+weak_alias (__rint, rint)
+
+#ifdef NO_LONG_DOUBLE
+weak_alias (__rint, rintl)
+strong_alias (__rint, __rintl)
+#endif
diff --git a/sysdeps/powerpc/powerpc64/fpu/s_rintf.S b/sysdeps/powerpc/powerpc64/fpu/s_rintf.S
new file mode 100644
index 0000000000..de6d654796
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/fpu/s_rintf.S
@@ -0,0 +1,47 @@
+/* Round float to int floating-point values.  PowerPC64 version.
+   Copyright (C) 2004 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 Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 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
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <sysdep.h>
+
+	.section	".toc","aw"
+.LC0:	/* 2**23 */
+	.tc FD_41600000_0[TC],0x4160000000000000
+	.section	".text"
+
+ENTRY (__rintf)
+	lfd	fp13,.LC0@toc(2)
+	fabs	fp0,fp1
+	fsubs	fp12,fp13,fp13	/* generate 0.0  */
+	fcmpu	cr7,fp0,fp13	/* if (fabs(x) > TWO23)  */
+	fcmpu	cr6,fp1,fp12	/* if (x > 0.0)  */
+	bnllr-	cr7
+	bng-	cr6,.L4
+	fadds	fp1,fp1,fp13	/* x+= TWO23;  */
+	fsubs	fp1,fp1,fp13	/* x-= TWO23;  */
+	blr
+.L4:
+	bnllr-	cr6		/* if (x < 0.0)  */
+	fsubs	fp1,fp13,fp1	/* x = TWO23 - x;  */
+	fsubs	fp0,fp1,fp13	/* x = - (x - TWO23);  */
+	fneg	fp1,fp0
+	blr
+	END (__rintf)
+
+weak_alias (__rintf, rintf)
+
diff --git a/sysdeps/powerpc/powerpc64/fpu/s_round.S b/sysdeps/powerpc/powerpc64/fpu/s_round.S
new file mode 100644
index 0000000000..1c2e5299e5
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/fpu/s_round.S
@@ -0,0 +1,75 @@
+/* round function.  PowerPC64 version.
+   Copyright (C) 2004 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 Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 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
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <sysdep.h>
+
+	.section	".toc","aw"
+.LC0:	/* 2**52 */
+	.tc FD_43300000_0[TC],0x4330000000000000
+.LC1:	/* 0.5 */
+	.tc FD_3fe00000_0[TC],0x3fe0000000000000
+.LC2:	/* -0.0 */
+	.tc FD_80000000_0[TC],0x8000000000000000
+	.section	".text"
+	
+/* double [fp1] round (double x [fp1])
+   IEEE 1003.1 round function.  IEEE specifies "round to the nearest 
+   integer value, rounding halfway cases away from zero, regardless of
+   the current rounding mode."  However PowerPC Architecture defines
+   "Round to Nearest" as "Choose the best approximation. In case of a 
+   tie, choose the one that is even (least significant bit o).". 
+   So we can't use the PowerPC "Round to Nearest" mode. Instead we set
+   "Round toward Zero" mode and round by adding +-0.5 before rounding
+   to the integer value.  */
+
+ENTRY (__round)
+	mffs	fp11		/* Save current FPU rounding mode.  */
+	lfd	fp13,.LC0@toc(2)
+	fabs	fp0,fp1
+	fsub	fp12,fp13,fp13	/* generate 0.0  */
+	fcmpu	cr7,fp0,fp13	/* if (fabs(x) > TWO52)  */
+	fcmpu	cr6,fp1,fp12	/* if (x > 0.0)  */
+	bnllr-	cr7
+	mtfsfi	7,1		/* Set rounding mode toward 0.  */
+	lfd	fp10,.LC1@toc(2)
+	ble-	cr6,.L4
+	fadd	fp1,fp1,fp10	/* x+= 0.5;  */
+	fadd	fp1,fp1,fp13	/* x+= TWO52;  */
+	fsub	fp1,fp1,fp13	/* x-= TWO52;  */
+.L9:	
+	mtfsf	0x01,fp11	/* restore previous rounding mode.  */
+	blr
+.L4:
+	fsub	fp9,fp1,fp10	/* x+= 0.5;  */
+	bge-	cr6,.L9		/* if (x < 0.0)  */
+	fsub	fp1,fp9,fp13	/* x-= TWO52;  */
+	fadd	fp1,fp1,fp13	/* x+= TWO52;  */
+	fcmpu	cr5,fp1,fp12	/* if (x > 0.0)  */
+	mtfsf	0x01,fp11	/* restore previous rounding mode.  */
+	bnelr+	cr5
+	lfd	fp1,.LC2@toc(2)	/* x must be -0.0 for the 0.0 case.  */	
+	blr
+	END (__round)
+
+weak_alias (__round, round)
+
+#ifdef NO_LONG_DOUBLE
+weak_alias (__round, roundl)
+strong_alias (__round, __roundl)
+#endif
diff --git a/sysdeps/powerpc/powerpc64/fpu/s_roundf.S b/sysdeps/powerpc/powerpc64/fpu/s_roundf.S
new file mode 100644
index 0000000000..fd8eb0aea3
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/fpu/s_roundf.S
@@ -0,0 +1,71 @@
+/* roundf  function.  PowerPC64 version.
+   Copyright (C) 2004 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 Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 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
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <sysdep.h>
+
+	.section	".toc","aw"
+.LC0:	/* 2**23 */
+	.tc FD_41600000_0[TC],0x4160000000000000
+.LC1:	/* 0.5 */
+	.tc FD_3fe00000_0[TC],0x3fe0000000000000
+.LC2:	/* -0.0 */
+	.tc FD_80000000_0[TC],0x8000000000000000
+	.section	".text"
+	
+/* float [fp1] roundf  (float x [fp1])
+   IEEE 1003.1 round function.  IEEE specifies "round to the nearest 
+   integer value, rounding halfway cases away from zero, regardless of
+   the current rounding mode."  However PowerPC Architecture defines
+   "Round to Nearest" as "Choose the best approximation. In case of a 
+   tie, choose the one that is even (least significant bit o).". 
+   So we can't use the PowerPC "Round to Nearest" mode. Instead we set
+   "Round toward Zero" mode and round by adding +-0.5 before rounding
+   to the integer value.  */
+
+ENTRY (__roundf )
+	mffs	fp11		/* Save current FPU rounding mode.  */
+	lfd	fp13,.LC0@toc(2)
+	fabs	fp0,fp1
+	fsubs	fp12,fp13,fp13	/* generate 0.0  */
+	fcmpu	cr7,fp0,fp13	/* if (fabs(x) > TWO23)  */
+	fcmpu	cr6,fp1,fp12	/* if (x > 0.0)  */
+	bnllr-	cr7
+	mtfsfi	7,1		/* Set rounding mode toward 0.  */
+	lfd	fp10,.LC1@toc(2)
+	ble-	cr6,.L4
+	fadds	fp1,fp1,fp10	/* x+= 0.5;  */
+	fadds	fp1,fp1,fp13	/* x+= TWO23;  */
+	fsubs	fp1,fp1,fp13	/* x-= TWO23;  */
+.L9:	
+	mtfsf	0x01,fp11	/* restore previous rounding mode.  */
+	blr
+.L4:
+	fsubs	fp9,fp1,fp10	/* x+= 0.5;  */
+	bge-	cr6,.L9		/* if (x < 0.0)  */
+	fsubs	fp1,fp9,fp13	/* x-= TWO23;  */
+	fadds	fp1,fp1,fp13	/* x+= TWO23;  */
+	fcmpu	cr5,fp1,fp12	/* if (x > 0.0)  */
+	mtfsf	0x01,fp11	/* restore previous rounding mode.  */
+	bnelr+	cr5
+	lfd	fp1,.LC2@toc(2)	/* x must be -0.0 for the 0.0 case.  */	
+	blr
+	END (__roundf)
+
+weak_alias (__roundf, roundf)
+
diff --git a/sysdeps/powerpc/powerpc64/fpu/s_trunc.S b/sysdeps/powerpc/powerpc64/fpu/s_trunc.S
new file mode 100644
index 0000000000..dc345ab424
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/fpu/s_trunc.S
@@ -0,0 +1,67 @@
+/* trunc function.  PowerPC64 version.
+   Copyright (C) 2004 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 Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 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
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <sysdep.h>
+
+	.section	".toc","aw"
+.LC0:	/* 2**52 */
+	.tc FD_43300000_0[TC],0x4330000000000000
+.LC2:	/* -0.0 */
+	.tc FD_80000000_0[TC],0x8000000000000000
+	.section	".text"
+	
+/* double [fp1] trunc (double x [fp1])
+   IEEE 1003.1 trunc function.  IEEE specifies "trunc to the integer
+   value, in floating format, nearest to but no larger in magnitude 
+   then the argument."
+   We set "round toward Zero" mode and trunc by adding +-2**52 then
+   subtracting +-2**52.  */
+
+ENTRY (__trunc)
+	mffs	fp11		/* Save current FPU rounding mode.  */
+	lfd	fp13,.LC0@toc(2)
+	fabs	fp0,fp1
+	fsub	fp12,fp13,fp13	/* generate 0.0  */
+	fcmpu	cr7,fp0,fp13	/* if (fabs(x) > TWO52)  */
+	fcmpu	cr6,fp1,fp12	/* if (x > 0.0)  */
+	bnllr-	cr7
+	mtfsfi	7,1		/* Set rounding toward 0 mode.  */
+	ble-	cr6,.L4
+	fadd	fp1,fp1,fp13	/* x+= TWO52;  */
+	fsub	fp1,fp1,fp13	/* x-= TWO52;  */
+.L9:	
+	mtfsf	0x01,fp11	/* restore previous truncing mode.  */
+	blr
+.L4:
+	bge-	cr6,.L9		/* if (x < 0.0)  */
+	fsub	fp1,fp1,fp13	/* x-= TWO52;  */
+	fadd	fp1,fp1,fp13	/* x+= TWO52;  */
+	fcmpu	cr5,fp1,fp12	/* if (x > 0.0)  */
+	mtfsf	0x01,fp11	/* restore previous rounding mode.  */
+	bnelr+	cr5
+	lfd	fp1,.LC2@toc(2)	/* x must be -0.0 for the 0.0 case.  */	
+	blr
+	END (__trunc)
+
+weak_alias (__trunc, trunc)
+
+#ifdef NO_LONG_DOUBLE
+weak_alias (__trunc, truncl)
+strong_alias (__trunc, __truncl)
+#endif
diff --git a/sysdeps/powerpc/powerpc64/fpu/s_truncf.S b/sysdeps/powerpc/powerpc64/fpu/s_truncf.S
new file mode 100644
index 0000000000..727647f6de
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/fpu/s_truncf.S
@@ -0,0 +1,63 @@
+/* truncf function.  PowerPC64 version.
+   Copyright (C) 2004 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 Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 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
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <sysdep.h>
+
+	.section	".toc","aw"
+.LC0:	/* 2**23 */
+	.tc FD_41600000_0[TC],0x4160000000000000
+.LC2:	/* -0.0 */
+	.tc FD_80000000_0[TC],0x8000000000000000
+	.section	".text"
+	
+/* float [fp1] truncf (float x [fp1])
+   IEEE 1003.1 trunc function.  IEEE specifies "trunc to the integer
+   value, in floating format, nearest to but no larger in magnitude 
+   then the argument."
+   We set "round toward Zero" mode and trunc by adding +-2**23 then
+   subtracting +-2**23.  */
+
+ENTRY (__truncf)
+	mffs	fp11		/* Save current FPU rounding mode.  */
+	lfd	fp13,.LC0@toc(2)
+	fabs	fp0,fp1
+	fsubs	fp12,fp13,fp13	/* generate 0.0  */
+	fcmpu	cr7,fp0,fp13	/* if (fabs(x) > TWO23)  */
+	fcmpu	cr6,fp1,fp12	/* if (x > 0.0)  */
+	bnllr-	cr7
+	mtfsfi	7,1		/* Set rounding toward 0 mode.  */
+	ble-	cr6,.L4
+	fadds	fp1,fp1,fp13	/* x+= TWO23;  */
+	fsubs	fp1,fp1,fp13	/* x-= TWO23;  */
+.L9:	
+	mtfsf	0x01,fp11	/* restore previous truncing mode.  */
+	blr
+.L4:
+	bge-	cr6,.L9		/* if (x < 0.0)  */
+	fsubs	fp1,fp1,fp13	/* x-= TWO23;  */
+	fadds	fp1,fp1,fp13	/* x+= TWO23;  */
+	fcmpu	cr5,fp1,fp12	/* if (x > 0.0)  */
+	mtfsf	0x01,fp11	/* restore previous rounding mode.  */
+	bnelr+	cr5
+	lfd	fp1,.LC2@toc(2)	/* x must be -0.0 for the 0.0 case.  */	
+	blr
+	END (__truncf)
+
+weak_alias (__truncf, truncf)
+
diff --git a/sysdeps/unix/bsd/bits/fcntl.h b/sysdeps/unix/bsd/bits/fcntl.h
index 4081b4d0db..c992f93ef8 100644
--- a/sysdeps/unix/bsd/bits/fcntl.h
+++ b/sysdeps/unix/bsd/bits/fcntl.h
@@ -1,5 +1,5 @@
 /* O_*, F_*, FD_* bit values for 4.3 BSD.
-   Copyright (C) 1991, 1992, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1991, 1992, 1997, 2004 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
@@ -85,7 +85,7 @@
 #define	F_SETFD		2	/* Set file descriptor flags.  */
 #define	F_GETFL		3	/* Get file status flags.  */
 #define	F_SETFL		4	/* Set file status flags.  */
-#ifdef __USE_BSD
+#if defined __USE_BSD || defined __USE_UNIX98
 # define F_GETOWN	5	/* Get owner (receiver of SIGIO).  */
 # define F_SETOWN	6	/* Set owner (receiver of SIGIO).  */
 #endif
diff --git a/sysdeps/unix/bsd/bsd4.4/bits/fcntl.h b/sysdeps/unix/bsd/bsd4.4/bits/fcntl.h
index a5bfd7c825..47a67e38e4 100644
--- a/sysdeps/unix/bsd/bsd4.4/bits/fcntl.h
+++ b/sysdeps/unix/bsd/bsd4.4/bits/fcntl.h
@@ -1,5 +1,5 @@
 /* O_*, F_*, FD_* bit values for 4.4 BSD.
-   Copyright (C) 1991, 1992, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1991, 1992, 1997, 2004 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
@@ -82,7 +82,7 @@
 #define	F_SETFD		2	/* Set file descriptor flags.  */
 #define	F_GETFL		3	/* Get file status flags.  */
 #define	F_SETFL		4	/* Set file status flags.  */
-#ifdef __USE_BSD
+#if defined __USE_BSD || defined __USE_UNIX98
 #define	F_GETOWN	5	/* Get owner (receiver of SIGIO).  */
 #define	F_SETOWN	6	/* Set owner (receiver of SIGIO).  */
 #endif
diff --git a/sysdeps/unix/bsd/sun/sunos4/bits/fcntl.h b/sysdeps/unix/bsd/sun/sunos4/bits/fcntl.h
index e09fa333e5..a30b352592 100644
--- a/sysdeps/unix/bsd/sun/sunos4/bits/fcntl.h
+++ b/sysdeps/unix/bsd/sun/sunos4/bits/fcntl.h
@@ -1,5 +1,5 @@
 /* O_*, F_*, FD_* bit values for SunOS 4.
-   Copyright (C) 1991, 1992, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1991, 1992, 1997, 2004 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
@@ -86,7 +86,7 @@
 #define	F_SETFD		2	/* Set file descriptor flags.  */
 #define	F_GETFL		3	/* Get file status flags.  */
 #define	F_SETFL		4	/* Set file status flags.  */
-#ifdef __USE_BSD
+#if defined __USE_BSD || defined __USE_UNIX98
 #define	F_GETOWN	5	/* Get owner (receiver of SIGIO).  */
 #define	F_SETOWN	6	/* Set owner (receiver of SIGIO).  */
 #endif
diff --git a/sysdeps/unix/bsd/ultrix4/bits/fcntl.h b/sysdeps/unix/bsd/ultrix4/bits/fcntl.h
index 9dbd7ba269..6392bc3415 100644
--- a/sysdeps/unix/bsd/ultrix4/bits/fcntl.h
+++ b/sysdeps/unix/bsd/ultrix4/bits/fcntl.h
@@ -1,5 +1,5 @@
 /* O_*, F_*, FD_* bit values for Ultrix 4.
-   Copyright (C) 1991, 1992, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1991, 1992, 1997, 2004 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
@@ -87,7 +87,7 @@
 #define	F_SETFD		2	/* Set file descriptor flags.  */
 #define	F_GETFL		3	/* Get file status flags.  */
 #define	F_SETFL		4	/* Set file status flags.  */
-#ifdef __USE_BSD
+#if defined __USE_BSD || defined __USE_UNIX98
 #define	F_GETOWN	5	/* Get owner (receiver of SIGIO).  */
 #define	F_SETOWN	6	/* Set owner (receiver of SIGIO).  */
 #endif
diff --git a/sysdeps/unix/common/bits/fcntl.h b/sysdeps/unix/common/bits/fcntl.h
index 2918cea5f2..5bf6791b54 100644
--- a/sysdeps/unix/common/bits/fcntl.h
+++ b/sysdeps/unix/common/bits/fcntl.h
@@ -1,5 +1,6 @@
 /* O_*, F_*, FD_* bit values for general Unix system.
-   Copyright (C) 1991, 1992, 1995, 1997, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1991, 1992, 1995, 1997, 2000, 2004
+   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
@@ -79,7 +80,7 @@
 #define	F_SETFD		2	/* Set file descriptor flags.  */
 #define	F_GETFL		3	/* Get file status flags.  */
 #define	F_SETFL		4	/* Set file status flags.  */
-#if defined __USE_BSD || defined __USE_XOPEN2K
+#if defined __USE_BSD || defined __USE_UNIX98
 # define F_GETOWN	23	/* Get owner (receiver of SIGIO).  */
 # define F_SETOWN	24	/* Set owner (receiver of SIGIO).  */
 #endif
diff --git a/sysdeps/unix/sysv/aix/bits/fcntl.h b/sysdeps/unix/sysv/aix/bits/fcntl.h
index 28a8fae0f2..c65b8beeb4 100644
--- a/sysdeps/unix/sysv/aix/bits/fcntl.h
+++ b/sysdeps/unix/sysv/aix/bits/fcntl.h
@@ -1,5 +1,5 @@
 /* O_*, F_*, FD_* bit values for Linux.
-   Copyright (C) 1995-1999, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1995-1999, 2000, 2004 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
@@ -74,7 +74,7 @@
 # define F_SETLKW64     13	/* Set record locking info (blocking).  */
 #endif
 
-#if defined __USE_BSD || defined __USE_XOPEN2K
+#if defined __USE_BSD || defined __USE_UNIX98
 # define F_SETOWN	8	/* Get owner of socket (receiver of SIGIO).  */
 # define F_GETOWN	9	/* Set owner of socket (receiver of SIGIO).  */
 #endif
diff --git a/sysdeps/unix/sysv/irix4/bits/fcntl.h b/sysdeps/unix/sysv/irix4/bits/fcntl.h
index dcba25fbc8..5eb7c76eb7 100644
--- a/sysdeps/unix/sysv/irix4/bits/fcntl.h
+++ b/sysdeps/unix/sysv/irix4/bits/fcntl.h
@@ -1,5 +1,5 @@
 /* O_*, F_*, FD_* bit values for SGI Irix 4.
-   Copyright (C) 1994, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1994, 1997, 2004 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
@@ -67,6 +67,8 @@
 #define F_RGETLK        20      /* Get info on a remote lock.  */
 #define F_RSETLK        21      /* Set or unlock a remote lock.  */
 #define F_RSETLKW       22      /* Set or unlock a remote lock and wait.  */
+#endif
+#if defined __USE_BSD || defined __USE_UNIX98
 #define F_GETOWN        10      /* Get owner; only works on sockets.  */
 #define F_SETOWN        11      /* Set owner; only works on sockets.  */
 #endif
diff --git a/sysdeps/unix/sysv/linux/Versions b/sysdeps/unix/sysv/linux/Versions
index 0fa782a0d7..980724e519 100644
--- a/sysdeps/unix/sysv/linux/Versions
+++ b/sysdeps/unix/sysv/linux/Versions
@@ -116,9 +116,6 @@ libc {
     sched_getaffinity; sched_setaffinity;
   }
   GLIBC_PRIVATE {
-    # needed by libpthread.
-    __libc_sigaction;
-
     # functions used in other libraries
     __syscall_rt_sigqueueinfo;
   }
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
index 7d1197a8ea..828cc75225 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
@@ -1,5 +1,5 @@
 /* O_*, F_*, FD_* bit values for Linux.
-   Copyright (C) 1995-1999, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1995-1999, 2000, 2004 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
@@ -75,7 +75,7 @@
 #define F_SETLK64	F_SETLK	/* Set record locking info (non-blocking).  */
 #define F_SETLKW64	F_SETLKW /* Set record locking info (blocking).  */
 
-#if defined __USE_BSD || defined __USE_XOPEN2K
+#if defined __USE_BSD || defined __USE_UNIX98
 # define F_SETOWN	5	/* Get owner of socket (receiver of SIGIO).  */
 # define F_GETOWN	6	/* Set owner of socket (receiver of SIGIO).  */
 #endif
diff --git a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
index ce17d68038..d050f7fbf7 100644
--- a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
@@ -1,5 +1,5 @@
 /* O_*, F_*, FD_* bit values for Linux.
-   Copyright (C) 1995-1998, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1995-1998, 2000, 2004 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
@@ -79,7 +79,7 @@
 #define F_SETLK64	13	/* Set record locking info (non-blocking).  */
 #define F_SETLKW64	14	/* Set record locking info (blocking).	*/
 
-#if defined __USE_BSD || defined __USE_XOPEN2K
+#if defined __USE_BSD || defined __USE_UNIX98
 # define F_SETOWN	8	/* Get owner of socket (receiver of SIGIO).  */
 # define F_GETOWN	9	/* Set owner of socket (receiver of SIGIO).  */
 #endif
diff --git a/sysdeps/unix/sysv/linux/cris/bits/fcntl.h b/sysdeps/unix/sysv/linux/cris/bits/fcntl.h
index 69ce6a506b..6abdd1d0b6 100644
--- a/sysdeps/unix/sysv/linux/cris/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/cris/bits/fcntl.h
@@ -1,5 +1,6 @@
 /* O_*, F_*, FD_* bit values for Linux.
-   Copyright (C) 1995, 1996, 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1995, 1996, 1997, 1998, 2000, 2001, 2004
+   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
@@ -78,7 +79,7 @@
 #define F_SETLK64	13	/* Set record locking info (non-blocking).  */
 #define F_SETLKW64	14	/* Set record locking info (blocking).	*/
 
-#if defined __USE_BSD || defined __USE_XOPEN2K
+#if defined __USE_BSD || defined __USE_UNIX98
 # define F_SETOWN	8	/* Get owner of socket (receiver of SIGIO).  */
 # define F_GETOWN	9	/* Set owner of socket (receiver of SIGIO).  */
 #endif
diff --git a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
index 6f13871d83..6cc96cf665 100644
--- a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
@@ -1,5 +1,5 @@
 /* O_*, F_*, FD_* bit values for Linux/HPPA.
-   Copyright (C) 1995,1996,1997,1998,1999,2000,2002
+   Copyright (C) 1995,1996,1997,1998,1999,2000,2002,2004
 	Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -78,7 +78,7 @@
 #define F_SETLK64	9	/* Set record locking info (non-blocking).  */
 #define F_SETLKW64	10	/* Set record locking info (blocking).  */
 
-#if defined __USE_BSD || defined __USE_XOPEN2K
+#if defined __USE_BSD || defined __USE_UNIX98
 # define F_GETOWN	11	/* Get owner of socket (receiver of SIGIO).  */
 # define F_SETOWN	12	/* Set owner of socket (receiver of SIGIO).  */
 #endif
diff --git a/sysdeps/unix/sysv/linux/i386/bits/fcntl.h b/sysdeps/unix/sysv/linux/i386/bits/fcntl.h
index bd27ae54df..8b753c5762 100644
--- a/sysdeps/unix/sysv/linux/i386/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/i386/bits/fcntl.h
@@ -1,5 +1,6 @@
 /* O_*, F_*, FD_* bit values for Linux.
-   Copyright (C) 1995, 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1995, 1996, 1997, 1998, 2000, 2004
+   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
@@ -78,7 +79,7 @@
 #define F_SETLK64	13	/* Set record locking info (non-blocking).  */
 #define F_SETLKW64	14	/* Set record locking info (blocking).	*/
 
-#if defined __USE_BSD || defined __USE_XOPEN2K
+#if defined __USE_BSD || defined __USE_UNIX98
 # define F_SETOWN	8	/* Get owner of socket (receiver of SIGIO).  */
 # define F_GETOWN	9	/* Set owner of socket (receiver of SIGIO).  */
 #endif
diff --git a/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h b/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h
index e141e98cb7..97971d3de3 100644
--- a/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h
@@ -1,5 +1,5 @@
 /* O_*, F_*, FD_* bit values for Linux/IA64.
-   Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2000, 2004 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
@@ -75,7 +75,7 @@
 #define F_SETLK64	6	/* Set record locking info (non-blocking).  */
 #define F_SETLKW64	7	/* Set record locking info (blocking).	*/
 
-#if defined __USE_BSD || defined __USE_XOPEN2K
+#if defined __USE_BSD || defined __USE_UNIX98
 # define F_SETOWN	8	/* Get owner of socket (receiver of SIGIO).  */
 # define F_GETOWN	9	/* Set owner of socket (receiver of SIGIO).  */
 #endif
diff --git a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h
index af7c0ea9ac..2e85d1e893 100644
--- a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h
@@ -1,5 +1,5 @@
 /* O_*, F_*, FD_* bit values for Linux.
-   Copyright (C) 2000 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2004 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
@@ -78,7 +78,7 @@
 #define F_SETLK64	13	/* Set record locking info (non-blocking).  */
 #define F_SETLKW64	14	/* Set record locking info (blocking).	*/
 
-#if defined __USE_BSD || defined __USE_XOPEN2K
+#if defined __USE_BSD || defined __USE_UNIX98
 # define F_SETOWN	8	/* Get owner of socket (receiver of SIGIO).  */
 # define F_GETOWN	9	/* Set owner of socket (receiver of SIGIO).  */
 #endif
diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
index 97e1867729..720e0a90e0 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
@@ -1,5 +1,5 @@
 /* O_*, F_*, FD_* bit values for Linux.
-   Copyright (C) 1995, 1996, 1997, 1998, 2000, 2002, 2003
+   Copyright (C) 1995, 1996, 1997, 1998, 2000, 2002, 2003, 2004
 	Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -81,7 +81,7 @@
 #define F_SETLK64	34	/* Set record locking info (non-blocking).  */
 #define F_SETLKW64	35	/* Set record locking info (blocking).	*/
 
-#if defined __USE_BSD || defined __USE_XOPEN2K
+#if defined __USE_BSD || defined __USE_UNIX98
 # define F_SETOWN	24	/* Get owner of socket (receiver of SIGIO).  */
 # define F_GETOWN	23	/* Set owner of socket (receiver of SIGIO).  */
 #endif
diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h b/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h
index dc9c05d297..e1fbb9c5d5 100644
--- a/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h
@@ -1,5 +1,6 @@
 /* O_*, F_*, FD_* bit values for Linux/PowerPC.
-   Copyright (C) 1995,1996,1997,1998,2000,2003 Free Software Foundation, Inc.
+   Copyright (C) 1995, 1996, 1997, 1998, 2000, 2003, 2004
+   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
@@ -78,7 +79,7 @@
 #define F_SETLK64	13	/* Set record locking info (non-blocking).  */
 #define F_SETLKW64	14	/* Set record locking info (blocking).	*/
 
-#if defined __USE_BSD || defined __USE_XOPEN2K
+#if defined __USE_BSD || defined __USE_UNIX98
 # define F_SETOWN	8	/* Get owner of socket (receiver of SIGIO).  */
 # define F_GETOWN	9	/* Set owner of socket (receiver of SIGIO).  */
 #endif
diff --git a/sysdeps/unix/sysv/linux/s390/bits/fcntl.h b/sysdeps/unix/sysv/linux/s390/bits/fcntl.h
index fe04f96279..1cdc487c09 100644
--- a/sysdeps/unix/sysv/linux/s390/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/s390/bits/fcntl.h
@@ -1,5 +1,5 @@
 /* O_*, F_*, FD_* bit values for Linux.
-   Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2001, 2002, 2004 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
@@ -93,7 +93,7 @@
 # define F_SETLKW64	14	/* Set record locking info (blocking).	*/
 #endif
 
-#if defined __USE_BSD || defined __USE_XOPEN2K
+#if defined __USE_BSD || defined __USE_UNIX98
 # define F_SETOWN	8	/* Get owner of socket (receiver of SIGIO).  */
 # define F_GETOWN	9	/* Set owner of socket (receiver of SIGIO).  */
 #endif
diff --git a/sysdeps/unix/sysv/linux/sh/bits/fcntl.h b/sysdeps/unix/sysv/linux/sh/bits/fcntl.h
index d3a8d82122..db1a314ebb 100644
--- a/sysdeps/unix/sysv/linux/sh/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/sh/bits/fcntl.h
@@ -1,5 +1,6 @@
 /* O_*, F_*, FD_* bit values for Linux.
-   Copyright (C) 1995, 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1995, 1996, 1997, 1998, 2000, 2004
+   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
@@ -78,7 +79,7 @@
 #define F_SETLK64	13	/* Set record locking info (non-blocking).  */
 #define F_SETLKW64	14	/* Set record locking info (blocking).  */
 
-#if defined __USE_BSD || defined __USE_XOPEN2K
+#if defined __USE_BSD || defined __USE_UNIX98
 # define F_SETOWN	8	/* Get owner of socket (receiver of SIGIO).  */
 # define F_GETOWN	9	/* Set owner of socket (receiver of SIGIO).  */
 #endif
diff --git a/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h b/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h
index 27fc3f8391..967bef1233 100644
--- a/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h
@@ -1,5 +1,6 @@
 /* O_*, F_*, FD_* bit values for Linux/SPARC.
-   Copyright (C) 1995,1996,1997,1998,2000,2003 Free Software Foundation, Inc.
+   Copyright (C) 1995, 1996, 1997, 1998, 2000, 2003, 2004
+   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
@@ -76,7 +77,7 @@
 #define F_SETFD		2	/* Set file descriptor flags.  */
 #define F_GETFL		3	/* Get file status flags.  */
 #define F_SETFL		4	/* Set file status flags.  */
-#if defined __USE_BSD || defined __USE_XOPEN2K
+#if defined __USE_BSD || defined __USE_UNIX98
 # define F_GETOWN	5	/* Get owner of socket (receiver of SIGIO).  */
 # define F_SETOWN	6	/* Set owner of socket (receiver of SIGIO).  */
 #endif
diff --git a/sysdeps/unix/sysv/linux/x86_64/Versions b/sysdeps/unix/sysv/linux/x86_64/Versions
index 3735871a24..fd1b3cc296 100644
--- a/sysdeps/unix/sysv/linux/x86_64/Versions
+++ b/sysdeps/unix/sysv/linux/x86_64/Versions
@@ -6,7 +6,4 @@ libc {
 
     modify_ldt;
   }
-  GLIBC_PRIVATE {
-    __modify_ldt;
-  }
 }
diff --git a/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h b/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h
index f41af70f97..5e11760bf0 100644
--- a/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h
@@ -1,5 +1,5 @@
 /* O_*, F_*, FD_* bit values for Linux/x86-64.
-   Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2002, 2004 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
@@ -82,7 +82,7 @@
 #define F_SETLK64	13	/* Set record locking info (non-blocking).  */
 #define F_SETLKW64	14	/* Set record locking info (blocking).	*/
 #endif
-#if defined __USE_BSD || defined __USE_XOPEN2K
+#if defined __USE_BSD || defined __USE_UNIX98
 # define F_SETOWN	8	/* Get owner of socket (receiver of SIGIO).  */
 # define F_GETOWN	9	/* Set owner of socket (receiver of SIGIO).  */
 #endif