aboutsummaryrefslogtreecommitdiff
path: root/stand/ficl
diff options
context:
space:
mode:
authorBrandon Bergren <bdragon@FreeBSD.org>2020-09-14 15:48:30 +0000
committerBrandon Bergren <bdragon@FreeBSD.org>2020-09-14 15:48:30 +0000
commit9e4c35f867aca020df8d01fb7371bf5ae1cc8a2d (patch)
tree6fbf336b12b0a67de696b71f8422fddae1cc0a0d /stand/ficl
parent115c987b3f80a23936de527de434ebb77b06bddd (diff)
downloadsrc-9e4c35f867aca020df8d01fb7371bf5ae1cc8a2d.tar.gz
src-9e4c35f867aca020df8d01fb7371bf5ae1cc8a2d.zip
stand/ficl 64-bit compatibility
Currently, the only thing that prevents a functioning 64-bit FICL build is a few integer types that were intended to be fixed-width. Changing them to C99 integer types allows building a functioning 64-bit FICL. While this isn't applicable to the default settings of any in-tree loaders, it is necessary for a future Petitboot loader, due to the requirement that it be compiled as a 64-bit program. Reviewed by: tsoome, imp (earlier revision) Sponsored by: Tag1 Consulting, Inc. Differential Revision: https://reviews.freebsd.org/D26364
Notes
Notes: svn path=/head/; revision=365724
Diffstat (limited to 'stand/ficl')
-rw-r--r--stand/ficl/ficl.h2
-rw-r--r--stand/ficl/powerpc/sysdep.h9
2 files changed, 7 insertions, 4 deletions
diff --git a/stand/ficl/ficl.h b/stand/ficl/ficl.h
index a6f8f03c5732..239eb382cde3 100644
--- a/stand/ficl/ficl.h
+++ b/stand/ficl/ficl.h
@@ -249,7 +249,7 @@ typedef struct ficl_system_info FICL_SYSTEM_INFO;
** complement of false... that unifies logical and bitwise operations
** nicely.
*/
-#define FICL_TRUE ((unsigned long)~(0L))
+#define FICL_TRUE ((FICL_UNS)~(0LL))
#define FICL_FALSE (0)
#define FICL_BOOL(x) ((x) ? FICL_TRUE : FICL_FALSE)
diff --git a/stand/ficl/powerpc/sysdep.h b/stand/ficl/powerpc/sysdep.h
index 3ae748e259c7..b31625e18649 100644
--- a/stand/ficl/powerpc/sysdep.h
+++ b/stand/ficl/powerpc/sysdep.h
@@ -79,15 +79,15 @@
** System dependent data type declarations...
*/
#if !defined INT32
-#define INT32 int
+#define INT32 int32_t
#endif
#if !defined UNS32
-#define UNS32 unsigned int
+#define UNS32 uint32_t
#endif
#if !defined UNS16
-#define UNS16 unsigned short
+#define UNS16 uint16_t
#endif
#if !defined UNS8
@@ -367,6 +367,9 @@ typedef struct
*/
#if !defined FICL_ALIGN
#define FICL_ALIGN 2
+#endif
+
+#if !defined FICL_ALIGN_ADD
#define FICL_ALIGN_ADD ((1 << FICL_ALIGN) - 1)
#endif