From e9efa23ae121c8976e5dc2bbcf29e029b5087e76 Mon Sep 17 00:00:00 2001 From: Erik Andersen Date: Sun, 14 May 2000 04:19:43 +0000 Subject: Patch from "D. Jeff Dionne / VE3DJF" to allow uC-libc to compile under x86. -Erik --- include/errno.h | 1 + include/sys/bitypes.h | 4 ++-- include/sys/cdefs.h | 5 ----- include/sys/socket.h | 1 + include/sys/wait.h | 1 + include/syscall.h | 8 +++++++- include/unistd.h | 8 ++++++-- 7 files changed, 18 insertions(+), 10 deletions(-) (limited to 'include') 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 +#include #include #include 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 +#include __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 - +#endif #define __check_errno(__res) ((__res) >= 0) +#ifdef __mc68000__ #include +#else +#include +#endif + #include 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 +#ifdef __mc68000__ #include - +#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 -- cgit v1.2.3