summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi.dcr@tutanota.com>2023-11-29 12:53:05 +0100
committerXavier Del Campo Romero <xavi.dcr@tutanota.com>2023-11-29 12:54:52 +0100
commit2ffa7e5c7b6b75df9eb7e54f8c4f73af7dd28563 (patch)
treeca3b6eb7e1793a55df0867b128bf8a36fc63802f
parentecfc7a127b9be4f5d42e4c244bc8b60ff1074492 (diff)
libpsx: Move type definitions to stdint.h
According to C99 ยง7.8, inttypes.h is meant to include stdint.h, and not the other way around.
-rw-r--r--libpsx/include/inttypes.h37
-rw-r--r--libpsx/include/stdint.h39
2 files changed, 37 insertions, 39 deletions
diff --git a/libpsx/include/inttypes.h b/libpsx/include/inttypes.h
index 4c252af..3ee09c7 100644
--- a/libpsx/include/inttypes.h
+++ b/libpsx/include/inttypes.h
@@ -5,43 +5,6 @@
#include <stdint.h>
-typedef unsigned char uint8_t;
-typedef unsigned short uint16_t;
-typedef unsigned int uint32_t;
-typedef unsigned long long uint64_t;
-
-typedef unsigned char uint_least8_t;
-typedef unsigned short uint_least16_t;
-typedef unsigned int uint_least32_t;
-typedef unsigned long long uint_least64_t;
-
-typedef unsigned char uint_fast8_t;
-typedef unsigned short uint_fast16_t;
-typedef unsigned int uint_fast32_t;
-typedef unsigned long long uint_fast64_t;
-
-typedef unsigned long long uintmax_t;
-typedef unsigned int uintptr_t;
-
-typedef signed char int8_t;
-typedef short int16_t;
-typedef int int32_t;
-typedef long long int64_t;
-
-typedef signed char int_least8_t;
-typedef short int_least16_t;
-typedef int int_least32_t;
-typedef long long int_least64_t;
-
-typedef char int_fast8_t;
-typedef short int_fast16_t;
-typedef int int_fast32_t;
-typedef long long int_fast64_t;
-
-typedef long long intmax_t;
-
-typedef long intptr_t;
-
#define PRIu8 "hhu"
#define PRIu16 "hu"
#define PRIu32 "u"
diff --git a/libpsx/include/stdint.h b/libpsx/include/stdint.h
index e6bb9d2..cf2dd84 100644
--- a/libpsx/include/stdint.h
+++ b/libpsx/include/stdint.h
@@ -3,12 +3,47 @@
#ifndef _STDINT_H
#define _STDINT_H
-#include <inttypes.h>
-
// Added ifndef or otherwise GCC 4.8 would complain
#ifndef __PTRDIFF_TYPE__
typedef unsigned int ptrdiff_t;
#endif
+typedef unsigned char uint8_t;
+typedef unsigned short uint16_t;
+typedef unsigned int uint32_t;
+typedef unsigned long long uint64_t;
+
+typedef unsigned char uint_least8_t;
+typedef unsigned short uint_least16_t;
+typedef unsigned int uint_least32_t;
+typedef unsigned long long uint_least64_t;
+
+typedef unsigned char uint_fast8_t;
+typedef unsigned short uint_fast16_t;
+typedef unsigned int uint_fast32_t;
+typedef unsigned long long uint_fast64_t;
+
+typedef unsigned long long uintmax_t;
+typedef unsigned int uintptr_t;
+
+typedef signed char int8_t;
+typedef short int16_t;
+typedef int int32_t;
+typedef long long int64_t;
+
+typedef signed char int_least8_t;
+typedef short int_least16_t;
+typedef int int_least32_t;
+typedef long long int_least64_t;
+
+typedef char int_fast8_t;
+typedef short int_fast16_t;
+typedef int int_fast32_t;
+typedef long long int_fast64_t;
+
+typedef long long intmax_t;
+
+typedef long intptr_t;
+
#endif