summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
authorMiles Bader <miles@lsi.nec.co.jp>2002-03-05 02:18:47 +0000
committerMiles Bader <miles@lsi.nec.co.jp>2002-03-05 02:18:47 +0000
commitcb744468838407ccc5e98b96353056dd0475e8f2 (patch)
tree2a75d13131a0462e19b013490ce933f33f02fefc /libc
parent808a01687d0c113f939b52b2c453f2873a7096eb (diff)
Re-add files which were mistakenly deleted during the big bits/ update.
Diffstat (limited to 'libc')
-rw-r--r--libc/sysdeps/linux/v850/bits/byteswap.h63
-rw-r--r--libc/sysdeps/linux/v850/bits/endian.h18
-rw-r--r--libc/sysdeps/linux/v850/bits/fcntl.h179
-rw-r--r--libc/sysdeps/linux/v850/bits/mman.h98
-rw-r--r--libc/sysdeps/linux/v850/bits/poll.h43
-rw-r--r--libc/sysdeps/linux/v850/bits/select.h64
-rw-r--r--libc/sysdeps/linux/v850/bits/setjmp.h37
-rw-r--r--libc/sysdeps/linux/v850/bits/wordsize.h19
8 files changed, 521 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/v850/bits/byteswap.h b/libc/sysdeps/linux/v850/bits/byteswap.h
new file mode 100644
index 000000000..44fbee488
--- /dev/null
+++ b/libc/sysdeps/linux/v850/bits/byteswap.h
@@ -0,0 +1,63 @@
+/*
+ * libc/sysdeps/linux/v850/bits/byteswap.h -- Macros to swap the order
+ * of bytes in integer values
+ *
+ * Copyright (C) 2001 NEC Corporation
+ * Copyright (C) 2001 Miles Bader <miles@gnu.org>
+ * Copyright (C) 1997,1998,2001 Free Software Foundation, Inc.
+ *
+ * This file is subject to the terms and conditions of the GNU Lesser
+ * General Public License. See the file COPYING.LIB in the main
+ * directory of this archive for more details.
+ */
+
+#if !defined _BYTESWAP_H && !defined _NETINET_IN_H
+# error "Never use <bits/byteswap.h> directly; include <byteswap.h> instead."
+#endif
+
+/* Swap bytes in 16 bit value. */
+#define __bswap_constant_16(x) \
+ ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8))
+
+#ifdef __GNUC__
+# define __bswap_16(x) \
+ (__extension__ \
+ ({ unsigned long int __bswap_16_v; \
+ if (__builtin_constant_p (x)) \
+ __bswap_16_v = __bswap_constant_16 (x); \
+ else \
+ __asm__ ("bsh %1, %0" : "=r" (__bswap_16_v) : "r" (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) \
+ ((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >> 8) | \
+ (((x) & 0x0000ff00) << 8) | (((x) & 0x000000ff) << 24))
+
+#ifdef __GNUC__
+# define __bswap_32(x) \
+ (__extension__ \
+ ({ unsigned long int __bswap_32_v; \
+ if (__builtin_constant_p (x)) \
+ __bswap_32_v = __bswap_constant_32 (x); \
+ else \
+ __asm__ ("bsw %1, %0" : "=r" (__bswap_32_v) : "r" (x)); \
+ __bswap_32_v; }))
+#else
+# define __bswap_32(x) __bswap_constant_32 (x)
+#endif
+
+#if defined __GNUC__ && __GNUC__ >= 2
+/* Swap bytes in 64 bit value. */
+# define __bswap_64(x) \
+ (__extension__ \
+ ({ union { unsigned long long int __ll; \
+ unsigned long int __l[2]; } __bswap_64_v, __bswap_64_r; \
+ __bswap_64_v.__ll = (x); \
+ __bswap_64_r.__l[0] = __bswap_32 (__bswap_64_v.__l[1]); \
+ __bswap_64_r.__l[1] = __bswap_32 (__bswap_64_v.__l[0]); \
+ __bswap_64_r.__ll; }))
+#endif
diff --git a/libc/sysdeps/linux/v850/bits/endian.h b/libc/sysdeps/linux/v850/bits/endian.h
new file mode 100644
index 000000000..8fdd95520
--- /dev/null
+++ b/libc/sysdeps/linux/v850/bits/endian.h
@@ -0,0 +1,18 @@
+/*
+ * libc/sysdeps/linux/v850/bits/endian.h -- Define processor endianess
+ *
+ * Copyright (C) 2001 NEC Corporation
+ * Copyright (C) 2001 Miles Bader <miles@gnu.org>
+ *
+ * This file is subject to the terms and conditions of the GNU Lesser
+ * General Public License. See the file COPYING.LIB in the main
+ * directory of this archive for more details.
+ *
+ * Written by Miles Bader <miles@gnu.org>
+ */
+
+#ifndef _ENDIAN_H
+# error "Never use <bits/endian.h> directly; include <endian.h> instead."
+#endif
+
+#define __BYTE_ORDER __LITTLE_ENDIAN
diff --git a/libc/sysdeps/linux/v850/bits/fcntl.h b/libc/sysdeps/linux/v850/bits/fcntl.h
new file mode 100644
index 000000000..7de111adb
--- /dev/null
+++ b/libc/sysdeps/linux/v850/bits/fcntl.h
@@ -0,0 +1,179 @@
+/* O_*, F_*, FD_* bit values for Linux.
+ Copyright (C) 2000 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 _FCNTL_H
+# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
+#endif
+
+
+#include <sys/types.h>
+
+/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
+ located on an ext2 file system */
+#define O_ACCMODE 0003
+#define O_RDONLY 00
+#define O_WRONLY 01
+#define O_RDWR 02
+#define O_CREAT 0100 /* not fcntl */
+#define O_EXCL 0200 /* not fcntl */
+#define O_NOCTTY 0400 /* not fcntl */
+#define O_TRUNC 01000 /* not fcntl */
+#define O_APPEND 02000
+#define O_NONBLOCK 04000
+#define O_NDELAY O_NONBLOCK
+#define O_SYNC 010000
+#define O_FSYNC O_SYNC
+#define O_ASYNC 020000
+
+#ifdef __USE_GNU
+# define O_DIRECTORY 040000 /* Must be a directory. */
+# define O_NOFOLLOW 0100000 /* Do not follow links. */
+# define O_DIRECT 0200000 /* Direct disk access. */
+#endif
+
+/* For now Linux has synchronisity options for data and read operations.
+ We define the symbols here but let them do the same as O_SYNC since
+ this is a superset. */
+#if defined __USE_POSIX199309 || defined __USE_UNIX98
+# define O_DSYNC O_SYNC /* Synchronize data. */
+# define O_RSYNC O_SYNC /* Synchronize read operations. */
+#endif
+
+#ifdef __USE_LARGEFILE64
+# define O_LARGEFILE 0400000
+#endif
+
+/* Values for the second argument to `fcntl'. */
+#define F_DUPFD 0 /* Duplicate file descriptor. */
+#define F_GETFD 1 /* Get file descriptor flags. */
+#define F_SETFD 2 /* Set file descriptor flags. */
+#define F_GETFL 3 /* Get file status flags. */
+#define F_SETFL 4 /* Set file status flags. */
+#ifndef __USE_FILE_OFFSET64
+# define F_GETLK 5 /* Get record locking info. */
+# define F_SETLK 6 /* Set record locking info (non-blocking). */
+# define F_SETLKW 7 /* Set record locking info (blocking). */
+#else
+# define F_GETLK F_GETLK64 /* Get record locking info. */
+# define F_SETLK F_SETLK64 /* Set record locking info (non-blocking).*/
+# define F_SETLKW F_SETLKW64 /* Set record locking info (blocking). */
+#endif
+#define F_GETLK64 12 /* Get record locking info. */
+#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
+# define F_SETOWN 8 /* Get owner of socket (receiver of SIGIO). */
+# define F_GETOWN 9 /* Set owner of socket (receiver of SIGIO). */
+#endif
+
+#ifdef __USE_GNU
+# define F_SETSIG 10 /* Set number of signal to be sent. */
+# define F_GETSIG 11 /* Get number of signal to be sent. */
+#endif
+
+#ifdef __USE_GNU
+# define F_SETLEASE 1024 /* Set a lease. */
+# define F_GETLEASE 1025 /* Enquire what lease is active. */
+# define F_NOTIFY 1026 /* Request notfications on a directory. */
+#endif
+
+/* For F_[GET|SET]FL. */
+#define FD_CLOEXEC 1 /* actually anything with low bit set goes */
+
+/* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */
+#define F_RDLCK 0 /* Read lock. */
+#define F_WRLCK 1 /* Write lock. */
+#define F_UNLCK 2 /* Remove lock. */
+
+/* For old implementation of bsd flock(). */
+#define F_EXLCK 4 /* or 3 */
+#define F_SHLCK 8 /* or 4 */
+
+#ifdef __USE_BSD
+/* Operations for bsd flock(), also used by the kernel implementation. */
+# define LOCK_SH 1 /* shared lock */
+# define LOCK_EX 2 /* exclusive lock */
+# define LOCK_NB 4 /* or'd with one of the above to prevent
+ blocking */
+# define LOCK_UN 8 /* remove lock */
+#endif
+
+#ifdef __USE_GNU
+# define LOCK_MAND 32 /* This is a mandatory flock: */
+# define LOCK_READ 64 /* ... which allows concurrent read operations. */
+# define LOCK_WRITE 128 /* ... which allows concurrent write operations. */
+# define LOCK_RW 192 /* ... Which allows concurrent read & write operations. */
+#endif
+
+#ifdef __USE_GNU
+/* Types of directory notifications that may be requested with F_NOTIFY. */
+# define DN_ACCESS 0x00000001 /* File accessed. */
+# define DN_MODIFY 0x00000002 /* File modified. */
+# define DN_CREATE 0x00000004 /* File created. */
+# define DN_DELETE 0x00000008 /* File removed. */
+# define DN_RENAME 0x00000010 /* File renamed. */
+# define DN_ATTRIB 0x00000020 /* File changed attibutes. */
+# define DN_MULTISHOT 0x80000000 /* Don't remove notifier. */
+#endif
+
+struct flock
+ {
+ short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
+ short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
+#ifndef __USE_FILE_OFFSET64
+ __off_t l_start; /* Offset where the lock begins. */
+ __off_t l_len; /* Size of the locked area; zero means until EOF. */
+#else
+ __off64_t l_start; /* Offset where the lock begins. */
+ __off64_t l_len; /* Size of the locked area; zero means until EOF. */
+#endif
+ __pid_t l_pid; /* Process holding the lock. */
+ };
+
+#ifdef __USE_LARGEFILE64
+struct flock64
+ {
+ short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
+ short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
+ __off64_t l_start; /* Offset where the lock begins. */
+ __off64_t l_len; /* Size of the locked area; zero means until EOF. */
+ __pid_t l_pid; /* Process holding the lock. */
+ };
+#endif
+
+/* Define some more compatibility macros to be backward compatible with
+ BSD systems which did not managed to hide these kernel macros. */
+#ifdef __USE_BSD
+# define FAPPEND O_APPEND
+# define FFSYNC O_FSYNC
+# define FASYNC O_ASYNC
+# define FNONBLOCK O_NONBLOCK
+# define FNDELAY O_NDELAY
+#endif /* Use BSD. */
+
+/* Advise to `posix_fadvise'. */
+#ifdef __USE_XOPEN2K
+# define POSIX_FADV_NORMAL 0 /* No further special treatment. */
+# define POSIX_FADV_RANDOM 1 /* Expect random page references. */
+# define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */
+# define POSIX_FADV_WILLNEED 3 /* Will need these pages. */
+# define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */
+# define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */
+#endif
diff --git a/libc/sysdeps/linux/v850/bits/mman.h b/libc/sysdeps/linux/v850/bits/mman.h
new file mode 100644
index 000000000..b32e636c9
--- /dev/null
+++ b/libc/sysdeps/linux/v850/bits/mman.h
@@ -0,0 +1,98 @@
+/* Definitions for POSIX memory map interface. Linux/v850 version.
+ Copyright (C) 1997, 1999, 2001, 2002 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. */
+
+/* These are the bits used by 4.4 BSD and its derivatives. On systems
+ (such as GNU) where these facilities are not system services but can be
+ emulated in the C library, these are the definitions we emulate. */
+
+#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. */
+
+/* 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. */
+
+/* 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
+
+
+/* Flags for `mlockall' (can be OR'd together). */
+#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
+#endif
diff --git a/libc/sysdeps/linux/v850/bits/poll.h b/libc/sysdeps/linux/v850/bits/poll.h
new file mode 100644
index 000000000..f7a739315
--- /dev/null
+++ b/libc/sysdeps/linux/v850/bits/poll.h
@@ -0,0 +1,43 @@
+/* Copyright (C) 1997, 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. */
+
+#ifndef _SYS_POLL_H
+# error "Never use <bits/poll.h> directly; include <sys/poll.h> instead."
+#endif
+
+/* Event types that can be polled for. These bits may be set in `events'
+ to indicate the interesting event types; they will appear in `revents'
+ to indicate the status of the file descriptor. */
+#define POLLIN 0x001 /* There is data to read. */
+#define POLLPRI 0x002 /* There is urgent data to read. */
+#define POLLOUT 0x004 /* Writing now will not block. */
+
+#ifdef __USE_XOPEN
+/* These values are defined in XPG4.2. */
+# define POLLRDNORM 0x040 /* Normal data may be read. */
+# define POLLRDBAND 0x080 /* Priority data may be read. */
+# define POLLWRNORM POLLOUT /* Writing now will not block. */
+# define POLLWRBAND 0x100 /* Priority data may be written. */
+#endif
+
+/* Event types always implicitly polled for. These bits need not be set in
+ `events', but they will appear in `revents' to indicate the status of
+ the file descriptor. */
+#define POLLERR 0x008 /* Error condition. */
+#define POLLHUP 0x010 /* Hung up. */
+#define POLLNVAL 0x020 /* Invalid polling request. */
diff --git a/libc/sysdeps/linux/v850/bits/select.h b/libc/sysdeps/linux/v850/bits/select.h
new file mode 100644
index 000000000..b6bb05452
--- /dev/null
+++ b/libc/sysdeps/linux/v850/bits/select.h
@@ -0,0 +1,64 @@
+/*
+ * include/bits/select.h -- fd_set operations
+ *
+ * Copyright (C) 2001 NEC Corporation
+ * Copyright (C) 2001 Miles Bader <miles@gnu.org>
+ * Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ *
+ * This file is subject to the terms and conditions of the GNU Lesser
+ * General Public License. See the file COPYING.LIB in the main
+ * directory of this archive for more details.
+ */
+
+#ifndef _SYS_SELECT_H
+# error "Never use <bits/select.h> directly; include <sys/select.h> instead."
+#endif
+
+#ifdef __GNUC__
+
+/* We don't use `memset' because this would require a prototype and
+ the array isn't too big. */
+#define __FD_ZERO(s) \
+ do { \
+ unsigned int __i; \
+ fd_set *__arr = (s); \
+ for (__i = 0; __i < sizeof (fd_set) / sizeof (__fd_mask); ++__i) \
+ __FDS_BITS (__arr)[__i] = 0; \
+ } while (0)
+
+#define __FD_SET(fd, s) \
+ do { \
+ int __fd = (fd); \
+ void *__addr = (void *)&__FDS_BITS (s); \
+ __asm__ __volatile__ ("set1 %0, [%1]" \
+ : /*nothing*/ \
+ : "r" (__fd & 0x7), "r" (__addr + (__fd >> 3)));\
+ } while (0)
+
+#define __FD_CLR(fd, s) \
+ do { \
+ int __fd = (fd); \
+ void *__addr = (void *)&__FDS_BITS (s); \
+ __asm__ __volatile__ ("clr1 %0, [%1]" \
+ : /*nothing*/ \
+ : "r" (__fd & 0x7), "r" (__addr + (__fd >> 3)));\
+ } while (0)
+
+#define __FD_ISSET(fd, s) \
+ ({ \
+ int __fd = (fd); \
+ void *__addr = (void *)&__FDS_BITS (s); \
+ int res; \
+ __asm__ ("tst1 %1, [%2]; setf nz, %0" \
+ : "=r" (res) \
+ : "r" (__fd & 0x7), "r" (__addr + (__fd >> 3))); \
+ res; \
+ })
+
+#else /* !__GNUC__ */
+
+#define __FD_SET(d, s) (__FDS_BITS (s)[__FDELT(d)] |= __FDMASK(d))
+#define __FD_CLR(d, s) (__FDS_BITS (s)[__FDELT(d)] &= ~__FDMASK(d))
+#define __FD_ISSET(d, s) ((__FDS_BITS (s)[__FDELT(d)] & __FDMASK(d)) != 0)
+
+#endif /* __GNUC__ */
diff --git a/libc/sysdeps/linux/v850/bits/setjmp.h b/libc/sysdeps/linux/v850/bits/setjmp.h
new file mode 100644
index 000000000..3e4214a27
--- /dev/null
+++ b/libc/sysdeps/linux/v850/bits/setjmp.h
@@ -0,0 +1,37 @@
+/*
+ * libc/sysdeps/linux/v850/bits/setjmp.h -- v850 version of `jmp_buf' type
+ *
+ * Copyright (C) 2001 NEC Corporation
+ * Copyright (C) 2001 Miles Bader <miles@gnu.org>
+ *
+ * This file is subject to the terms and conditions of the GNU Lesser
+ * General Public License. See the file COPYING.LIB in the main
+ * directory of this archive for more details.
+ *
+ * Written by Miles Bader <miles@gnu.org>
+ */
+
+#ifndef _SETJMP_H
+# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
+#endif
+
+#ifndef _ASM
+typedef struct
+ {
+ /* Stack pointer. */
+ void *__sp;
+
+ /* Link pointer. */
+ void *__lp;
+
+ /* Callee-saved registers r2 and r20-r29. */
+ int __regs[11];
+ } __jmp_buf[1];
+#endif
+
+#define JB_SIZE (4 * 13)
+
+/* Test if longjmp to JMPBUF would unwind the frame
+ containing a local variable at ADDRESS. */
+#define _JMPBUF_UNWINDS(jmpbuf, address) \
+ ((__ptr_t) (address) < &(jmpbuf)[0].__sp)
diff --git a/libc/sysdeps/linux/v850/bits/wordsize.h b/libc/sysdeps/linux/v850/bits/wordsize.h
new file mode 100644
index 000000000..ba643b60a
--- /dev/null
+++ b/libc/sysdeps/linux/v850/bits/wordsize.h
@@ -0,0 +1,19 @@
+/* Copyright (C) 1999 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. */
+
+#define __WORDSIZE 32