summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/cris/bits
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/linux/cris/bits')
-rw-r--r--libc/sysdeps/linux/cris/bits/byteswap.h79
-rw-r--r--libc/sysdeps/linux/cris/bits/fcntl.h13
-rw-r--r--libc/sysdeps/linux/cris/bits/kernel_stat.h42
-rw-r--r--libc/sysdeps/linux/cris/bits/kernel_types.h2
-rw-r--r--libc/sysdeps/linux/cris/bits/mathcalls.h333
-rw-r--r--libc/sysdeps/linux/cris/bits/mman.h98
-rw-r--r--libc/sysdeps/linux/cris/bits/setjmp.h32
-rw-r--r--libc/sysdeps/linux/cris/bits/stackinfo.h5
-rw-r--r--libc/sysdeps/linux/cris/bits/syscalls.h77
-rw-r--r--libc/sysdeps/linux/cris/bits/termios.h5
-rw-r--r--libc/sysdeps/linux/cris/bits/uClibc_arch_features.h16
-rw-r--r--libc/sysdeps/linux/cris/bits/uClibc_page.h4
-rw-r--r--libc/sysdeps/linux/cris/bits/wordsize.h3
13 files changed, 56 insertions, 653 deletions
diff --git a/libc/sysdeps/linux/cris/bits/byteswap.h b/libc/sysdeps/linux/cris/bits/byteswap.h
index 4027456ac..a82f9c098 100644
--- a/libc/sysdeps/linux/cris/bits/byteswap.h
+++ b/libc/sysdeps/linux/cris/bits/byteswap.h
@@ -1,83 +1,20 @@
-#ifndef _BITS_BYTESWAP_H
-#define _BITS_BYTESWAP_H 1
+#ifndef _ASM_BITS_BYTESWAP_H
+#define _ASM_BITS_BYTESWAP_H 1
/* CRIS specific byte swap operations: 16, 32 and 64-bit */
-/* Swap bytes in 16 bit value. */
-#define __bswap_constant_16(x) \
-({ \
- unsigned short __x = (x); \
- ((unsigned short)( \
- (((unsigned short)(__x) & (unsigned short)0x00ffu) << 8) | \
- (((unsigned short)(__x) & (unsigned short)0xff00u) >> 8) )); \
-})
-
-#if defined __GNUC__ && __GNUC__ >= 2
-# define __bswap_16(x) \
+#define __bswap_non_constant_16(x) \
__extension__ \
({ unsigned short __bswap_16_v; \
- if (__builtin_constant_p (x)) \
- __bswap_16_v = __bswap_constant_16 (x); \
- else \
- __asm__ ("swapb %0" : "=r" (__bswap_16_v) : "0" (x)); \
+ __asm__ ("swapb %0" : "=r" (__bswap_16_v) : "0" (x)); \
__bswap_16_v; })
-#else
-# define __bswap_16(x) __bswap_constant_16 (x)
-#endif
-
-
-/* Swap bytes in 32 bit value. */
-#define __bswap_constant_32(x) \
-({ \
- unsigned long __x = (x); \
- ((unsigned long)( \
- (((unsigned long)(__x) & (unsigned long)0x000000fful) << 24) | \
- (((unsigned long)(__x) & (unsigned long)0x0000ff00ul) << 8) | \
- (((unsigned long)(__x) & (unsigned long)0x00ff0000ul) >> 8) | \
- (((unsigned long)(__x) & (unsigned long)0xff000000ul) >> 24) )); \
-})
-#if defined __GNUC__ && __GNUC__ >= 2
-# define __bswap_32(x) \
+#define __bswap_non_constant_32(x) \
__extension__ \
- ({ unsigned long __bswap_32_v; \
- if (__builtin_constant_p (x)) \
- __bswap_32_v = __bswap_constant_32 (x); \
- else \
- __asm__ ("swapwb %0" : "=r" (__bswap_32_v) : "0" (x)); \
+ ({ unsigned int __bswap_32_v; \
+ __asm__ ("swapwb %0" : "=r" (__bswap_32_v) : "0" (x)); \
__bswap_32_v; })
-#else
-# define __bswap_32(x) __bswap_constant_32 (x)
-#endif
-
-
-/* Swap bytes in 64 bit value. */
-# define __bswap_constant_64(x) \
- ((((x) & 0xff00000000000000ull) >> 56) \
- | (((x) & 0x00ff000000000000ull) >> 40) \
- | (((x) & 0x0000ff0000000000ull) >> 24) \
- | (((x) & 0x000000ff00000000ull) >> 8) \
- | (((x) & 0x00000000ff000000ull) << 8) \
- | (((x) & 0x0000000000ff0000ull) << 24) \
- | (((x) & 0x000000000000ff00ull) << 40) \
- | (((x) & 0x00000000000000ffull) << 56))
-#if defined __GNUC__ && __GNUC__ >= 2
-# define __bswap_64(x) \
- (__extension__ \
- ({ union { __extension__ unsigned long long int __ll; \
- unsigned int __l[2]; } __w, __r; \
- if (__builtin_constant_p (x)) \
- __r.__ll = __bswap_constant_64 (x); \
- else \
- { \
- __w.__ll = (x); \
- __r.__l[0] = __bswap_32 (__w.__l[1]); \
- __r.__l[1] = __bswap_32 (__w.__l[0]); \
- } \
- __r.__ll; }))
-#else
-# define __bswap_64(x) __bswap_constant_64 (x)
#endif
-#endif /* _BITS_BYTESWAP_H */
+#include <bits/byteswap-common.h>
diff --git a/libc/sysdeps/linux/cris/bits/fcntl.h b/libc/sysdeps/linux/cris/bits/fcntl.h
index 2637a6b63..b6a755be1 100644
--- a/libc/sysdeps/linux/cris/bits/fcntl.h
+++ b/libc/sysdeps/linux/cris/bits/fcntl.h
@@ -14,9 +14,8 @@
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. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#ifndef _FCNTL_H
# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
@@ -50,6 +49,8 @@
# define O_DIRECTORY 0200000 /* Must be a directory. */
# define O_NOFOLLOW 0400000 /* Do not follow links. */
# define O_NOATIME 01000000 /* Do not set atime. */
+# define O_CLOEXEC 02000000 /* set close_on_exec */
+# define O_PATH 010000000 /* Resolve pathname but do not open file. */
#endif
/* For now Linux has synchronisity options for data and read operations.
@@ -99,6 +100,8 @@
# define F_NOTIFY 1026 /* Request notfications on a directory. */
# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
close-on-exit set on new fd. */
+# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
+# define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
#endif
/* For F_[GET|SET]FL. */
@@ -186,7 +189,7 @@ struct flock64
#endif
-#ifdef __USE_GNU
+#if defined __USE_GNU && defined __UCLIBC_LINUX_SPECIFIC__
/* Flags for SYNC_FILE_RANGE. */
# define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
in the range before performing the
@@ -209,7 +212,7 @@ struct flock64
__BEGIN_DECLS
-#ifdef __USE_GNU
+#if defined __USE_GNU && defined __UCLIBC_LINUX_SPECIFIC__
/* Provide kernel hint to read ahead. */
extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
diff --git a/libc/sysdeps/linux/cris/bits/kernel_stat.h b/libc/sysdeps/linux/cris/bits/kernel_stat.h
index 50202e542..619f35e9e 100644
--- a/libc/sysdeps/linux/cris/bits/kernel_stat.h
+++ b/libc/sysdeps/linux/cris/bits/kernel_stat.h
@@ -1,25 +1,7 @@
/* Taken from linux/include/asm-cris/stat.h */
-#ifndef _CRIS_STAT_H
-#define _CRIS_STAT_H
-
-#ifndef _LIBC
-#error bits/kernel_stat.h is for internal uClibc use only!
-#endif
-
-struct __old_kernel_stat {
- unsigned short st_dev;
- unsigned short st_ino;
- unsigned short st_mode;
- unsigned short st_nlink;
- unsigned short st_uid;
- unsigned short st_gid;
- unsigned short st_rdev;
- unsigned long st_size;
- unsigned long st_atime;
- unsigned long st_mtime;
- unsigned long st_ctime;
-};
+#ifndef _BITS_STAT_STRUCT_H
+#define _BITS_STAT_STRUCT_H
struct kernel_stat {
unsigned short st_dev;
@@ -34,12 +16,9 @@ struct kernel_stat {
unsigned long st_size;
unsigned long st_blksize;
unsigned long st_blocks;
- unsigned long st_atime;
- unsigned long __unused1;
- unsigned long st_mtime;
- unsigned long __unused2;
- unsigned long st_ctime;
- unsigned long __unused3;
+ struct timespec st_atim;
+ struct timespec st_mtim;
+ struct timespec st_ctim;
unsigned long __unused4;
unsigned long __unused5;
};
@@ -69,14 +48,9 @@ struct kernel_stat64 {
unsigned long st_blocks; /* Number 512-byte blocks allocated. */
unsigned long __pad4; /* future possible st_blocks high bits */
- unsigned long st_atime;
- unsigned long __pad5;
-
- unsigned long st_mtime;
- unsigned long __pad6;
-
- unsigned long st_ctime;
- unsigned long __pad7; /* will be high 32 bits of ctime someday */
+ struct timespec st_atim;
+ struct timespec st_mtim;
+ struct timespec st_ctim;
unsigned long long st_ino;
};
diff --git a/libc/sysdeps/linux/cris/bits/kernel_types.h b/libc/sysdeps/linux/cris/bits/kernel_types.h
index f122c7f57..5d31f7b6a 100644
--- a/libc/sysdeps/linux/cris/bits/kernel_types.h
+++ b/libc/sysdeps/linux/cris/bits/kernel_types.h
@@ -28,6 +28,8 @@ typedef unsigned int __kernel_gid32_t;
typedef unsigned short __kernel_old_uid_t;
typedef unsigned short __kernel_old_gid_t;
typedef __kernel_dev_t __kernel_old_dev_t;
+typedef long __kernel_long_t;
+typedef unsigned long __kernel_ulong_t;
#ifdef __GNUC__
typedef long long __kernel_loff_t;
diff --git a/libc/sysdeps/linux/cris/bits/mathcalls.h b/libc/sysdeps/linux/cris/bits/mathcalls.h
deleted file mode 100644
index c1181f737..000000000
--- a/libc/sysdeps/linux/cris/bits/mathcalls.h
+++ /dev/null
@@ -1,333 +0,0 @@
-/* Prototype declarations for math functions; helper file for <math.h>.
- Copyright (C) 1996,1997,1998,1999,2000,2001 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. */
-
-/* NOTE: Because of the special way this file is used by <math.h>, this
- file must NOT be protected from multiple inclusion as header files
- usually are.
-
- This file provides prototype declarations for the math functions.
- Most functions are declared using the macro:
-
- __MATHCALL (NAME,[_r], (ARGS...));
-
- This means there is a function `NAME' returning `double' and a function
- `NAMEf' returning `float'. Each place `_Mdouble_' appears in the
- prototype, that is actually `double' in the prototype for `NAME' and
- `float' in the prototype for `NAMEf'. Reentrant variant functions are
- called `NAME_r' and `NAMEf_r'.
-
- Functions returning other types like `int' are declared using the macro:
-
- __MATHDECL (TYPE, NAME,[_r], (ARGS...));
-
- This is just like __MATHCALL but for a function returning `TYPE'
- instead of `_Mdouble_'. In all of these cases, there is still
- both a `NAME' and a `NAMEf' that takes `float' arguments.
-
- Note that there must be no whitespace before the argument passed for
- NAME, to make token pasting work with -traditional. */
-
-#ifndef _MATH_H
- #error "Never include <bits/mathcalls.h> directly; include <math.h> instead."
-#endif
-
-
-/* Trigonometric functions. */
-
-/* Arc cosine of X. */
-__MATHCALL (acos,, (_Mdouble_ __x));
-/* Arc sine of X. */
-__MATHCALL (asin,, (_Mdouble_ __x));
-/* Arc tangent of X. */
-__MATHCALL (atan,, (_Mdouble_ __x));
-/* Arc tangent of Y/X. */
-__MATHCALL (atan2,, (_Mdouble_ __y, _Mdouble_ __x));
-
-/* Cosine of X. */
-__MATHCALL (cos,, (_Mdouble_ __x));
-/* Sine of X. */
-__MATHCALL (sin,, (_Mdouble_ __x));
-/* Tangent of X. */
-__MATHCALL (tan,, (_Mdouble_ __x));
-
-#ifdef __USE_GNU
-/* Cosine and sine of X. */
-__MATHDECL (void,sincos,,
- (_Mdouble_ __x, _Mdouble_ *__sinx, _Mdouble_ *__cosx));
-#endif
-
-/* Hyperbolic functions. */
-
-/* Hyperbolic cosine of X. */
-__MATHCALL (cosh,, (_Mdouble_ __x));
-/* Hyperbolic sine of X. */
-__MATHCALL (sinh,, (_Mdouble_ __x));
-/* Hyperbolic tangent of X. */
-__MATHCALL (tanh,, (_Mdouble_ __x));
-
-#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99
-/* Hyperbolic arc cosine of X. */
-__MATHCALL (acosh,, (_Mdouble_ __x));
-/* Hyperbolic arc sine of X. */
-__MATHCALL (asinh,, (_Mdouble_ __x));
-/* Hyperbolic arc tangent of X. */
-__MATHCALL (atanh,, (_Mdouble_ __x));
-#endif
-
-/* Exponential and logarithmic functions. */
-
-/* Exponential function of X. */
-__MATHCALL (exp,, (_Mdouble_ __x));
-
-#ifdef __USE_GNU
-/* A function missing in all standards: compute exponent to base ten. */
-__MATHCALL (exp10,, (_Mdouble_ __x));
-/* Another name occasionally used. */
-__MATHCALL (pow10,, (_Mdouble_ __x));
-#endif
-
-/* Break VALUE into a normalized fraction and an integral power of 2. */
-__MATHCALL (frexp,, (_Mdouble_ __x, int *__exponent));
-
-/* X times (two to the EXP power). */
-__MATHCALL (ldexp,, (_Mdouble_ __x, int __exponent));
-
-/* Natural logarithm of X. */
-__MATHCALL (log,, (_Mdouble_ __x));
-
-/* Base-ten logarithm of X. */
-__MATHCALL (log10,, (_Mdouble_ __x));
-
-/* Break VALUE into integral and fractional parts. */
-__MATHCALL (modf,, (_Mdouble_ __x, _Mdouble_ *__iptr));
-
-#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99
-/* Return exp(X) - 1. */
-__MATHCALL (expm1,, (_Mdouble_ __x));
-
-/* Return log(1 + X). */
-__MATHCALL (log1p,, (_Mdouble_ __x));
-
-/* Return the base 2 signed integral exponent of X. */
-__MATHCALL (logb,, (_Mdouble_ __x));
-#endif
-
-#ifdef __USE_ISOC99
-/* Compute base-2 exponential of X. */
-__MATHCALL (exp2,, (_Mdouble_ __x));
-
-/* Compute base-2 logarithm of X. */
-__MATHCALL (log2,, (_Mdouble_ __x));
-#endif
-
-
-/* Power functions. */
-
-/* Return X to the Y power. */
-__MATHCALL (pow,, (_Mdouble_ __x, _Mdouble_ __y));
-
-/* Return the square root of X. */
-__MATHCALL (sqrt,, (_Mdouble_ __x));
-
-#if defined __USE_MISC || defined __USE_XOPEN || defined __USE_ISOC99
-/* Return `sqrt(X*X + Y*Y)'. */
-__MATHCALL (hypot,, (_Mdouble_ __x, _Mdouble_ __y));
-#endif
-
-#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99
-/* Return the cube root of X. */
-__MATHCALL (cbrt,, (_Mdouble_ __x));
-#endif
-
-
-/* Nearest integer, absolute value, and remainder functions. */
-
-/* Smallest integral value not less than X. */
-__MATHCALL (ceil,, (_Mdouble_ __x));
-
-/* Absolute value of X. */
-__MATHCALLX (fabs,, (_Mdouble_ __x), (__const__));
-
-/* Largest integer not greater than X. */
-__MATHCALL (floor,, (_Mdouble_ __x));
-
-/* Floating-point modulo remainder of X/Y. */
-__MATHCALL (fmod,, (_Mdouble_ __x, _Mdouble_ __y));
-
-
-/* Return 0 if VALUE is finite or NaN, +1 if it
- is +Infinity, -1 if it is -Infinity. */
-__MATHDECL_1 (int,__isinf,, (_Mdouble_ __value)) __attribute__ ((__const__));
-
-/* Return nonzero if VALUE is finite and not NaN. */
-__MATHDECL_1 (int,__finite,, (_Mdouble_ __value)) __attribute__ ((__const__));
-
-#ifdef __USE_MISC
-/* Return 0 if VALUE is finite or NaN, +1 if it
- is +Infinity, -1 if it is -Infinity. */
-__MATHDECL_1 (int,isinf,, (_Mdouble_ __value)) __attribute__ ((__const__));
-
-/* Return nonzero if VALUE is finite and not NaN. */
-__MATHDECL_1 (int,finite,, (_Mdouble_ __value)) __attribute__ ((__const__));
-
-/* Return the remainder of X/Y. */
-__MATHCALL (drem,, (_Mdouble_ __x, _Mdouble_ __y));
-
-
-/* Return the fractional part of X after dividing out `ilogb (X)'. */
-__MATHCALL (significand,, (_Mdouble_ __x));
-#endif /* Use misc. */
-
-#if defined __USE_MISC || defined __USE_ISOC99
-/* Return X with its signed changed to Y's. */
-__MATHCALLX (copysign,, (_Mdouble_ __x, _Mdouble_ __y), (__const__));
-#endif
-
-#ifdef __USE_ISOC99
-/* Return representation of NaN for double type. */
-__MATHCALLX (nan,, (__const char *__tagb), (__const__));
-#endif
-
-
-/* Return nonzero if VALUE is not a number. */
-__MATHDECL_1 (int,__isnan,, (_Mdouble_ __value)) __attribute__ ((__const__));
-
-#if defined __USE_MISC || defined __USE_XOPEN
-/* Return nonzero if VALUE is not a number. */
-__MATHDECL_1 (int,isnan,, (_Mdouble_ __value)) __attribute__ ((__const__));
-
-/* Bessel functions. */
-__MATHCALL (j0,, (_Mdouble_));
-__MATHCALL (j1,, (_Mdouble_));
-__MATHCALL (jn,, (int, _Mdouble_));
-__MATHCALL (y0,, (_Mdouble_));
-__MATHCALL (y1,, (_Mdouble_));
-__MATHCALL (yn,, (int, _Mdouble_));
-#endif
-
-
-#if defined __USE_MISC || defined __USE_XOPEN || defined __USE_ISOC99
-/* Error and gamma functions. */
-__MATHCALL (erf,, (_Mdouble_));
-__MATHCALL (erfc,, (_Mdouble_));
-__MATHCALL (lgamma,, (_Mdouble_));
-#endif
-
-#ifdef __USE_ISOC99
-__MATHCALL (tgamma,, (_Mdouble_));
-#endif
-
-#if defined __USE_MISC || defined __USE_XOPEN
-/* Obsolete alias for `lgamma'. */
-__MATHCALL (gamma,, (_Mdouble_));
-#endif
-
-#ifdef __USE_MISC
-/* Reentrant version of lgamma. This function uses the global variable
- `signgam'. The reentrant version instead takes a pointer and stores
- the value through it. */
-__MATHCALL (lgamma,_r, (_Mdouble_, int *__signgamp));
-#endif
-
-
-#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99
-/* Return the integer nearest X in the direction of the
- prevailing rounding mode. */
-__MATHCALL (rint,, (_Mdouble_ __x));
-
-/* Return X + epsilon if X < Y, X - epsilon if X > Y. */
-__MATHCALLX (nextafter,, (_Mdouble_ __x, _Mdouble_ __y), (__const__));
-# ifdef __USE_ISOC99
-__MATHCALLX (nexttoward,, (_Mdouble_ __x, long double __y), (__const__));
-# endif
-
-/* Return the remainder of integer divison X / Y with infinite precision. */
-__MATHCALL (remainder,, (_Mdouble_ __x, _Mdouble_ __y));
-
-# if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
-/* Return X times (2 to the Nth power). */
-__MATHCALL (scalb,, (_Mdouble_ __x, _Mdouble_ __n));
-# endif
-
-# if defined __USE_MISC || defined __USE_ISOC99
-/* Return X times (2 to the Nth power). */
-__MATHCALL (scalbn,, (_Mdouble_ __x, int __n));
-# endif
-
-/* Return the binary exponent of X, which must be nonzero. */
-__MATHDECL (int,ilogb,, (_Mdouble_ __x));
-#endif
-
-#ifdef __USE_ISOC99
-/* Return X times (2 to the Nth power). */
-__MATHCALL (scalbln,, (_Mdouble_ __x, long int __n));
-
-/* Round X to integral value in floating-point format using current
- rounding direction, but do not raise inexact exception. */
-__MATHCALL (nearbyint,, (_Mdouble_ __x));
-
-/* Round X to nearest integral value, rounding halfway cases away from
- zero. */
-__MATHCALL (round,, (_Mdouble_ __x));
-
-/* Round X to the integral value in floating-point format nearest but
- not larger in magnitude. */
-__MATHCALLX (trunc,, (_Mdouble_ __x), (__const__));
-
-/* Compute remainder of X and Y and put in *QUO a value with sign of x/y
- and magnitude congruent `mod 2^n' to the magnitude of the integral
- quotient x/y, with n >= 3. */
-__MATHCALL (remquo,, (_Mdouble_ __x, _Mdouble_ __y, int *__quo));
-
-
-/* Conversion functions. */
-
-/* Round X to nearest integral value according to current rounding
- direction. */
-__MATHDECL (long int,lrint,, (_Mdouble_ __x));
-__MATHDECL (long long int,llrint,, (_Mdouble_ __x));
-
-/* Round X to nearest integral value, rounding halfway cases away from
- zero. */
-__MATHDECL (long int,lround,, (_Mdouble_ __x));
-__MATHDECL (long long int,llround,, (_Mdouble_ __x));
-
-
-/* Return positive difference between X and Y. */
-__MATHCALL (fdim,, (_Mdouble_ __x, _Mdouble_ __y));
-
-/* Return maximum numeric value from X and Y. */
-__MATHCALL (fmax,, (_Mdouble_ __x, _Mdouble_ __y));
-
-/* Return minimum numeric value from X and Y. */
-__MATHCALL (fmin,, (_Mdouble_ __x, _Mdouble_ __y));
-
-
-/* Classify given number. */
-__MATHDECL_1 (int, __fpclassify,, (_Mdouble_ __value))
- __attribute__ ((__const__));
-
-/* Test for negative number. */
-__MATHDECL_1 (int, __signbit,, (_Mdouble_ __value))
- __attribute__ ((__const__));
-
-
-/* Multiply-add function computed as a ternary operation. */
-__MATHCALL (fma,, (_Mdouble_ __x, _Mdouble_ __y, _Mdouble_ __z));
-#endif /* Use ISO C99. */
diff --git a/libc/sysdeps/linux/cris/bits/mman.h b/libc/sysdeps/linux/cris/bits/mman.h
deleted file mode 100644
index ec9d2a558..000000000
--- a/libc/sysdeps/linux/cris/bits/mman.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/* Definitions for POSIX memory map interface. Linux/CRIS version.
- Copyright (C) 1997, 2000, 2001, 2003 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. */
-
-#ifndef _SYS_MMAN_H
-# error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
-#endif
-
-/* The following definitions basically come from the kernel headers.
- But the kernel header is not namespace clean. */
-
-
-/* Protections are chosen from these bits, OR'd together. The
- implementation does not necessarily support PROT_EXEC or PROT_WRITE
- without PROT_READ. The only guarantees are that no writing will be
- allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */
-
-#define PROT_READ 0x1 /* Page can be read. */
-#define PROT_WRITE 0x2 /* Page can be written. */
-#define PROT_EXEC 0x4 /* Page can be executed. */
-#define PROT_NONE 0x0 /* Page can not be accessed. */
-#define PROT_GROWSDOWN 0x01000000 /* Extend change to start of
- growsdown vma (mprotect only). */
-#define PROT_GROWSUP 0x02000000 /* Extend change to start of
- growsup vma (mprotect only). */
-
-/* Sharing types (must choose one and only one of these). */
-#define MAP_SHARED 0x01 /* Share changes. */
-#define MAP_PRIVATE 0x02 /* Changes are private. */
-#ifdef __USE_MISC
-# define MAP_TYPE 0x0f /* Mask for type of mapping. */
-#endif
-
-/* Other flags. */
-#define MAP_FIXED 0x10 /* Interpret addr exactly. */
-#ifdef __USE_MISC
-# define MAP_FILE 0
-# define MAP_ANONYMOUS 0x20 /* Don't use a file. */
-# define MAP_ANON MAP_ANONYMOUS
-#endif
-
-/* These are Linux-specific. */
-#ifdef __USE_MISC
-# define MAP_GROWSDOWN 0x0100 /* Stack-like segment. */
-# define MAP_DENYWRITE 0x0800 /* ETXTBSY */
-# define MAP_EXECUTABLE 0x1000 /* Mark it as an executable. */
-# define MAP_LOCKED 0x2000 /* Lock the mapping. */
-# define MAP_NORESERVE 0x4000 /* Don't check for reservations. */
-#endif
-
-/* Flags to `msync'. */
-#define MS_ASYNC 1 /* Sync memory asynchronously. */
-#define MS_SYNC 4 /* Synchronous memory sync. */
-#define MS_INVALIDATE 2 /* Invalidate the caches. */
-
-/* Flags for `mlockall'. */
-#define MCL_CURRENT 1 /* Lock all currently mapped pages. */
-#define MCL_FUTURE 2 /* Lock all additions to address
- space. */
-
-/* Flags for `mremap'. */
-#ifdef __USE_GNU
-# define MREMAP_MAYMOVE 1
-# define MREMAP_FIXED 2
-#endif
-
-/* Advice to `madvise'. */
-#ifdef __USE_BSD
-# define MADV_NORMAL 0 /* No further special treatment. */
-# define MADV_RANDOM 1 /* Expect random page references. */
-# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
-# define MADV_WILLNEED 3 /* Will need these pages. */
-# define MADV_DONTNEED 4 /* Don't need these pages. */
-#endif
-
-/* The POSIX people had to invent similar names for the same things. */
-#ifdef __USE_XOPEN2K
-# define POSIX_MADV_NORMAL 0 /* No further special treatment. */
-# define POSIX_MADV_RANDOM 1 /* Expect random page references. */
-# define POSIX_MADV_SEQUENTIAL 2 /* Expect sequential page references. */
-# define POSIX_MADV_WILLNEED 3 /* Will need these pages. */
-# define POSIX_MADV_DONTNEED 4 /* Don't need these pages. */
-#endif
diff --git a/libc/sysdeps/linux/cris/bits/setjmp.h b/libc/sysdeps/linux/cris/bits/setjmp.h
index 2a29c8ca9..e9fcec184 100644
--- a/libc/sysdeps/linux/cris/bits/setjmp.h
+++ b/libc/sysdeps/linux/cris/bits/setjmp.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 2005 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
@@ -12,11 +12,10 @@
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. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
-/* Define the machine-dependent type `jmp_buf'. CRIS version. */
+/* Define the machine-dependent type `jmp_buf', CRIS version. */
#ifndef _BITS_SETJMP_H
#define _BITS_SETJMP_H 1
@@ -24,10 +23,8 @@
# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
#endif
-/*
- Note that we save and restore CCR to be able to
- correctly handle DI/EI. Note also that the "move x,ccr" does NOT affect
- the DMA enable bits (E and D).
+/* Note that saving and restoring CCR has no meaning in user mode, so we
+ don't actually do it; the slot is now reserved.
jmp_buf[0] - PC
jmp_buf[1] - SP (R14)
@@ -46,21 +43,8 @@
jmp_buf[14] - R1
jmp_buf[15] - R0
jmp_buf[16] - SRP
- jmp_buf[17] - CCR
- */
+ jmp_buf[17] - CCR */
-#define _JBLEN 18
-#if defined (__USE_MISC) || defined (_ASM)
-#define JB_SP 1
-#endif
-
-#ifndef _ASM
-typedef int __jmp_buf[_JBLEN];
-#endif
-
-/* Test if longjmp to JMPBUF would unwind the frame
- containing a local variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(jmpbuf, address) \
- ((void *) (address) < (void *) (jmpbuf)[JB_SP])
+typedef int __jmp_buf[18];
#endif /* bits/setjmp.h */
diff --git a/libc/sysdeps/linux/cris/bits/stackinfo.h b/libc/sysdeps/linux/cris/bits/stackinfo.h
index 43c944834..6b36cafd6 100644
--- a/libc/sysdeps/linux/cris/bits/stackinfo.h
+++ b/libc/sysdeps/linux/cris/bits/stackinfo.h
@@ -12,9 +12,8 @@
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. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
/* This file contains a bit of information about the stack allocation
of the processor. */
diff --git a/libc/sysdeps/linux/cris/bits/syscalls.h b/libc/sysdeps/linux/cris/bits/syscalls.h
index 93e7cf2d9..cb2f41cf7 100644
--- a/libc/sysdeps/linux/cris/bits/syscalls.h
+++ b/libc/sysdeps/linux/cris/bits/syscalls.h
@@ -7,85 +7,22 @@
#ifndef __ASSEMBLER__
-#include <errno.h>
-
-#define SYS_ify(syscall_name) (__NR_##syscall_name)
-
-#undef _syscall0
-#define _syscall0(type,name) \
-type name(void) \
-{ \
-return (type) (INLINE_SYSCALL(name, 0)); \
-}
-
-#undef _syscall1
-#define _syscall1(type,name,type1,arg1) \
-type name(type1 arg1) \
-{ \
-return (type) (INLINE_SYSCALL(name, 1, arg1)); \
-}
-
-#undef _syscall2
-#define _syscall2(type,name,type1,arg1,type2,arg2) \
-type name(type1 arg1,type2 arg2) \
-{ \
-return (type) (INLINE_SYSCALL(name, 2, arg1, arg2)); \
-}
-
-#undef _syscall3
-#define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \
-type name(type1 arg1,type2 arg2,type3 arg3) \
-{ \
-return (type) (INLINE_SYSCALL(name, 3, arg1, arg2, arg3)); \
-}
-
-#undef _syscall4
-#define _syscall4(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \
-type name (type1 arg1, type2 arg2, type3 arg3, type4 arg4) \
-{ \
-return (type) (INLINE_SYSCALL(name, 4, arg1, arg2, arg3, arg4)); \
-}
-
-#undef _syscall5
-#define _syscall5(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \
- type5,arg5) \
-type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \
-{ \
-return (type) (INLINE_SYSCALL(name, 5, arg1, arg2, arg3, arg4, arg5)); \
-}
-
-#undef _syscall6
-#define _syscall6(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \
- type5,arg5,type6,arg6) \
-type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5,type6 arg6) \
-{ \
-return (type) (INLINE_SYSCALL(name, 6, arg1, arg2, arg3, arg4, arg5, arg6)); \
-}
-
-#undef INLINE_SYSCALL
-#define INLINE_SYSCALL(name, nr, args...) \
+#define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \
+(__extension__ \
({ \
- unsigned long __sys_res; \
register unsigned long __res __asm__ ("r10"); \
- LOAD_ARGS_c_##nr (args) \
+ LOAD_ARGS_c_##nr(args) \
register unsigned long __callno __asm__ ("r9") \
- = SYS_ify (name); \
+ = name; \
__asm__ __volatile__ (LOAD_ARGS_asm_##nr (args) \
CHECK_ARGS_asm_##nr \
"break 13" \
: "=r" (__res) \
: ASM_ARGS_##nr (args) \
: ASM_CLOBBER_##nr); \
- __sys_res = __res; \
- \
- if (__sys_res >= (unsigned long) -4096) \
- { \
- __set_errno (- __sys_res); \
- __sys_res = (unsigned long) -1; \
- } \
- __sys_res; \
- })
-
+ __res; \
+ }) \
+)
#define LOAD_ARGS_c_0()
#define LOAD_ARGS_asm_0()
#define ASM_CLOBBER_0 "memory"
diff --git a/libc/sysdeps/linux/cris/bits/termios.h b/libc/sysdeps/linux/cris/bits/termios.h
index 63ca4ea93..22b59db3c 100644
--- a/libc/sysdeps/linux/cris/bits/termios.h
+++ b/libc/sysdeps/linux/cris/bits/termios.h
@@ -14,9 +14,8 @@
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. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#ifndef _TERMIOS_H
# error "Never include <bits/termios.h> directly; use <termios.h> instead."
diff --git a/libc/sysdeps/linux/cris/bits/uClibc_arch_features.h b/libc/sysdeps/linux/cris/bits/uClibc_arch_features.h
index bdd338792..517f68cd6 100644
--- a/libc/sysdeps/linux/cris/bits/uClibc_arch_features.h
+++ b/libc/sysdeps/linux/cris/bits/uClibc_arch_features.h
@@ -12,31 +12,31 @@
/* can your target use syscall6() for mmap ? */
#undef __UCLIBC_MMAP_HAS_6_ARGS__
-/* does your target use syscall4() for truncate64 ? (32bit arches only) */
-#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
+/* does your target align 64bit values in register pairs ? (32bit arches only) */
+#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
/* does your target have a broken create_module() ? */
#define __UCLIBC_BROKEN_CREATE_MODULE__
+/* does your target have to worry about older [gs]etrlimit() ? */
+#undef __UCLIBC_HANDLE_OLDER_RLIMIT__
+
/* does your target have an asm .set ? */
#define __UCLIBC_HAVE_ASM_SET_DIRECTIVE__
-/* define if target doesn't like .global */
-#undef __UCLIBC_ASM_GLOBAL_DIRECTIVE__
-
/* define if target supports .weak */
#define __UCLIBC_HAVE_ASM_WEAK_DIRECTIVE__
/* define if target supports .weakext */
#undef __UCLIBC_HAVE_ASM_WEAKEXT_DIRECTIVE__
-/* needed probably only for ppc64 */
-#undef __UCLIBC_HAVE_ASM_GLOBAL_DOT_NAME__
+/* define if target supports CFI pseudo ops */
+#undef __UCLIBC_HAVE_ASM_CFI_DIRECTIVES__
/* define if target supports IEEE signed zero floats */
#define __UCLIBC_HAVE_SIGNED_ZERO__
-/* lovely */
+/* only weird assemblers generally need this */
#define __UCLIBC_ASM_LINE_SEP__ @
#endif /* _BITS_UCLIBC_ARCH_FEATURES_H */
diff --git a/libc/sysdeps/linux/cris/bits/uClibc_page.h b/libc/sysdeps/linux/cris/bits/uClibc_page.h
index adfc3c9af..2818b333c 100644
--- a/libc/sysdeps/linux/cris/bits/uClibc_page.h
+++ b/libc/sysdeps/linux/cris/bits/uClibc_page.h
@@ -11,8 +11,8 @@
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the Free
- * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * License along with this library; if not, see
+ * <http://www.gnu.org/licenses/>.
*/
/* Supply an architecture specific value for PAGE_SIZE and friends. */
diff --git a/libc/sysdeps/linux/cris/bits/wordsize.h b/libc/sysdeps/linux/cris/bits/wordsize.h
index d6a2fc685..0f7882f88 100644
--- a/libc/sysdeps/linux/cris/bits/wordsize.h
+++ b/libc/sysdeps/linux/cris/bits/wordsize.h
@@ -13,7 +13,6 @@
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ see <http://www.gnu.org/licenses/>. */
#define __WORDSIZE 32