mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-21 00:47:28 +01:00
Don't assume that C compilers define __WORDSIZE
This commit is contained in:
1 parent
ad9931ff2e
commit
a07aa0a683
17 files changed
+35
-3
No files matched your search
@@ -42,9 +42,11 @@ extern "C" {
|
||||
// Wuffs assumes that:
|
||||
// - converting a uint32_t to a size_t will never overflow.
|
||||
// - converting a size_t to a uint64_t will never overflow.
|
||||
#ifdef __WORDSIZE
|
||||
#if (__WORDSIZE != 32) && (__WORDSIZE != 64)
|
||||
#error "Wuffs requires a word size of either 32 or 64 bits"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// WUFFS_VERSION is the major.minor.patch version, as per https://semver.org/,
|
||||
// as a uint64_t. The major number is the high 32 bits. The minor number is the
|
||||
|
||||
@@ -31,9 +31,11 @@ extern "C" {
|
||||
// Wuffs assumes that:
|
||||
// - converting a uint32_t to a size_t will never overflow.
|
||||
// - converting a size_t to a uint64_t will never overflow.
|
||||
#ifdef __WORDSIZE
|
||||
#if (__WORDSIZE != 32) && (__WORDSIZE != 64)
|
||||
#error "Wuffs requires a word size of either 32 or 64 bits"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// WUFFS_VERSION is the major.minor.patch version, as per https://semver.org/,
|
||||
// as a uint64_t. The major number is the high 32 bits. The minor number is the
|
||||
|
||||
@@ -31,9 +31,11 @@ extern "C" {
|
||||
// Wuffs assumes that:
|
||||
// - converting a uint32_t to a size_t will never overflow.
|
||||
// - converting a size_t to a uint64_t will never overflow.
|
||||
#ifdef __WORDSIZE
|
||||
#if (__WORDSIZE != 32) && (__WORDSIZE != 64)
|
||||
#error "Wuffs requires a word size of either 32 or 64 bits"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// WUFFS_VERSION is the major.minor.patch version, as per https://semver.org/,
|
||||
// as a uint64_t. The major number is the high 32 bits. The minor number is the
|
||||
|
||||
@@ -31,9 +31,11 @@ extern "C" {
|
||||
// Wuffs assumes that:
|
||||
// - converting a uint32_t to a size_t will never overflow.
|
||||
// - converting a size_t to a uint64_t will never overflow.
|
||||
#ifdef __WORDSIZE
|
||||
#if (__WORDSIZE != 32) && (__WORDSIZE != 64)
|
||||
#error "Wuffs requires a word size of either 32 or 64 bits"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// WUFFS_VERSION is the major.minor.patch version, as per https://semver.org/,
|
||||
// as a uint64_t. The major number is the high 32 bits. The minor number is the
|
||||
|
||||
@@ -31,9 +31,11 @@ extern "C" {
|
||||
// Wuffs assumes that:
|
||||
// - converting a uint32_t to a size_t will never overflow.
|
||||
// - converting a size_t to a uint64_t will never overflow.
|
||||
#ifdef __WORDSIZE
|
||||
#if (__WORDSIZE != 32) && (__WORDSIZE != 64)
|
||||
#error "Wuffs requires a word size of either 32 or 64 bits"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// WUFFS_VERSION is the major.minor.patch version, as per https://semver.org/,
|
||||
// as a uint64_t. The major number is the high 32 bits. The minor number is the
|
||||
|
||||
@@ -31,9 +31,11 @@ extern "C" {
|
||||
// Wuffs assumes that:
|
||||
// - converting a uint32_t to a size_t will never overflow.
|
||||
// - converting a size_t to a uint64_t will never overflow.
|
||||
#ifdef __WORDSIZE
|
||||
#if (__WORDSIZE != 32) && (__WORDSIZE != 64)
|
||||
#error "Wuffs requires a word size of either 32 or 64 bits"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// WUFFS_VERSION is the major.minor.patch version, as per https://semver.org/,
|
||||
// as a uint64_t. The major number is the high 32 bits. The minor number is the
|
||||
|
||||
@@ -31,9 +31,11 @@ extern "C" {
|
||||
// Wuffs assumes that:
|
||||
// - converting a uint32_t to a size_t will never overflow.
|
||||
// - converting a size_t to a uint64_t will never overflow.
|
||||
#ifdef __WORDSIZE
|
||||
#if (__WORDSIZE != 32) && (__WORDSIZE != 64)
|
||||
#error "Wuffs requires a word size of either 32 or 64 bits"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// WUFFS_VERSION is the major.minor.patch version, as per https://semver.org/,
|
||||
// as a uint64_t. The major number is the high 32 bits. The minor number is the
|
||||
|
||||
@@ -31,9 +31,11 @@ extern "C" {
|
||||
// Wuffs assumes that:
|
||||
// - converting a uint32_t to a size_t will never overflow.
|
||||
// - converting a size_t to a uint64_t will never overflow.
|
||||
#ifdef __WORDSIZE
|
||||
#if (__WORDSIZE != 32) && (__WORDSIZE != 64)
|
||||
#error "Wuffs requires a word size of either 32 or 64 bits"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// WUFFS_VERSION is the major.minor.patch version, as per https://semver.org/,
|
||||
// as a uint64_t. The major number is the high 32 bits. The minor number is the
|
||||
|
||||
@@ -31,9 +31,11 @@ extern "C" {
|
||||
// Wuffs assumes that:
|
||||
// - converting a uint32_t to a size_t will never overflow.
|
||||
// - converting a size_t to a uint64_t will never overflow.
|
||||
#ifdef __WORDSIZE
|
||||
#if (__WORDSIZE != 32) && (__WORDSIZE != 64)
|
||||
#error "Wuffs requires a word size of either 32 or 64 bits"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// WUFFS_VERSION is the major.minor.patch version, as per https://semver.org/,
|
||||
// as a uint64_t. The major number is the high 32 bits. The minor number is the
|
||||
|
||||
@@ -31,9 +31,11 @@ extern "C" {
|
||||
// Wuffs assumes that:
|
||||
// - converting a uint32_t to a size_t will never overflow.
|
||||
// - converting a size_t to a uint64_t will never overflow.
|
||||
#ifdef __WORDSIZE
|
||||
#if (__WORDSIZE != 32) && (__WORDSIZE != 64)
|
||||
#error "Wuffs requires a word size of either 32 or 64 bits"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// WUFFS_VERSION is the major.minor.patch version, as per https://semver.org/,
|
||||
// as a uint64_t. The major number is the high 32 bits. The minor number is the
|
||||
|
||||
@@ -31,9 +31,11 @@ extern "C" {
|
||||
// Wuffs assumes that:
|
||||
// - converting a uint32_t to a size_t will never overflow.
|
||||
// - converting a size_t to a uint64_t will never overflow.
|
||||
#ifdef __WORDSIZE
|
||||
#if (__WORDSIZE != 32) && (__WORDSIZE != 64)
|
||||
#error "Wuffs requires a word size of either 32 or 64 bits"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// WUFFS_VERSION is the major.minor.patch version, as per https://semver.org/,
|
||||
// as a uint64_t. The major number is the high 32 bits. The minor number is the
|
||||
|
||||
@@ -31,9 +31,11 @@ extern "C" {
|
||||
// Wuffs assumes that:
|
||||
// - converting a uint32_t to a size_t will never overflow.
|
||||
// - converting a size_t to a uint64_t will never overflow.
|
||||
#ifdef __WORDSIZE
|
||||
#if (__WORDSIZE != 32) && (__WORDSIZE != 64)
|
||||
#error "Wuffs requires a word size of either 32 or 64 bits"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// WUFFS_VERSION is the major.minor.patch version, as per https://semver.org/,
|
||||
// as a uint64_t. The major number is the high 32 bits. The minor number is the
|
||||
|
||||
@@ -31,9 +31,11 @@ extern "C" {
|
||||
// Wuffs assumes that:
|
||||
// - converting a uint32_t to a size_t will never overflow.
|
||||
// - converting a size_t to a uint64_t will never overflow.
|
||||
#ifdef __WORDSIZE
|
||||
#if (__WORDSIZE != 32) && (__WORDSIZE != 64)
|
||||
#error "Wuffs requires a word size of either 32 or 64 bits"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// WUFFS_VERSION is the major.minor.patch version, as per https://semver.org/,
|
||||
// as a uint64_t. The major number is the high 32 bits. The minor number is the
|
||||
|
||||
@@ -31,9 +31,11 @@ extern "C" {
|
||||
// Wuffs assumes that:
|
||||
// - converting a uint32_t to a size_t will never overflow.
|
||||
// - converting a size_t to a uint64_t will never overflow.
|
||||
#ifdef __WORDSIZE
|
||||
#if (__WORDSIZE != 32) && (__WORDSIZE != 64)
|
||||
#error "Wuffs requires a word size of either 32 or 64 bits"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// WUFFS_VERSION is the major.minor.patch version, as per https://semver.org/,
|
||||
// as a uint64_t. The major number is the high 32 bits. The minor number is the
|
||||
|
||||
@@ -31,9 +31,11 @@ extern "C" {
|
||||
// Wuffs assumes that:
|
||||
// - converting a uint32_t to a size_t will never overflow.
|
||||
// - converting a size_t to a uint64_t will never overflow.
|
||||
#ifdef __WORDSIZE
|
||||
#if (__WORDSIZE != 32) && (__WORDSIZE != 64)
|
||||
#error "Wuffs requires a word size of either 32 or 64 bits"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// WUFFS_VERSION is the major.minor.patch version, as per https://semver.org/,
|
||||
// as a uint64_t. The major number is the high 32 bits. The minor number is the
|
||||
|
||||
Reference in new issue
Block a user