Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F109296141
D42699.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
12 KB
Referenced Files
None
Subscribers
None
D42699.diff
View Options
diff --git a/stand/efi/include/amd64/efibind.h b/stand/efi/include/amd64/efibind.h
--- a/stand/efi/include/amd64/efibind.h
+++ b/stand/efi/include/amd64/efibind.h
@@ -26,89 +26,6 @@
#pragma pack()
-
-#ifdef __FreeBSD__
-#include <sys/stdint.h>
-#else
-//
-// Basic int types of various widths
-//
-
-#if (__STDC_VERSION__ < 199901L )
-
- // No ANSI C 1999/2000 stdint.h integer width declarations
-
- #ifdef _MSC_EXTENSIONS
-
- // Use Microsoft C compiler integer width declarations
-
- typedef unsigned __int64 uint64_t;
- typedef __int64 int64_t;
- typedef unsigned __int32 uint32_t;
- typedef __int32 int32_t;
- typedef unsigned short uint16_t;
- typedef short int16_t;
- typedef unsigned char uint8_t;
- typedef char int8_t;
- #else
- #ifdef UNIX_LP64
-
- // Use LP64 programming model from C_FLAGS for integer width declarations
-
- typedef unsigned long uint64_t;
- typedef long int64_t;
- typedef unsigned int uint32_t;
- typedef int int32_t;
- typedef unsigned short uint16_t;
- typedef short int16_t;
- typedef unsigned char uint8_t;
- typedef char int8_t;
- #else
-
- // Assume P64 programming model from C_FLAGS for integer width declarations
-
- typedef unsigned long long uint64_t;
- typedef long long int64_t;
- typedef unsigned int uint32_t;
- typedef int int32_t;
- typedef unsigned short uint16_t;
- typedef short int16_t;
- typedef unsigned char uint8_t;
- typedef char int8_t;
- #endif
- #endif
-#endif
-#endif /* __FreeBSD__ */
-
-//
-// Basic EFI types of various widths
-//
-
-#ifndef ACPI_THREAD_ID /* ACPI's definitions are fine */
-#define ACPI_USE_SYSTEM_INTTYPES 1 /* Tell ACPI we've defined types */
-
-typedef uint64_t UINT64;
-typedef int64_t INT64;
-
-#ifndef _BASETSD_H_
- typedef uint32_t UINT32;
- typedef int32_t INT32;
-#endif
-
-typedef uint16_t UINT16;
-typedef int16_t INT16;
-typedef uint8_t UINT8;
-typedef int8_t INT8;
-
-#endif
-
-#undef VOID
-#define VOID void
-
-
-typedef int64_t INTN;
-typedef uint64_t UINTN;
-
#ifdef EFI_NT_EMULATOR
#define POST_CODE(_Data)
#else
diff --git a/stand/efi/include/arm/efibind.h b/stand/efi/include/arm/efibind.h
--- a/stand/efi/include/arm/efibind.h
+++ b/stand/efi/include/arm/efibind.h
@@ -40,41 +40,6 @@
#endif
-#ifdef __FreeBSD__
-#include <sys/stdint.h>
-#else
-//
-// Assume standard IA-32 alignment.
-// BugBug: Need to check portability of long long
-//
-typedef unsigned long long uint64_t;
-typedef long long int64_t;
-typedef unsigned int uint32_t;
-typedef int int32_t;
-typedef unsigned short uint16_t;
-typedef short int16_t;
-typedef unsigned char uint8_t;
-typedef signed char int8_t;
-#endif
-
-typedef uint64_t UINT64;
-typedef int64_t INT64;
-typedef uint32_t UINT32;
-typedef int32_t INT32;
-typedef uint16_t UINT16;
-typedef int16_t INT16;
-typedef uint8_t UINT8;
-typedef int8_t INT8;
-
-#undef VOID
-#define VOID void
-
-//
-// Native integer size in stdint.h
-//
-typedef uint32_t UINTN;
-typedef int32_t INTN;
-
#define EFIERR(a) (0x80000000 | a)
#define EFI_ERROR_MASK 0x80000000
#define EFIERR_OEM(a) (0xc0000000 | a)
diff --git a/stand/efi/include/arm64/efibind.h b/stand/efi/include/arm64/efibind.h
--- a/stand/efi/include/arm64/efibind.h
+++ b/stand/efi/include/arm64/efibind.h
@@ -26,82 +26,6 @@
#pragma pack()
-
-#ifdef __FreeBSD__
-#include <sys/stdint.h>
-#else
-//
-// Basic int types of various widths
-//
-
-#if (__STDC_VERSION__ < 199901L )
-
- // No ANSI C 1999/2000 stdint.h integer width declarations
-
- #ifdef _MSC_EXTENSIONS
-
- // Use Microsoft C compiler integer width declarations
-
- typedef unsigned __int64 uint64_t;
- typedef __int64 int64_t;
- typedef unsigned __int32 uint32_t;
- typedef __int32 int32_t;
- typedef unsigned __int16 uint16_t;
- typedef __int16 int16_t;
- typedef unsigned __int8 uint8_t;
- typedef __int8 int8_t;
- #else
- #ifdef UNIX_LP64
-
- // Use LP64 programming model from C_FLAGS for integer width declarations
-
- typedef unsigned long uint64_t;
- typedef long int64_t;
- typedef unsigned int uint32_t;
- typedef int int32_t;
- typedef unsigned short uint16_t;
- typedef short int16_t;
- typedef unsigned char uint8_t;
- typedef char int8_t;
- #else
-
- // Assume P64 programming model from C_FLAGS for integer width declarations
-
- typedef unsigned long long uint64_t;
- typedef long long int64_t;
- typedef unsigned int uint32_t;
- typedef int int32_t;
- typedef unsigned short uint16_t;
- typedef short int16_t;
- typedef unsigned char uint8_t;
- typedef char int8_t;
- #endif
- #endif
-#endif
-#endif /* __FreeBSD__ */
-
-//
-// Basic EFI types of various widths
-//
-
-
-typedef uint64_t UINT64;
-typedef int64_t INT64;
-typedef uint32_t UINT32;
-typedef int32_t INT32;
-typedef uint16_t UINT16;
-typedef int16_t INT16;
-typedef uint8_t UINT8;
-typedef int8_t INT8;
-
-
-#undef VOID
-#define VOID void
-
-
-typedef int64_t INTN;
-typedef uint64_t UINTN;
-
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// BugBug: Code to debug
//
diff --git a/stand/efi/include/efi.h b/stand/efi/include/efi.h
--- a/stand/efi/include/efi.h
+++ b/stand/efi/include/efi.h
@@ -39,6 +39,37 @@
#define EFI_FIRMWARE_MINOR_REVISION 62
#define EFI_FIRMWARE_REVISION ((EFI_FIRMWARE_MAJOR_REVISION <<16) | (EFI_FIRMWARE_MINOR_REVISION))
+//
+// Basic EFI types of various widths.
+//
+
+#include <stdint.h>
+#ifndef ACPI_THREAD_ID /* ACPI's definitions are fine */
+#define ACPI_USE_SYSTEM_INTTYPES 1 /* Tell ACPI we've defined types */
+
+typedef uint64_t UINT64;
+typedef int64_t INT64;
+typedef uint32_t UINT32;
+typedef int32_t INT32;
+typedef uint16_t UINT16;
+typedef int16_t INT16;
+typedef uint8_t UINT8;
+typedef int8_t INT8;
+
+#ifdef __LP64__
+typedef int64_t INTN;
+typedef uint64_t UINTN;
+#else
+typedef int32_t INTN;
+typedef uint32_t UINTN;
+#endif
+
+#endif
+
+#undef VOID
+#define VOID void
+
+
#include "efibind.h"
#include "efidef.h"
#include "efidevp.h"
diff --git a/stand/efi/include/i386/efibind.h b/stand/efi/include/i386/efibind.h
--- a/stand/efi/include/i386/efibind.h
+++ b/stand/efi/include/i386/efibind.h
@@ -26,89 +26,6 @@
#pragma pack()
-
-#ifdef __FreeBSD__
-#include <sys/stdint.h>
-#else
-//
-// Basic int types of various widths
-//
-
-#if (__STDC_VERSION__ < 199901L )
-
- // No ANSI C 1999/2000 stdint.h integer width declarations
-
- #ifdef _MSC_EXTENSIONS
-
- // Use Microsoft C compiler integer width declarations
-
- typedef unsigned __int64 uint64_t;
- typedef __int64 int64_t;
- typedef unsigned __int32 uint32_t;
- typedef __int32 int32_t;
- typedef unsigned short uint16_t;
- typedef short int16_t;
- typedef unsigned char uint8_t;
- typedef char int8_t;
- #else
- #ifdef UNIX_LP64
-
- // Use LP64 programming model from C_FLAGS for integer width declarations
-
- typedef unsigned long uint64_t;
- typedef long int64_t;
- typedef unsigned int uint32_t;
- typedef int int32_t;
- typedef unsigned short uint16_t;
- typedef short int16_t;
- typedef unsigned char uint8_t;
- typedef char int8_t;
- #else
-
- // Assume P64 programming model from C_FLAGS for integer width declarations
-
- typedef unsigned long long uint64_t;
- typedef long long int64_t;
- typedef unsigned int uint32_t;
- typedef int int32_t;
- typedef unsigned short uint16_t;
- typedef short int16_t;
- typedef unsigned char uint8_t;
- typedef char int8_t;
- #endif
- #endif
-#endif
-#endif /* __FreeBSD__ */
-
-//
-// Basic EFI types of various widths
-//
-
-#ifndef ACPI_THREAD_ID /* ACPI's definitions are fine, use those */
-#define ACPI_USE_SYSTEM_INTTYPES 1 /* Tell ACPI we've defined types */
-
-typedef uint64_t UINT64;
-typedef int64_t INT64;
-
-#ifndef _BASETSD_H_
- typedef uint32_t UINT32;
- typedef int32_t INT32;
-#endif
-
-typedef uint16_t UINT16;
-typedef int16_t INT16;
-typedef uint8_t UINT8;
-typedef int8_t INT8;
-
-#endif
-
-#undef VOID
-#define VOID void
-
-
-typedef int32_t INTN;
-typedef uint32_t UINTN;
-
#ifdef EFI_NT_EMULATOR
#define POST_CODE(_Data)
#else
diff --git a/stand/efi/include/riscv/efibind.h b/stand/efi/include/riscv/efibind.h
--- a/stand/efi/include/riscv/efibind.h
+++ b/stand/efi/include/riscv/efibind.h
@@ -26,82 +26,6 @@
#pragma pack()
-
-#ifdef __FreeBSD__
-#include <sys/stdint.h>
-#else
-//
-// Basic int types of various widths
-//
-
-#if (__STDC_VERSION__ < 199901L )
-
- // No ANSI C 1999/2000 stdint.h integer width declarations
-
- #ifdef _MSC_EXTENSIONS
-
- // Use Microsoft C compiler integer width declarations
-
- typedef unsigned __int64 uint64_t;
- typedef __int64 int64_t;
- typedef unsigned __int32 uint32_t;
- typedef __int32 int32_t;
- typedef unsigned __int16 uint16_t;
- typedef __int16 int16_t;
- typedef unsigned __int8 uint8_t;
- typedef __int8 int8_t;
- #else
- #ifdef UNIX_LP64
-
- // Use LP64 programming model from C_FLAGS for integer width declarations
-
- typedef unsigned long uint64_t;
- typedef long int64_t;
- typedef unsigned int uint32_t;
- typedef int int32_t;
- typedef unsigned short uint16_t;
- typedef short int16_t;
- typedef unsigned char uint8_t;
- typedef char int8_t;
- #else
-
- // Assume P64 programming model from C_FLAGS for integer width declarations
-
- typedef unsigned long long uint64_t;
- typedef long long int64_t;
- typedef unsigned int uint32_t;
- typedef int int32_t;
- typedef unsigned short uint16_t;
- typedef short int16_t;
- typedef unsigned char uint8_t;
- typedef char int8_t;
- #endif
- #endif
-#endif
-#endif /* __FreeBSD__ */
-
-//
-// Basic EFI types of various widths
-//
-
-
-typedef uint64_t UINT64;
-typedef int64_t INT64;
-typedef uint32_t UINT32;
-typedef int32_t INT32;
-typedef uint16_t UINT16;
-typedef int16_t INT16;
-typedef uint8_t UINT8;
-typedef int8_t INT8;
-
-
-#undef VOID
-#define VOID void
-
-
-typedef int64_t INTN;
-typedef uint64_t UINTN;
-
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// BugBug: Code to debug
//
diff --git a/stand/efi/loader/main.c b/stand/efi/loader/main.c
--- a/stand/efi/loader/main.c
+++ b/stand/efi/loader/main.c
@@ -60,7 +60,6 @@
#include "efizfs.h"
#include "framebuffer.h"
-#define ACPI_USE_SYSTEM_INTTYPES 1
#include "platform/acfreebsd.h"
#include "acconfig.h"
#define ACPI_SYSTEM_XFACE
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Feb 4, 5:06 AM (20 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16448299
Default Alt Text
D42699.diff (12 KB)
Attached To
Mode
D42699: stand/efi: Consolidate integer types
Attached
Detach File
Event Timeline
Log In to Comment