diff --git a/arch/sparc32/builtin.c b/arch/sparc32/builtin.c index 46309b8..12f3c9f 100644 --- a/arch/sparc32/builtin.c +++ b/arch/sparc32/builtin.c @@ -7,7 +7,7 @@ */ #include "openbios/config.h" -#include +#include "asm/types.h" #include "sys_info.h" /* diff --git a/arch/sparc32/romvec.c b/arch/sparc32/romvec.c index a5705f3..7832563 100644 --- a/arch/sparc32/romvec.c +++ b/arch/sparc32/romvec.c @@ -8,7 +8,6 @@ */ #include "openprom.h" -#include "stdint.h" #include "asm/io.h" #include "asm/types.h" #include "libc/vsprintf.h" diff --git a/arch/sparc64/builtin.c b/arch/sparc64/builtin.c index 5784a22..9e0fef2 100644 --- a/arch/sparc64/builtin.c +++ b/arch/sparc64/builtin.c @@ -7,7 +7,7 @@ */ #include "openbios/config.h" -#include +#include "asm/types.h" #include "sys_info.h" /* diff --git a/drivers/adb.c b/drivers/adb.c index bee4088..e23f1c6 100644 --- a/drivers/adb.c +++ b/drivers/adb.c @@ -23,6 +23,7 @@ #include "openbios/config.h" #include "openbios/bindings.h" +#include "asm/types.h" #include "adb.h" #include "kbd.h" #include "cuda.h" diff --git a/drivers/adb.h b/drivers/adb.h index c492481..6b95ca1 100644 --- a/drivers/adb.h +++ b/drivers/adb.h @@ -20,8 +20,6 @@ #if !defined(__OHW_ADB_H__) #define __OHW_ADB_H__ -#include - typedef struct adb_bus_t adb_bus_t; typedef struct adb_dev_t adb_dev_t; diff --git a/drivers/esp.h b/drivers/esp.h index 07a1e23..2b9bd5e 100644 --- a/drivers/esp.h +++ b/drivers/esp.h @@ -9,7 +9,7 @@ #define _SPARC_ESP_H /* For dvma controller register definitions. */ -#include +#include "asm/dma.h" /* The ESP SCSI controllers have their register sets in three * "classes": diff --git a/drivers/kbd.c b/drivers/kbd.c index b65ebc6..e5a1b3a 100644 --- a/drivers/kbd.c +++ b/drivers/kbd.c @@ -19,8 +19,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA, 02110-1301 USA */ -#include -#include +#include "asm/types.h" #include "kbd.h" //#define DEBUG_KBD diff --git a/drivers/kbd.h b/drivers/kbd.h index c6069a2..852b194 100644 --- a/drivers/kbd.h +++ b/drivers/kbd.h @@ -21,7 +21,6 @@ #if !defined (__OHW_KBD_H__) #define __OHW_KBD_H__ -#include typedef struct kbd_t kbd_t; typedef struct keymap_t keymap_t; struct kbd_t { diff --git a/drivers/vga_load_regs.c b/drivers/vga_load_regs.c index 05deefa..7b80e85 100644 --- a/drivers/vga_load_regs.c +++ b/drivers/vga_load_regs.c @@ -1,6 +1,5 @@ #include "asm/io.h" #include "video_subr.h" -#include "string.h" #include "vga.h" /* diff --git a/fs/grubfs/fsys_ext2fs.c b/fs/grubfs/fsys_ext2fs.c index 0f615f1..7f00918 100644 --- a/fs/grubfs/fsys_ext2fs.c +++ b/fs/grubfs/fsys_ext2fs.c @@ -22,7 +22,7 @@ #include "openbios/config.h" #include "shared.h" #include "filesys.h" -#include +#include "libc/byteorder.h" #ifdef CONFIG_DEBUG_EXT2FS #define E2DEBUG diff --git a/fs/grubfs/fsys_reiserfs.c b/fs/grubfs/fsys_reiserfs.c index 52d4155..1c16bef 100644 --- a/fs/grubfs/fsys_reiserfs.c +++ b/fs/grubfs/fsys_reiserfs.c @@ -40,7 +40,7 @@ typedef unsigned long long __u64; /* linux/posix_type.h */ typedef long linux_off_t; -#include +#include "libc/byteorder.h" /* include/linux/reiser_fs.h */ /* This is the new super block of a journaling reiserfs system */ diff --git a/fs/grubfs/fsys_ufs.c b/fs/grubfs/fsys_ufs.c index 7ff7f96..b694650 100644 --- a/fs/grubfs/fsys_ufs.c +++ b/fs/grubfs/fsys_ufs.c @@ -53,7 +53,7 @@ */ #ifdef FSYS_UFS -#include +#include "asm/types.h" #include "shared.h" #include "filesys.h" diff --git a/include/ppc/types.h b/include/ppc/types.h index 63b8384..bd168a1 100644 --- a/include/ppc/types.h +++ b/include/ppc/types.h @@ -11,30 +11,22 @@ #include "mconfig.h" -#ifndef __APPLE__ +#ifdef BOOTSTRAP #include #else -/* Mac OS X */ -typedef char int8_t; -typedef unsigned char uint8_t; -typedef unsigned char u_int8_t; -typedef short int16_t; -typedef unsigned short uint16_t; -typedef unsigned short u_int16_t; -typedef int int32_t; -typedef unsigned int uint32_t; -typedef unsigned int u_int32_t; -typedef long long int64_t; +typedef unsigned char uint8_t; +typedef unsigned short uint16_t; +typedef unsigned int uint32_t; typedef unsigned long long uint64_t; -typedef unsigned long long u_int64_t; + +typedef signed char int8_t; +typedef short int16_t; +typedef int int32_t; +typedef long long int64_t; #endif /* endianess */ -#ifdef HAVE_ENDIAN_H -#include -#else -#include -#endif +#include "autoconf.h" /* cell based types */ diff --git a/include/sparc32/types.h b/include/sparc32/types.h index 6c7c8d5..bd168a1 100644 --- a/include/sparc32/types.h +++ b/include/sparc32/types.h @@ -11,7 +11,19 @@ #include "mconfig.h" +#ifdef BOOTSTRAP #include +#else +typedef unsigned char uint8_t; +typedef unsigned short uint16_t; +typedef unsigned int uint32_t; +typedef unsigned long long uint64_t; + +typedef signed char int8_t; +typedef short int16_t; +typedef int int32_t; +typedef long long int64_t; +#endif /* endianess */ #include "autoconf.h" diff --git a/include/sparc64/types.h b/include/sparc64/types.h index b512125..34c6b5f 100644 --- a/include/sparc64/types.h +++ b/include/sparc64/types.h @@ -11,7 +11,26 @@ #include "mconfig.h" +#ifdef BOOTSTRAP #include +#else +typedef unsigned char uint8_t; +typedef unsigned short uint16_t; +typedef unsigned int uint32_t; +typedef unsigned long long uint64_t; + +typedef signed char int8_t; +typedef short int16_t; +typedef int int32_t; +typedef long long int64_t; +#endif + +/* endianess */ +#include "autoconf.h" + +/* cell based types */ +typedef int64_t cell; +typedef uint64_t ucell; #ifdef NEED_FAKE_INT128_T typedef struct { @@ -19,15 +38,12 @@ typedef struct { uint64_t lo; } blob_128_t; -typedef blob_128_t __int128_t; -typedef blob_128_t __uint128_t; -#endif - -/* cell based types */ -typedef int64_t cell; -typedef uint64_t ucell; +typedef blob_128_t dcell; +typedef blob_128_t ducell; +#else typedef __int128_t dcell; typedef __uint128_t ducell; +#endif #define bitspercell (sizeof(cell)<<3) #define bitsperdcell (sizeof(dcell)<<3) @@ -39,11 +55,11 @@ typedef __uint128_t ducell; typedef unsigned char u8; typedef unsigned short u16; typedef unsigned int u32; -typedef unsigned long u64; +typedef unsigned long long u64; typedef signed char s8; typedef short s16; typedef int s32; -typedef long s64; +typedef long long s64; #endif