diff options
| author | Sebastian Paarz <[email protected]> | 2026-01-09 17:15:40 +0100 |
|---|---|---|
| committer | Sebastian Paarz <[email protected]> | 2026-01-09 17:15:40 +0100 |
| commit | a0f797865e94b84dde2696bb07d8defc4bf8f20f (patch) | |
| tree | c78e0a3eecc8a4b33ee24342f12176a11c61f19d | |
| parent | 4bac14878277471196c964aa355d7e6d3143666b (diff) | |
Use compiler defines to determine endianess
| -rw-r--r-- | ports/rxv1/ccrx/inc/nx_port.h | 4 | ||||
| -rw-r--r-- | ports/rxv1/gnu/inc/nx_port.h | 4 | ||||
| -rw-r--r-- | ports/rxv1/iar/inc/nx_port.h | 4 | ||||
| -rw-r--r-- | ports/rxv2/ccrx/inc/nx_port.h | 4 | ||||
| -rw-r--r-- | ports/rxv2/gnu/inc/nx_port.h | 4 | ||||
| -rw-r--r-- | ports/rxv2/iar/inc/nx_port.h | 4 | ||||
| -rw-r--r-- | ports/rxv3/ccrx/inc/nx_port.h | 4 | ||||
| -rw-r--r-- | ports/rxv3/gnu/inc/nx_port.h | 4 | ||||
| -rw-r--r-- | ports/rxv3/iar/inc/nx_port.h | 4 |
9 files changed, 27 insertions, 9 deletions
diff --git a/ports/rxv1/ccrx/inc/nx_port.h b/ports/rxv1/ccrx/inc/nx_port.h index 7141cdde..b9ec5331 100644 --- a/ports/rxv1/ccrx/inc/nx_port.h +++ b/ports/rxv1/ccrx/inc/nx_port.h @@ -66,9 +66,11 @@ #endif -/* Default to little endian, since this is what most ARM targets are. */ +/* Use compilers define to determine endianness. */ +#ifdef __LIT #define NX_LITTLE_ENDIAN 1 +#endif #include <stdio.h> diff --git a/ports/rxv1/gnu/inc/nx_port.h b/ports/rxv1/gnu/inc/nx_port.h index 9c52ed05..0270b5e8 100644 --- a/ports/rxv1/gnu/inc/nx_port.h +++ b/ports/rxv1/gnu/inc/nx_port.h @@ -63,9 +63,11 @@ #endif -/* Default to little endian, since this is what most ARM targets are. */ +/* Use compilers define to determine endianness. */ +#ifdef __RX_LITTLE_ENDIAN__ #define NX_LITTLE_ENDIAN 1 +#endif #include <stdio.h> diff --git a/ports/rxv1/iar/inc/nx_port.h b/ports/rxv1/iar/inc/nx_port.h index 5bac9369..57a8454f 100644 --- a/ports/rxv1/iar/inc/nx_port.h +++ b/ports/rxv1/iar/inc/nx_port.h @@ -63,9 +63,11 @@ #endif -/* Default to little endian, since this is what most ARM targets are. */ +/* Use compilers define to determine endianness. */ +#if __LITTLE_ENDIAN__ #define NX_LITTLE_ENDIAN 1 +#endif #include <stdio.h> diff --git a/ports/rxv2/ccrx/inc/nx_port.h b/ports/rxv2/ccrx/inc/nx_port.h index 9943befb..5598117d 100644 --- a/ports/rxv2/ccrx/inc/nx_port.h +++ b/ports/rxv2/ccrx/inc/nx_port.h @@ -66,9 +66,11 @@ #endif -/* Default to little endian, since this is what most ARM targets are. */ +/* Use compilers define to determine endianness. */ +#ifdef __LIT #define NX_LITTLE_ENDIAN 1 +#endif #include <stdio.h> diff --git a/ports/rxv2/gnu/inc/nx_port.h b/ports/rxv2/gnu/inc/nx_port.h index 3d0592b0..bc0d6bae 100644 --- a/ports/rxv2/gnu/inc/nx_port.h +++ b/ports/rxv2/gnu/inc/nx_port.h @@ -63,9 +63,11 @@ #endif -/* Default to little endian, since this is what most ARM targets are. */ +/* Use compilers define to determine endianness. */ +#ifdef __RX_LITTLE_ENDIAN__ #define NX_LITTLE_ENDIAN 1 +#endif #include <stdio.h> diff --git a/ports/rxv2/iar/inc/nx_port.h b/ports/rxv2/iar/inc/nx_port.h index bc59abf7..f5fd75df 100644 --- a/ports/rxv2/iar/inc/nx_port.h +++ b/ports/rxv2/iar/inc/nx_port.h @@ -63,9 +63,11 @@ #endif -/* Default to little endian, since this is what most ARM targets are. */ +/* Use compilers define to determine endianness. */ +#if __LITTLE_ENDIAN__ #define NX_LITTLE_ENDIAN 1 +#endif #include <stdio.h> diff --git a/ports/rxv3/ccrx/inc/nx_port.h b/ports/rxv3/ccrx/inc/nx_port.h index 597822da..3f932b85 100644 --- a/ports/rxv3/ccrx/inc/nx_port.h +++ b/ports/rxv3/ccrx/inc/nx_port.h @@ -66,9 +66,11 @@ #endif -/* Default to little endian, since this is what most ARM targets are. */ +/* Use compilers define to determine endianness. */ +#ifdef __LIT #define NX_LITTLE_ENDIAN 1 +#endif #include <stdio.h> diff --git a/ports/rxv3/gnu/inc/nx_port.h b/ports/rxv3/gnu/inc/nx_port.h index c3181868..009bbb5b 100644 --- a/ports/rxv3/gnu/inc/nx_port.h +++ b/ports/rxv3/gnu/inc/nx_port.h @@ -63,9 +63,11 @@ #endif -/* Default to little endian, since this is what most ARM targets are. */ +/* Use compilers define to determine endianness. */ +#ifdef __RX_LITTLE_ENDIAN__ #define NX_LITTLE_ENDIAN 1 +#endif #include <stdio.h> diff --git a/ports/rxv3/iar/inc/nx_port.h b/ports/rxv3/iar/inc/nx_port.h index dad49506..95aa0ecb 100644 --- a/ports/rxv3/iar/inc/nx_port.h +++ b/ports/rxv3/iar/inc/nx_port.h @@ -63,9 +63,11 @@ #endif -/* Default to little endian, since this is what most ARM targets are. */ +/* Use compilers define to determine endianness. */ +#if __LITTLE_ENDIAN__ #define NX_LITTLE_ENDIAN 1 +#endif #include <stdio.h> |
