diff options
author | Erik Andersen <andersen@codepoet.org> | 2000-05-14 04:19:43 +0000 |
---|---|---|
committer | Erik Andersen <andersen@codepoet.org> | 2000-05-14 04:19:43 +0000 |
commit | e9efa23ae121c8976e5dc2bbcf29e029b5087e76 (patch) | |
tree | 55c9bdfec6626bdcb4fa81548a6177b28d8ee223 /include | |
parent | 64bc6412188b141c010ac3b8e813b837dd991e80 (diff) |
Patch from "D. Jeff Dionne / VE3DJF" <jeff@rt-control.com>
to allow uC-libc to compile under x86.
-Erik
Diffstat (limited to 'include')
-rw-r--r-- | include/errno.h | 1 | ||||
-rw-r--r-- | include/sys/bitypes.h | 4 | ||||
-rw-r--r-- | include/sys/cdefs.h | 5 | ||||
-rw-r--r-- | include/sys/socket.h | 1 | ||||
-rw-r--r-- | include/sys/wait.h | 1 | ||||
-rw-r--r-- | include/syscall.h | 8 | ||||
-rw-r--r-- | include/unistd.h | 8 |
7 files changed, 18 insertions, 10 deletions
diff --git a/include/errno.h b/include/errno.h index 871c95bef..498db0fbf 100644 --- a/include/errno.h +++ b/include/errno.h @@ -13,6 +13,7 @@ extern int _sys_nerr; extern char *_sys_errlist[]; #endif + extern int errno; __BEGIN_DECLS diff --git a/include/sys/bitypes.h b/include/sys/bitypes.h index e2ac0ab45..ec7781a9d 100644 --- a/include/sys/bitypes.h +++ b/include/sys/bitypes.h @@ -83,12 +83,12 @@ typedef unsigned short u_int16_t; typedef int int32_t; typedef unsigned int u_int32_t; - +#if 0 # if __GNUC__ >= 2 && !defined(__STRICT_ANSI__) typedef long long int64_t; typedef unsigned long long u_int64_t; # endif - +#endif #endif /* __BIT_TYPES_DEFINED__ */ /* #endif __USE_BSD */ diff --git a/include/sys/cdefs.h b/include/sys/cdefs.h index 0afc8830f..4acb72b70 100644 --- a/include/sys/cdefs.h +++ b/include/sys/cdefs.h @@ -10,7 +10,6 @@ /* This is not a typedef so `const __ptr_t' does the right thing. */ #define __ptr_t void * -typedef long double __long_double_t; #else @@ -19,10 +18,6 @@ typedef long double __long_double_t; #define __ptr_t char * -#ifndef __HAS_NO_FLOATS__ -typedef double __long_double_t; -#endif - #endif /* No C++ */ diff --git a/include/sys/socket.h b/include/sys/socket.h index 5dcef2d1b..3a898ee13 100644 --- a/include/sys/socket.h +++ b/include/sys/socket.h @@ -2,6 +2,7 @@ #define _SYS_SOCKET_H #include <features.h> +#include <errno.h> #include <sys/types.h> #include <linux/socket.h> diff --git a/include/sys/wait.h b/include/sys/wait.h index 95f1b2eab..14c237307 100644 --- a/include/sys/wait.h +++ b/include/sys/wait.h @@ -24,6 +24,7 @@ Cambridge, MA 02139, USA. */ #define _SYS_WAIT_H 1 #include <features.h> +#include <errno.h> __BEGIN_DECLS diff --git a/include/syscall.h b/include/syscall.h index fa08654a3..332b7dd4a 100644 --- a/include/syscall.h +++ b/include/syscall.h @@ -1,6 +1,12 @@ +#if 0 #include <errno.h> - +#endif #define __check_errno(__res) ((__res) >= 0) +#ifdef __mc68000__ #include <m68k/syscall.h> +#else +#include <i386/syscall.h> +#endif + #include <sys/syscall.h> diff --git a/include/unistd.h b/include/unistd.h index 6c39b42c5..ef67fafc4 100644 --- a/include/unistd.h +++ b/include/unistd.h @@ -6,8 +6,9 @@ #define __UNISTD_H #include <errno.h> +#ifdef __mc68000__ #include <asm/unistd.h> - +#endif #define STDIN_FILENO 0 #define STDOUT_FILENO 1 #define STDERR_FILENO 2 @@ -72,6 +73,8 @@ __res; \ }) #endif +#ifdef __mc68000__ + #define vfork() ({ \ register unsigned long __res __asm__ ("%d0") = __NR_fork; \ __asm__ __volatile__ ("trap #0" \ @@ -86,9 +89,10 @@ if (__res >= (unsigned long)-4096) { \ }) + #define fork fork_not_available_use_vfork #define clone clone_not_available_use__clone - +#endif #ifndef SEEK_SET #define SEEK_SET 0 |