[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commits] r17488 - in /fsf/trunk/libc: ./ include/ libio/ nptl/ nptl/sysdeps/pthread/ stdio-common/ sunrpc/ sysdeps/ieee754/ldbl-opt/ ...
- To: commits@xxxxxxxxxx
- Subject: [Commits] r17488 - in /fsf/trunk/libc: ./ include/ libio/ nptl/ nptl/sysdeps/pthread/ stdio-common/ sunrpc/ sysdeps/ieee754/ldbl-opt/ ...
- From: eglibc@xxxxxxxxxx
- Date: Fri, 09 Mar 2012 22:52:04 -0000
Author: eglibc
Date: Fri Mar 9 22:51:58 2012
New Revision: 17488
Log:
Import glibc-mainline for 2012-03-09
Added:
fsf/trunk/libc/include/math_private.h
fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/socket_type.h
fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/socket_type.h
Removed:
fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/socket.h
Modified:
fsf/trunk/libc/ChangeLog
fsf/trunk/libc/Makerules
fsf/trunk/libc/libio/stdio.h
fsf/trunk/libc/nptl/ChangeLog
fsf/trunk/libc/nptl/sysdeps/pthread/pthread.h
fsf/trunk/libc/stdio-common/Makefile
fsf/trunk/libc/sunrpc/rpc_cout.c
fsf/trunk/libc/sunrpc/rpc_main.c
fsf/trunk/libc/sunrpc/rpc_svcout.c
fsf/trunk/libc/sysdeps/ieee754/ldbl-opt/math_ldbl_opt.h
fsf/trunk/libc/sysdeps/powerpc/fpu/math_private.h
fsf/trunk/libc/sysdeps/unix/sysv/linux/Makefile
fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/socket.h
fsf/trunk/libc/sysdeps/x86_64/fpu/math_private.h
Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Fri Mar 9 22:51:58 2012
@@ -1,3 +1,51 @@
+2012-03-09 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ * sunrpc/rpc_cout.c: Remove __GNU_LIBRARY__ conditionals.
+ * sunrpc/rpc_main.c: Likewise.
+ * sunrpc/rpc_svcout.c: Likewise.
+
+2012-03-09 David S. Miller <davem@xxxxxxxxxxxxx>
+
+ * include/math_private.h: New file.
+
+2012-03-09 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/bits/socket_type.h: New file.
+ * sysdeps/unix/sysv/linux/sparc/bits/socket_type.h: Likewise.
+ * sysdeps/unix/sysv/linux/bits/socket.h: Get enum __socket_type
+ from <bits/socket_type.h>.
+ (enum __socket_type): Don't define here.
+ * sysdeps/unix/sysv/linux/sparc/bits/socket.h: Remove.
+ * sysdeps/unix/sysv/linux/Makefile (sysdep_headers): Add
+ bits/socket_type.h.
+
+ [BZ #13566]
+ * libio/stdio.h (gets): Always declare for C++ up to C++11 without
+ checking __USE_GNU.
+
+ * Makerules ($(inst_includedir)/%.h): New rule.
+ * stdio-common/Makefile (headers): Add bits/stdio_lim.h.
+ (install-others): Remove variable setting.
+ ($(inst_includedir)/bits/stdio_lim.h): Remove rule.
+
+2012-03-08 Richard Henderson <rth@xxxxxxxxxxx>
+
+ * sysdeps/powerpc/fpu/math_private.h (__ieee754_sqrt): Convert
+ from macro to inline function; merge with the
+ !__LIBC_INTERNAL_MATH_INLINES version.
+ (__ieee754_sqrtf): Likewise.
+
+ * sysdeps/x86_64/fpu/math_private.h (__rint): Convert from macro
+ to inline function.
+ (__rintf, __floor, __floorf): Likewise.
+
+ * sysdeps/x86_64/fpu/math_private.h (__ieee754_sqrt): Convert from
+ macro to inline function.
+ (__ieee754_sqrtf, __ieee754_sqrtl): Likewise.
+
+ * sysdeps/ieee754/ldbl-opt/math_ldbl_opt.h: Include <math_private.h>,
+ not <math/math_private.h>.
+
2012-03-08 David S. Miller <davem@xxxxxxxxxxxxx>
* sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c: Update
Modified: fsf/trunk/libc/Makerules
==============================================================================
--- fsf/trunk/libc/Makerules (original)
+++ fsf/trunk/libc/Makerules Fri Mar 9 22:51:58 2012
@@ -1,4 +1,4 @@
-# Copyright (C) 1991-2010, 2011 Free Software Foundation, Inc.
+# Copyright (C) 1991-2012 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
@@ -1068,6 +1068,8 @@
# headers in the sysdeps tree.
$(inst_includedir)/%.h: $(objpfx)%.h $(+force)
$(do-install)
+$(inst_includedir)/%.h: $(common-objpfx)%.h $(+force)
+ $(do-install)
$(inst_includedir)/%.h: %.h $(+force)
$(do-install)
$(inst_includedir)/%.h: $(..)include/%.h $(+force)
Added: fsf/trunk/libc/include/math_private.h
==============================================================================
--- fsf/trunk/libc/include/math_private.h (added)
+++ fsf/trunk/libc/include/math_private.h Fri Mar 9 22:51:58 2012
@@ -1,0 +1,1 @@
+#include <math/math_private.h>
Modified: fsf/trunk/libc/libio/stdio.h
==============================================================================
--- fsf/trunk/libc/libio/stdio.h (original)
+++ fsf/trunk/libc/libio/stdio.h Fri Mar 9 22:51:58 2012
@@ -623,7 +623,7 @@
__wur;
#if !defined __USE_ISOC11 \
- || (defined __cplusplus && __cplusplus <= 201103L && !defined __USE_GNU)
+ || (defined __cplusplus && __cplusplus <= 201103L)
/* Get a newline-terminated string from stdin, removing the newline.
DO NOT USE THIS FUNCTION!! There is no limit on how much it will read.
Modified: fsf/trunk/libc/nptl/ChangeLog
==============================================================================
--- fsf/trunk/libc/nptl/ChangeLog (original)
+++ fsf/trunk/libc/nptl/ChangeLog Fri Mar 9 22:51:58 2012
@@ -1,3 +1,8 @@
+2012-03-09 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ * sysdeps/pthread/pthread.h (__need_clockid_t, __need_timespec):
+ Do not define before including <time.h>.
+
2012-03-08 David S. Miller <davem@xxxxxxxxxxxxx>
* sysdeps/unix/sysv/linux/sparc/sem_post.c: Update copyright year.
Modified: fsf/trunk/libc/nptl/sysdeps/pthread/pthread.h
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/pthread/pthread.h (original)
+++ fsf/trunk/libc/nptl/sysdeps/pthread/pthread.h Fri Mar 9 22:51:58 2012
@@ -21,10 +21,6 @@
#include <features.h>
#include <endian.h>
#include <sched.h>
-#ifdef __USE_XOPEN2K
-# define __need_clockid_t
-#endif
-#define __need_timespec
#include <time.h>
#include <bits/pthreadtypes.h>
Modified: fsf/trunk/libc/stdio-common/Makefile
==============================================================================
--- fsf/trunk/libc/stdio-common/Makefile (original)
+++ fsf/trunk/libc/stdio-common/Makefile Fri Mar 9 22:51:58 2012
@@ -20,7 +20,7 @@
#
subdir := stdio-common
-headers := stdio_ext.h printf.h bits/printf-ldbl.h
+headers := stdio_ext.h printf.h bits/printf-ldbl.h bits/stdio_lim.h
routines := \
ctermid cuserid \
@@ -38,8 +38,6 @@
isoc99_scanf isoc99_vscanf isoc99_fscanf isoc99_vfscanf isoc99_sscanf \
isoc99_vsscanf \
psiginfo
-
-install-others = $(inst_includedir)/bits/stdio_lim.h
include ../Makeconfig
@@ -63,9 +61,6 @@
test-srcs = tst-unbputc tst-printf
include ../Rules
-
-$(inst_includedir)/bits/stdio_lim.h: $(common-objpfx)bits/stdio_lim.h $(+force)
- $(do-install)
ifeq ($(cross-compiling),no)
.PHONY: do-tst-unbputc do-tst-printf
Modified: fsf/trunk/libc/sunrpc/rpc_cout.c
==============================================================================
--- fsf/trunk/libc/sunrpc/rpc_cout.c (original)
+++ fsf/trunk/libc/sunrpc/rpc_cout.c Fri Mar 9 22:51:58 2012
@@ -416,13 +416,11 @@
free (object);
f_print (fout, "\t\tbreak;\n");
}
-#ifdef __GNU_LIBRARY__
else
{
f_print (fout, "\tdefault:\n");
f_print (fout, "\t\tbreak;\n");
}
-#endif
}
else
{
Modified: fsf/trunk/libc/sunrpc/rpc_main.c
==============================================================================
--- fsf/trunk/libc/sunrpc/rpc_main.c (original)
+++ fsf/trunk/libc/sunrpc/rpc_main.c Fri Mar 9 22:51:58 2012
@@ -164,18 +164,10 @@
int exitnow; /* If started by port monitors, exit after the call */
int timerflag; /* TRUE if !indefinite && !exitnow */
int newstyle; /* newstyle of passing arguments (by value) */
-#ifdef __GNU_LIBRARY__
int Cflag = 1; /* ANSI C syntax */
-#else
-int Cflag; /* ANSI C/C++ syntax */
-#endif
int CCflag; /* C++ files */
static int allfiles; /* generate all files */
-#ifdef __GNU_LIBRARY__
int tirpcflag; /* generating code for tirpc, by default */
-#else
-int tirpcflag = 1; /* generating code for tirpc, by default */
-#endif
xdrfunc *xdrfunc_head; /* xdr function list */
xdrfunc *xdrfunc_tail; /* xdr function list */
@@ -707,37 +699,18 @@
}
if (!tirpcflag && inetdflag)
-#ifdef __GNU_LIBRARY__
fprintf (fout, "#include <sys/ioctl.h> /* ioctl, TIOCNOTTY */\n");
-#else
- fprintf (fout, "#include <sys/ttycom.h>/* TIOCNOTTY */\n");
-#endif
if (Cflag && (inetdflag || pmflag))
{
-#ifdef __GNU_LIBRARY__
fprintf (fout, "#include <sys/types.h> /* open */\n");
fprintf (fout, "#include <sys/stat.h> /* open */\n");
fprintf (fout, "#include <fcntl.h> /* open */\n");
fprintf (fout, "#include <unistd.h> /* getdtablesize */\n");
-#else
- fprintf (fout, "#ifdef __cplusplus\n");
- fprintf (fout, "#include <sysent.h> /* getdtablesize, open */\n");
- fprintf (fout, "#endif /* __cplusplus */\n");
- if (tirpcflag)
- fprintf (fout, "#include <unistd.h> /* setsid */\n");
-#endif
- }
-#ifdef __GNU_LIBRARY__
+ }
if (tirpcflag && !(Cflag && (inetdflag || pmflag)))
-#else
- if (tirpcflag)
-#endif
fprintf (fout, "#include <sys/types.h>\n");
fprintf (fout, "#include <memory.h>\n");
-#ifndef __GNU_LIBRARY__
- fprintf (fout, "#include <stropts.h>\n");
-#endif
if (inetdflag || !tirpcflag)
{
fprintf (fout, "#include <sys/socket.h>\n");
@@ -752,25 +725,13 @@
fprintf (fout, "#include <sys/resource.h> /* rlimit */\n");
if (logflag || inetdflag || pmflag)
{
-#ifdef __GNU_LIBRARY__
fprintf (fout, "#include <syslog.h>\n");
-#else
- fprintf (fout, "#ifdef SYSLOG\n");
- fprintf (fout, "#include <syslog.h>\n");
- fprintf (fout, "#else\n");
- fprintf (fout, "#define LOG_ERR 1\n");
- fprintf (fout, "#define openlog(a, b, c)\n");
- fprintf (fout, "#endif\n");
-#endif
}
/* for ANSI-C */
if (Cflag)
fprintf (fout, "\n#ifndef SIG_PF\n#define SIG_PF void(*)(int)\n#endif\n");
-#ifndef __GNU_LIBRARY__
- fprintf (fout, "\n#ifdef DEBUG\n#define RPC_SVC_FG\n#endif\n");
-#endif
if (timerflag)
fprintf (fout, "\n#define _RPCSVC_CLOSEDOWN %s\n", svcclosetime);
while ((def = get_definition ()) != NULL)
@@ -1266,25 +1227,21 @@
Cflag = 1;
break;
-#ifdef __GNU_LIBRARY__
case 'k': /* K&R C syntax */
Cflag = 0;
break;
-#endif
case 'b': /* turn TIRPC flag off for
generating backward compatible
*/
tirpcflag = 0;
break;
-#ifdef __GNU_LIBRARY__
case '5': /* turn TIRPC flag on for
generating SysVr4 compatible
*/
tirpcflag = 1;
break;
-#endif
case 'I':
inetdflag = 1;
break;
@@ -1405,9 +1362,6 @@
else
{ /* 4.1 mode */
pmflag = 0; /* set pmflag only in tirpcmode */
-#ifndef __GNU_LIBRARY__
- inetdflag = 1; /* inetdflag is TRUE by default */
-#endif
if (cmd->nflag)
{ /* netid needs TIRPC */
f_print (stderr, _("Cannot use netid flag without TIRPC!\n"));
Modified: fsf/trunk/libc/sunrpc/rpc_svcout.c
==============================================================================
--- fsf/trunk/libc/sunrpc/rpc_svcout.c (original)
+++ fsf/trunk/libc/sunrpc/rpc_svcout.c Fri Mar 9 22:51:58 2012
@@ -91,12 +91,8 @@
if (inetdflag || pmflag)
{
const char *var_type;
-#ifdef __GNU_LIBRARY__
/* WHY? */
var_type = (nomain ? "extern" : "");
-#else
- var_type = (nomain ? "extern" : "static");
-#endif
f_print (fout, "%s int _rpcpmstart;", var_type);
f_print (fout, "\t\t/* Started by a port monitor ? */\n");
if (!tirpcflag)
@@ -133,7 +129,6 @@
if (nomain)
return;
-#ifdef __GNU_LIBRARY__
if (Cflag)
f_print (fout, "\nint\nmain (int argc, char **argv)\n");
else
@@ -142,9 +137,6 @@
f_print (fout, "\tint argc;\n");
f_print (fout, "\tchar **argv;\n");
}
-#else
- f_print (fout, "\nmain()\n");
-#endif
f_print (fout, "{\n");
if (inetdflag)
{
@@ -812,7 +804,7 @@
f_print (fout, "closedown (sig)\n\tint sig;\n");
f_print (fout, "{\n");
-#if defined (__GNU_LIBRARY__) && 0
+#if 0
f_print (fout, "\t(void) signal (sig, %s closedown);\n",
Cflag ? "(SIG_PF)" : "(void(*)())");
#endif
Modified: fsf/trunk/libc/sysdeps/ieee754/ldbl-opt/math_ldbl_opt.h
==============================================================================
--- fsf/trunk/libc/sysdeps/ieee754/ldbl-opt/math_ldbl_opt.h (original)
+++ fsf/trunk/libc/sysdeps/ieee754/ldbl-opt/math_ldbl_opt.h Fri Mar 9 22:51:58 2012
@@ -37,7 +37,7 @@
#ifndef __ASSEMBLER__
# include <math.h>
-# include <math/math_private.h>
+# include <math_private.h>
/* Set temporarily to non-zero if long double should be considered
the same as double. */
Modified: fsf/trunk/libc/sysdeps/powerpc/fpu/math_private.h
==============================================================================
--- fsf/trunk/libc/sysdeps/powerpc/fpu/math_private.h (original)
+++ fsf/trunk/libc/sysdeps/powerpc/fpu/math_private.h Fri Mar 9 22:51:58 2012
@@ -23,35 +23,49 @@
#include <sysdep.h>
#include <ldsodefs.h>
#include <dl-procinfo.h>
-
#include <math/math_private.h>
# if __WORDSIZE == 64 || defined _ARCH_PWR4
# define __CPU_HAS_FSQRT 1
-
-#ifndef __ieee754_sqrt
-# define __ieee754_sqrt(x) \
- ({ double __z; \
- __asm __volatile ( \
- " fsqrt %0,%1\n" \
- : "=f" (__z) \
- : "f"(x)); \
- __z; })
-#endif
-#ifndef __ieee754_sqrtf
-# define __ieee754_sqrtf(x) \
- ({ float __z; \
- __asm __volatile ( \
- " fsqrts %0,%1\n" \
- : "=f" (__z) \
- : "f"(x)); \
- __z; })
-#endif
-
# else
# define __CPU_HAS_FSQRT ((GLRO(dl_hwcap) & PPC_FEATURE_64) != 0)
-# endif // __WORDSIZE == 64 || defined _ARCH_PWR4
+# endif
+extern double __slow_ieee754_sqrt (double);
+extern __always_inline double
+__ieee754_sqrt (double __x)
+{
+ double __z;
+
+ if (__CPU_HAS_FSQRT)
+ {
+ /* Volatile is required to prevent the compiler from moving the
+ fsqrt instruction above the branch. */
+ __asm __volatile ("fsqrt %0,%1" : "=f" (__z) : "f" (__x));
+ }
+ else
+ __z = __slow_ieee754_sqrt(__x);
+
+ return __z;
+}
+
+extern float __slow_ieee754_sqrtf (float);
+extern __always_inline float
+__ieee754_sqrtf (float __x)
+{
+ float __z;
+
+ if (__CPU_HAS_FSQRT)
+ {
+ /* Volatile is required to prevent the compiler from moving the
+ fsqrts instruction above the branch. */
+ __asm __volatile ("fsqrts %0,%1" : "=f" (__z) : "f" (__x));
+ }
+ else
+ __z = __slow_ieee754_sqrtf(__x);
+
+ return __z;
+}
#if defined _ARCH_PWR5X
@@ -162,52 +176,4 @@
#endif /* defined _ARCH_PWR6 */
-
-# ifndef __LIBC_INTERNAL_MATH_INLINES
-extern double __slow_ieee754_sqrt (double);
-__inline double
-__ieee754_sqrt (double __x)
-{
- double __z;
-
- /* If the CPU is 64-bit we can use the optional FP instructions. */
- if (__CPU_HAS_FSQRT)
- {
- /* Volatile is required to prevent the compiler from moving the
- fsqrt instruction above the branch. */
- __asm __volatile (
- " fsqrt %0,%1\n"
- : "=f" (__z)
- : "f" (__x));
- }
- else
- __z = __slow_ieee754_sqrt(__x);
-
- return __z;
-}
-
-extern float __slow_ieee754_sqrtf (float);
-
-__inline float
-__ieee754_sqrtf (float __x)
-{
- float __z;
-
- /* If the CPU is 64-bit we can use the optional FP instructions. */
- if (__CPU_HAS_FSQRT)
- {
- /* Volatile is required to prevent the compiler from moving the
- fsqrts instruction above the branch. */
- __asm __volatile (
- " fsqrts %0,%1\n"
- : "=f" (__z)
- : "f" (__x));
- }
- else
- __z = __slow_ieee754_sqrtf(__x);
-
- return __z;
-}
-#endif /* __LIBC_INTERNAL_MATH_INLINES */
-
#endif /* _PPC_MATH_PRIVATE_H_ */
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/Makefile
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/Makefile (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/Makefile Fri Mar 9 22:51:58 2012
@@ -33,7 +33,8 @@
sys/ultrasound.h sys/raw.h sys/personality.h sys/epoll.h \
bits/a.out.h sys/inotify.h sys/signalfd.h sys/eventfd.h \
sys/timerfd.h sys/fanotify.h bits/eventfd.h bits/inotify.h \
- bits/signalfd.h bits/timerfd.h bits/epoll.h
+ bits/signalfd.h bits/timerfd.h bits/epoll.h \
+ bits/socket_type.h
install-others += $(inst_includedir)/bits/syscall.h
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/socket.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/socket.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/socket.h Fri Mar 9 22:51:58 2012
@@ -35,39 +35,8 @@
# define __socklen_t_defined
#endif
-/* Types of sockets. */
-enum __socket_type
-{
- SOCK_STREAM = 1, /* Sequenced, reliable, connection-based
- byte streams. */
-#define SOCK_STREAM SOCK_STREAM
- SOCK_DGRAM = 2, /* Connectionless, unreliable datagrams
- of fixed maximum length. */
-#define SOCK_DGRAM SOCK_DGRAM
- SOCK_RAW = 3, /* Raw protocol interface. */
-#define SOCK_RAW SOCK_RAW
- SOCK_RDM = 4, /* Reliably-delivered messages. */
-#define SOCK_RDM SOCK_RDM
- SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based,
- datagrams of fixed maximum length. */
-#define SOCK_SEQPACKET SOCK_SEQPACKET
- SOCK_DCCP = 6, /* Datagram Congestion Control Protocol. */
-#define SOCK_DCCP SOCK_DCCP
- SOCK_PACKET = 10, /* Linux specific way of getting packets
- at the dev level. For writing rarp and
- other similar things on the user level. */
-#define SOCK_PACKET SOCK_PACKET
-
- /* Flags to be ORed into the type parameter of socket and socketpair and
- used for the flags parameter of paccept. */
-
- SOCK_CLOEXEC = 02000000, /* Atomically set close-on-exec flag for the
- new descriptor(s). */
-#define SOCK_CLOEXEC SOCK_CLOEXEC
- SOCK_NONBLOCK = 04000 /* Atomically mark descriptor(s) as
- non-blocking. */
-#define SOCK_NONBLOCK SOCK_NONBLOCK
-};
+/* Get the architecture-dependent definition of enum __socket_type. */
+#include <bits/socket_type.h>
/* Protocol families. */
#define PF_UNSPEC 0 /* Unspecified. */
Added: fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/socket_type.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/socket_type.h (added)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/socket_type.h Fri Mar 9 22:51:58 2012
@@ -1,0 +1,55 @@
+/* Define enum __socket_type for generic Linux.
+ Copyright (C) 1991-2012 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, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_SOCKET_H
+# error "Never include <bits/socket_type.h> directly; use <sys/socket.h> instead."
+#endif
+
+/* Types of sockets. */
+enum __socket_type
+{
+ SOCK_STREAM = 1, /* Sequenced, reliable, connection-based
+ byte streams. */
+#define SOCK_STREAM SOCK_STREAM
+ SOCK_DGRAM = 2, /* Connectionless, unreliable datagrams
+ of fixed maximum length. */
+#define SOCK_DGRAM SOCK_DGRAM
+ SOCK_RAW = 3, /* Raw protocol interface. */
+#define SOCK_RAW SOCK_RAW
+ SOCK_RDM = 4, /* Reliably-delivered messages. */
+#define SOCK_RDM SOCK_RDM
+ SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based,
+ datagrams of fixed maximum length. */
+#define SOCK_SEQPACKET SOCK_SEQPACKET
+ SOCK_DCCP = 6, /* Datagram Congestion Control Protocol. */
+#define SOCK_DCCP SOCK_DCCP
+ SOCK_PACKET = 10, /* Linux specific way of getting packets
+ at the dev level. For writing rarp and
+ other similar things on the user level. */
+#define SOCK_PACKET SOCK_PACKET
+
+ /* Flags to be ORed into the type parameter of socket and socketpair and
+ used for the flags parameter of paccept. */
+
+ SOCK_CLOEXEC = 02000000, /* Atomically set close-on-exec flag for the
+ new descriptor(s). */
+#define SOCK_CLOEXEC SOCK_CLOEXEC
+ SOCK_NONBLOCK = 00004000 /* Atomically mark descriptor(s) as
+ non-blocking. */
+#define SOCK_NONBLOCK SOCK_NONBLOCK
+};
Removed: fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/socket.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/socket.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/socket.h (removed)
@@ -1,438 +1,0 @@
-/* System-specific socket constants and types. Linux/SPARC version.
- Copyright (C) 1991, 1992, 1994-2001, 2004, 2006, 2007, 2008, 2009, 2011, 2012
- 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, see
- <http://www.gnu.org/licenses/>. */
-
-#ifndef __BITS_SOCKET_H
-#define __BITS_SOCKET_H
-
-#ifndef _SYS_SOCKET_H
-# error "Never include <bits/socket.h> directly; use <sys/socket.h> instead."
-#endif
-
-#define __need_size_t
-#include <stddef.h>
-
-#include <sys/types.h>
-
-/* Type for length arguments in socket calls. */
-#ifndef __socklen_t_defined
-typedef __socklen_t socklen_t;
-# define __socklen_t_defined
-#endif
-
-/* Types of sockets. */
-enum __socket_type
-{
- SOCK_STREAM = 1, /* Sequenced, reliable, connection-based
- byte streams. */
-#define SOCK_STREAM SOCK_STREAM
- SOCK_DGRAM = 2, /* Connectionless, unreliable datagrams
- of fixed maximum length. */
-#define SOCK_DGRAM SOCK_DGRAM
- SOCK_RAW = 3, /* Raw protocol interface. */
-#define SOCK_RAW SOCK_RAW
- SOCK_RDM = 4, /* Reliably-delivered messages. */
-#define SOCK_RDM SOCK_RDM
- SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based,
- datagrams of fixed maximum length. */
-#define SOCK_SEQPACKET SOCK_SEQPACKET
- SOCK_DCCP = 6, /* Datagram Congestion Control Protocol. */
-#define SOCK_DCCP SOCK_DCCP
- SOCK_PACKET = 10, /* Linux specific way of getting packets
- at the dev level. For writing rarp and
- other similar things on the user level. */
-#define SOCK_PACKET SOCK_PACKET
-
- /* Flags to be ORed into the type parameter of socket and socketpair and
- used for the flags parameter of paccept. */
-
- SOCK_CLOEXEC = 0x400000, /* Atomically set close-on-exec flag for the
- new descriptor(s). */
-#define SOCK_CLOEXEC SOCK_CLOEXEC
- SOCK_NONBLOCK = 0x4000 /* Atomically mark descriptor(s) as
- non-blocking. */
-#define SOCK_NONBLOCK SOCK_NONBLOCK
-};
-
-/* Protocol families. */
-#define PF_UNSPEC 0 /* Unspecified. */
-#define PF_LOCAL 1 /* Local to host (pipes and file-domain). */
-#define PF_UNIX PF_LOCAL /* POSIX name for PF_LOCAL. */
-#define PF_FILE PF_LOCAL /* Another non-standard name for PF_LOCAL. */
-#define PF_INET 2 /* IP protocol family. */
-#define PF_AX25 3 /* Amateur Radio AX.25. */
-#define PF_IPX 4 /* Novell Internet Protocol. */
-#define PF_APPLETALK 5 /* Appletalk DDP. */
-#define PF_NETROM 6 /* Amateur radio NetROM. */
-#define PF_BRIDGE 7 /* Multiprotocol bridge. */
-#define PF_ATMPVC 8 /* ATM PVCs. */
-#define PF_X25 9 /* Reserved for X.25 project. */
-#define PF_INET6 10 /* IP version 6. */
-#define PF_ROSE 11 /* Amateur Radio X.25 PLP. */
-#define PF_DECnet 12 /* Reserved for DECnet project. */
-#define PF_NETBEUI 13 /* Reserved for 802.2LLC project. */
-#define PF_SECURITY 14 /* Security callback pseudo AF. */
-#define PF_KEY 15 /* PF_KEY key management API. */
-#define PF_NETLINK 16
-#define PF_ROUTE PF_NETLINK /* Alias to emulate 4.4BSD. */
-#define PF_PACKET 17 /* Packet family. */
-#define PF_ASH 18 /* Ash. */
-#define PF_ECONET 19 /* Acorn Econet. */
-#define PF_ATMSVC 20 /* ATM SVCs. */
-#define PF_RDS 21 /* RDS sockets. */
-#define PF_SNA 22 /* Linux SNA Project */
-#define PF_IRDA 23 /* IRDA sockets. */
-#define PF_PPPOX 24 /* PPPoX sockets. */
-#define PF_WANPIPE 25 /* Wanpipe API sockets. */
-#define PF_LLC 26 /* Linux LLC. */
-#define PF_CAN 29 /* Controller Area Network. */
-#define PF_TIPC 30 /* TIPC sockets. */
-#define PF_BLUETOOTH 31 /* Bluetooth sockets. */
-#define PF_IUCV 32 /* IUCV sockets. */
-#define PF_RXRPC 33 /* RxRPC sockets. */
-#define PF_ISDN 34 /* mISDN sockets. */
-#define PF_PHONET 35 /* Phonet sockets. */
-#define PF_IEEE802154 36 /* IEEE 802.15.4 sockets. */
-#define PF_CAIF 37 /* CAIF sockets. */
-#define PF_ALG 38 /* Algorithm sockets. */
-#define PF_NFC 39 /* NFC sockets. */
-#define PF_MAX 40 /* For now.. */
-
-/* Address families. */
-#define AF_UNSPEC PF_UNSPEC
-#define AF_LOCAL PF_LOCAL
-#define AF_UNIX PF_UNIX
-#define AF_FILE PF_FILE
-#define AF_INET PF_INET
-#define AF_AX25 PF_AX25
-#define AF_IPX PF_IPX
-#define AF_APPLETALK PF_APPLETALK
-#define AF_NETROM PF_NETROM
-#define AF_BRIDGE PF_BRIDGE
-#define AF_ATMPVC PF_ATMPVC
-#define AF_X25 PF_X25
-#define AF_INET6 PF_INET6
-#define AF_ROSE PF_ROSE
-#define AF_DECnet PF_DECnet
-#define AF_NETBEUI PF_NETBEUI
-#define AF_SECURITY PF_SECURITY
-#define AF_KEY PF_KEY
-#define AF_NETLINK PF_NETLINK
-#define AF_ROUTE PF_ROUTE
-#define AF_PACKET PF_PACKET
-#define AF_ASH PF_ASH
-#define AF_ECONET PF_ECONET
-#define AF_ATMSVC PF_ATMSVC
-#define AF_RDS PF_RDS
-#define AF_SNA PF_SNA
-#define AF_IRDA PF_IRDA
-#define AF_PPPOX PF_PPPOX
-#define AF_WANPIPE PF_WANPIPE
-#define AF_LLC PF_LLC
-#define AF_CAN PF_CAN
-#define AF_TIPC PF_TIPC
-#define AF_BLUETOOTH PF_BLUETOOTH
-#define AF_IUCV PF_IUCV
-#define AF_RXRPC PF_RXRPC
-#define AF_ISDN PF_ISDN
-#define AF_PHONET PF_PHONET
-#define AF_IEEE802154 PF_IEEE802154
-#define AF_CAIF PF_CAIF
-#define AF_ALG PF_ALG
-#define AF_NFC PF_NFC
-#define AF_MAX PF_MAX
-
-/* Socket level values. Others are defined in the appropriate headers.
-
- XXX These definitions also should go into the appropriate headers as
- far as they are available. */
-#define SOL_RAW 255
-#define SOL_DECNET 261
-#define SOL_X25 262
-#define SOL_PACKET 263
-#define SOL_ATM 264 /* ATM layer (cell level). */
-#define SOL_AAL 265 /* ATM Adaption Layer (packet level). */
-#define SOL_IRDA 266
-
-/* Maximum queue length specifiable by listen. */
-#define SOMAXCONN 128
-
-/* Get the definition of the macro to define the common sockaddr members. */
-#include <bits/sockaddr.h>
-
-/* Structure describing a generic socket address. */
-struct sockaddr
- {
- __SOCKADDR_COMMON (sa_); /* Common data: address family and length. */
- char sa_data[14]; /* Address data. */
- };
-
-
-/* Structure large enough to hold any socket address (with the historical
- exception of AF_UNIX). We reserve 128 bytes. */
-#define __ss_aligntype unsigned long int
-#define _SS_SIZE 128
-#define _SS_PADSIZE (_SS_SIZE - (2 * sizeof (__ss_aligntype)))
-
-struct sockaddr_storage
- {
- __SOCKADDR_COMMON (ss_); /* Address family, etc. */
- __ss_aligntype __ss_align; /* Force desired alignment. */
- char __ss_padding[_SS_PADSIZE];
- };
-
-
-/* Bits in the FLAGS argument to `send', `recv', et al. */
-enum
- {
- MSG_OOB = 0x01, /* Process out-of-band data. */
-#define MSG_OOB MSG_OOB
- MSG_PEEK = 0x02, /* Peek at incoming messages. */
-#define MSG_PEEK MSG_PEEK
- MSG_DONTROUTE = 0x04, /* Don't use local routing. */
-#define MSG_DONTROUTE MSG_DONTROUTE
-#ifdef __USE_GNU
- /* DECnet uses a different name. */
- MSG_TRYHARD = MSG_DONTROUTE,
-# define MSG_TRYHARD MSG_DONTROUTE
-#endif
- MSG_CTRUNC = 0x08, /* Control data lost before delivery. */
-#define MSG_CTRUNC MSG_CTRUNC
- MSG_PROXY = 0x10, /* Supply or ask second address. */
-#define MSG_PROXY MSG_PROXY
- MSG_TRUNC = 0x20,
-#define MSG_TRUNC MSG_TRUNC
- MSG_DONTWAIT = 0x40, /* Nonblocking IO. */
-#define MSG_DONTWAIT MSG_DONTWAIT
- MSG_EOR = 0x80, /* End of record. */
-#define MSG_EOR MSG_EOR
- MSG_WAITALL = 0x100, /* Wait for a full request. */
-#define MSG_WAITALL MSG_WAITALL
- MSG_FIN = 0x200,
-#define MSG_FIN MSG_FIN
- MSG_SYN = 0x400,
-#define MSG_SYN MSG_SYN
- MSG_CONFIRM = 0x800, /* Confirm path validity. */
-#define MSG_CONFIRM MSG_CONFIRM
- MSG_RST = 0x1000,
-#define MSG_RST MSG_RST
- MSG_ERRQUEUE = 0x2000, /* Fetch message from error queue. */
-#define MSG_ERRQUEUE MSG_ERRQUEUE
- MSG_NOSIGNAL = 0x4000, /* Do not generate SIGPIPE. */
-#define MSG_NOSIGNAL MSG_NOSIGNAL
- MSG_MORE = 0x8000, /* Sender will send more. */
-#define MSG_MORE MSG_MORE
- MSG_WAITFORONE = 0x10000, /* Wait for at least one packet to return.*/
-#define MSG_WAITFORONE MSG_WAITFORONE
-
- MSG_CMSG_CLOEXEC = 0x40000000 /* Set close_on_exit for file
- descriptor received through
- SCM_RIGHTS. */
-#define MSG_CMSG_CLOEXEC MSG_CMSG_CLOEXEC
- };
-
-
-/* Structure describing messages sent by
- `sendmsg' and received by `recvmsg'. */
-struct msghdr
- {
- void *msg_name; /* Address to send to/receive from. */
- socklen_t msg_namelen; /* Length of address data. */
-
- struct iovec *msg_iov; /* Vector of data to send/receive into. */
- size_t msg_iovlen; /* Number of elements in the vector. */
-
- void *msg_control; /* Ancillary data (eg BSD filedesc passing). */
- size_t msg_controllen; /* Ancillary data buffer length.
- !! The type should be socklen_t but the
- definition of the kernel is incompatible
- with this. */
-
- int msg_flags; /* Flags on received message. */
- };
-
-#ifdef __USE_GNU
-/* For `recvmmsg'. */
-struct mmsghdr
- {
- struct msghdr msg_hdr; /* Actual message header. */
- unsigned int msg_len; /* Number of received bytes for the entry. */
- };
-#endif
-
-/* Structure used for storage of ancillary data object information. */
-struct cmsghdr
- {
- size_t cmsg_len; /* Length of data in cmsg_data plus length
- of cmsghdr structure.
- !! The type should be socklen_t but the
- definition of the kernel is incompatible
- with this. */
- int cmsg_level; /* Originating protocol. */
- int cmsg_type; /* Protocol specific type. */
-#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L
- __extension__ unsigned char __cmsg_data __flexarr; /* Ancillary data. */
-#endif
- };
-
-/* Ancillary data object manipulation macros. */
-#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L
-# define CMSG_DATA(cmsg) ((cmsg)->__cmsg_data)
-#else
-# define CMSG_DATA(cmsg) ((unsigned char *) ((struct cmsghdr *) (cmsg) + 1))
-#endif
-#define CMSG_NXTHDR(mhdr, cmsg) __cmsg_nxthdr (mhdr, cmsg)
-#define CMSG_FIRSTHDR(mhdr) \
- ((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr) \
- ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) 0)
-#define CMSG_ALIGN(len) (((len) + sizeof (size_t) - 1) \
- & (size_t) ~(sizeof (size_t) - 1))
-#define CMSG_SPACE(len) (CMSG_ALIGN (len) \
- + CMSG_ALIGN (sizeof (struct cmsghdr)))
-#define CMSG_LEN(len) (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len))
-
-extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr,
- struct cmsghdr *__cmsg) __THROW;
-#ifdef __USE_EXTERN_INLINES
-# ifndef _EXTERN_INLINE
-# define _EXTERN_INLINE __extern_inline
-# endif
-_EXTERN_INLINE struct cmsghdr *
-__NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg))
-{
- if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr))
- /* The kernel header does this so there may be a reason. */
- return (struct cmsghdr *) 0;
-
- __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg
- + CMSG_ALIGN (__cmsg->cmsg_len));
- if ((unsigned char *) (__cmsg + 1) > ((unsigned char *) __mhdr->msg_control
- + __mhdr->msg_controllen)
- || ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len)
- > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen)))
- /* No more entries. */
- return (struct cmsghdr *) 0;
- return __cmsg;
-}
-#endif /* Use `extern inline'. */
-
-/* Socket level message types. This must match the definitions in
- <linux/socket.h>. */
-enum
- {
- SCM_RIGHTS = 0x01 /* Transfer file descriptors. */
-#define SCM_RIGHTS SCM_RIGHTS
-#ifdef __USE_GNU
- , SCM_CREDENTIALS = 0x02 /* Credentials passing. */
-# define SCM_CREDENTIALS SCM_CREDENTIALS
-#endif
- };
-
-#ifdef __USE_GNU
-/* User visible structure for SCM_CREDENTIALS message */
-struct ucred
-{
- pid_t pid; /* PID of sending process. */
- uid_t uid; /* UID of sending process. */
- gid_t gid; /* GID of sending process. */
-};
-#endif
-
-/* Ugly workaround for unclean kernel headers. */
-#if !defined __USE_MISC && !defined __USE_GNU
-# ifndef FIOGETOWN
-# define __SYS_SOCKET_H_undef_FIOGETOWN
-# endif
-# ifndef FIOSETOWN
-# define __SYS_SOCKET_H_undef_FIOSETOWN
-# endif
-# ifndef SIOCATMARK
-# define __SYS_SOCKET_H_undef_SIOCATMARK
-# endif
-# ifndef SIOCGPGRP
-# define __SYS_SOCKET_H_undef_SIOCGPGRP
-# endif
-# ifndef SIOCGSTAMP
-# define __SYS_SOCKET_H_undef_SIOCGSTAMP
-# endif
-# ifndef SIOCGSTAMPNS
-# define __SYS_SOCKET_H_undef_SIOCGSTAMPNS
-# endif
-# ifndef SIOCSPGRP
-# define __SYS_SOCKET_H_undef_SIOCSPGRP
-# endif
-#endif
-
-/* Get socket manipulation related informations from kernel headers. */
-#include <asm/socket.h>
-
-#if !defined __USE_MISC && !defined __USE_GNU
-# ifdef __SYS_SOCKET_H_undef_FIOGETOWN
-# undef __SYS_SOCKET_H_undef_FIOGETOWN
-# undef FIOGETOWN
-# endif
-# ifdef __SYS_SOCKET_H_undef_FIOSETOWN
-# undef __SYS_SOCKET_H_undef_FIOSETOWN
-# undef FIOSETOWN
-# endif
-# ifdef __SYS_SOCKET_H_undef_SIOCATMARK
-# undef __SYS_SOCKET_H_undef_SIOCATMARK
-# undef SIOCATMARK
-# endif
-# ifdef __SYS_SOCKET_H_undef_SIOCGPGRP
-# undef __SYS_SOCKET_H_undef_SIOCGPGRP
-# undef SIOCGPGRP
-# endif
-# ifdef __SYS_SOCKET_H_undef_SIOCGSTAMP
-# undef __SYS_SOCKET_H_undef_SIOCGSTAMP
-# undef SIOCGSTAMP
-# endif
-# ifdef __SYS_SOCKET_H_undef_SIOCGSTAMPNS
-# undef __SYS_SOCKET_H_undef_SIOCGSTAMPNS
-# undef SIOCGSTAMPNS
-# endif
-# ifdef __SYS_SOCKET_H_undef_SIOCSPGRP
-# undef __SYS_SOCKET_H_undef_SIOCSPGRP
-# undef SIOCSPGRP
-# endif
-#endif
-
-/* Structure used to manipulate the SO_LINGER option. */
-struct linger
- {
- int l_onoff; /* Nonzero to linger on close. */
- int l_linger; /* Time to linger. */
- };
-
-
-__BEGIN_DECLS
-
-#ifdef __USE_GNU
-/* Receive a message as described by MESSAGE from socket FD.
- Returns the number of bytes read or -1 for errors.
-
- This function is a cancellation point and therefore not marked with
- __THROW. */
-extern int recvmmsg (int __fd, struct mmsghdr *__vmessages,
- unsigned int __vlen, int __flags,
- const struct timespec *__tmo);
-#endif
-
-__END_DECLS
-
-#endif /* bits/socket.h */
Added: fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/socket_type.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/socket_type.h (added)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/socket_type.h Fri Mar 9 22:51:58 2012
@@ -1,0 +1,55 @@
+/* Define enum __socket_type for Linux/SPARC.
+ Copyright (C) 1991-2012 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, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_SOCKET_H
+# error "Never include <bits/socket_type.h> directly; use <sys/socket.h> instead."
+#endif
+
+/* Types of sockets. */
+enum __socket_type
+{
+ SOCK_STREAM = 1, /* Sequenced, reliable, connection-based
+ byte streams. */
+#define SOCK_STREAM SOCK_STREAM
+ SOCK_DGRAM = 2, /* Connectionless, unreliable datagrams
+ of fixed maximum length. */
+#define SOCK_DGRAM SOCK_DGRAM
+ SOCK_RAW = 3, /* Raw protocol interface. */
+#define SOCK_RAW SOCK_RAW
+ SOCK_RDM = 4, /* Reliably-delivered messages. */
+#define SOCK_RDM SOCK_RDM
+ SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based,
+ datagrams of fixed maximum length. */
+#define SOCK_SEQPACKET SOCK_SEQPACKET
+ SOCK_DCCP = 6, /* Datagram Congestion Control Protocol. */
+#define SOCK_DCCP SOCK_DCCP
+ SOCK_PACKET = 10, /* Linux specific way of getting packets
+ at the dev level. For writing rarp and
+ other similar things on the user level. */
+#define SOCK_PACKET SOCK_PACKET
+
+ /* Flags to be ORed into the type parameter of socket and socketpair and
+ used for the flags parameter of paccept. */
+
+ SOCK_CLOEXEC = 0x400000, /* Atomically set close-on-exec flag for the
+ new descriptor(s). */
+#define SOCK_CLOEXEC SOCK_CLOEXEC
+ SOCK_NONBLOCK = 0x004000 /* Atomically mark descriptor(s) as
+ non-blocking. */
+#define SOCK_NONBLOCK SOCK_NONBLOCK
+};
Modified: fsf/trunk/libc/sysdeps/x86_64/fpu/math_private.h
==============================================================================
--- fsf/trunk/libc/sysdeps/x86_64/fpu/math_private.h (original)
+++ fsf/trunk/libc/sysdeps/x86_64/fpu/math_private.h Fri Mar 9 22:51:58 2012
@@ -1,4 +1,5 @@
-#ifndef _MATH_PRIVATE_H
+#ifndef X86_64_MATH_PRIVATE_H
+#define X86_64_MATH_PRIVATE_H 1
#define math_opt_barrier(x) \
({ __typeof(x) __x; \
@@ -67,7 +68,6 @@
f = f__; \
} while (0)
-#endif
#define __isnan(d) \
({ long int __di; EXTRACT_WORDS64 (__di, (double) (d)); \
@@ -90,85 +90,87 @@
({ int __di; GET_FLOAT_WORD (__di, (float) d); \
(__di & 0x7fffffff) < 0x7f800000; })
+extern __always_inline double
+__ieee754_sqrt (double d)
+{
+ double res;
#if defined __AVX__ || defined SSE2AVX
-# define __ieee754_sqrt(d) \
- ({ double __res; \
- asm ("vsqrtsd %1, %0, %0" : "=x" (__res) : "xm" ((double) (d))); \
- __res; })
-# define __ieee754_sqrtf(d) \
- ({ float __res; \
- asm ("vsqrtss %1, %0, %0" : "=x" (__res) : "xm" ((float) (d))); \
- __res; })
+ asm ("vsqrtsd %1, %0, %0" : "=x" (res) : "xm" (d));
#else
-# define __ieee754_sqrt(d) \
- ({ double __res; \
- asm ("sqrtsd %1, %0" : "=x" (__res) : "xm" ((double) (d))); \
- __res; })
-# define __ieee754_sqrtf(d) \
- ({ float __res; \
- asm ("sqrtss %1, %0" : "=x" (__res) : "xm" ((float) (d))); \
- __res; })
+ asm ("sqrtsd %1, %0" : "=x" (res) : "xm" (d));
#endif
-#define __ieee754_sqrtl(d) \
- ({ long double __res; \
- asm ("fsqrt" : "=t" (__res) : "0" ((long double) (d))); \
- __res; })
+ return res;
+}
+
+extern __always_inline float
+__ieee754_sqrtf (float d)
+{
+ float res;
+#if defined __AVX__ || defined SSE2AVX
+ asm ("vsqrtss %1, %0, %0" : "=x" (res) : "xm" (d));
+#else
+ asm ("sqrtss %1, %0" : "=x" (res) : "xm" (d));
+#endif
+ return res;
+}
+
+extern __always_inline long double
+__ieee754_sqrtl (long double d)
+{
+ long double res;
+ asm ("fsqrt" : "=t" (res) : "0" (d));
+ return res;
+}
#ifdef __SSE4_1__
-# ifndef __rint
-# if defined __AVX__ || defined SSE2AVX
-# define __rint(d) \
- ({ double __res; \
- asm ("vroundsd $4, %1, %0, %0" : "=x" (__res) : "xm" ((double) (d))); \
- __res; })
-# else
-# define __rint(d) \
- ({ double __res; \
- asm ("roundsd $4, %1, %0" : "=x" (__res) : "xm" ((double) (d))); \
- __res; })
+extern __always_inline double
+__rint (double d)
+{
+ double res;
+# if defined __AVX__ || defined SSE2AVX
+ asm ("vroundsd $4, %1, %0, %0" : "=x" (res) : "xm" (d));
+# else
+ asm ("roundsd $4, %1, %0" : "=x" (res) : "xm" (d));
+# endif
+ return res;
+}
+
+extern __always_inline float
+__rintf (float d)
+{
+ float res;
+# if defined __AVX__ || defined SSE2AVX
+ asm ("vroundss $4, %1, %0, %0" : "=x" (res) : "xm" (d));
+# else
+ asm ("roundss $4, %1, %0" : "=x" (res) : "xm" (d));
+# endif
+ return res;
+}
+
+extern __always_inline double
+__floor (double d)
+{
+ double res;
+# if defined __AVX__ || defined SSE2AVX
+ asm ("vroundsd $1, %1, %0, %0" : "=x" (res) : "xm" (d));
+# else
+ asm ("roundsd $1, %1, %0" : "=x" (res) : "xm" (d));
+# endif
+ return res;
+}
+
+extern __always_inline float
+__floorf (float d)
+{
+ float res;
+# if defined __AVX__ || defined SSE2AVX
+ asm ("vroundss $1, %1, %0, %0" : "=x" (res) : "xm" (d));
+# else
+ asm ("roundss $1, %1, %0" : "=x" (res) : "xm" (d));
# endif
-# endif
-# ifndef __rintf
-# if defined __AVX__ || defined SSE2AVX
-# define __rintf(d) \
- ({ float __res; \
- asm ("vroundss $4, %1, %0, %0" : "=x" (__res) : "xm" ((float) (d))); \
- __res; })
-# else
-# define __rintf(d) \
- ({ float __res; \
- asm ("roundss $4, %1, %0" : "=x" (__res) : "xm" ((float) (d))); \
- __res; })
-# endif
-# endif
-
-# ifndef __floor
-# if defined __AVX__ || defined SSE2AVX
-# define __floor(d) \
- ({ double __res; \
- asm ("vroundsd $1, %1, %0, %0" : "=x" (__res) : "xm" ((double) (d))); \
- __res; })
-# else
-# define __floor(d) \
- ({ double __res; \
- asm ("roundsd $1, %1, %0" : "=x" (__res) : "xm" ((double) (d))); \
- __res; })
-# endif
-# endif
-# ifndef __floorf
-# if defined __AVX__ || defined SSE2AVX
-# define __floorf(d) \
- ({ float __res; \
- asm ("vroundss $1, %1, %0, %0" : "=x" (__res) : "xm" ((float) (d))); \
- __res; })
-# else
-# define __floorf(d) \
- ({ float __res; \
- asm ("roundss $1, %1, %0" : "=x" (__res) : "xm" ((float) (d))); \
- __res; })
-# endif
-# endif
-#endif
+ return res;
+}
+#endif /* __SSE4_1__ */
/* Specialized variants of the <fenv.h> interfaces which only handle
@@ -226,3 +228,5 @@
#undef libc_feupdateenvf
#define libc_feupdateenvf(e) libc_feupdateenv (e)
// #define libc_feupdateenvl(e) (void) feupdateenv (e)
+
+#endif /* X86_64_MATH_PRIVATE_H */
_______________________________________________
Commits mailing list
Commits@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/commits