Files
tp/include/dolphin/types.h
T
kipcode66andGitHub 1d2a0d9568 Add guards around std library headers (#3013)
* Last fix for standard compiler error

* adding define guards around headers

* rename cmath.h and climits.h to cmath and climits respectively

* renaming cstdarg.h to cstdarg

* renaming cstdlib.h to cstdlib

* renaming cstring.h to cstring

* renaming cstdio.h to cstdio

* renaming cmath locale ctype

* renaming stdarg string and va_list

* renaming cstddef

* renaming stdio stddef stdlib

* renaming algorithm, functional, iterator, memory, and utility

* renaming bitset, cstdint, limits, and stdint

* renaming new and type_traits

* update quote includes for standard library headers to angle bracket includes
2026-01-05 03:50:45 -08:00

89 lines
1.7 KiB
C

#ifndef _DOLPHIN_TYPES_H_
#define _DOLPHIN_TYPES_H_
#ifdef __REVOLUTION_SDK__
#include <revolution/types.h>
#else
typedef signed char s8;
typedef unsigned char u8;
typedef signed short int s16;
typedef unsigned short int u16;
typedef signed long s32;
typedef unsigned long u32;
typedef signed long long int s64;
typedef unsigned long long int u64;
typedef volatile u8 vu8;
typedef volatile u16 vu16;
typedef volatile u32 vu32;
typedef volatile u64 vu64;
typedef volatile s8 vs8;
typedef volatile s16 vs16;
typedef volatile s32 vs32;
typedef volatile s64 vs64;
typedef float f32;
typedef double f64;
typedef volatile f32 vf32;
typedef volatile f64 vf64;
typedef char *Ptr;
typedef int BOOL;
typedef unsigned int uint;
#define FALSE 0
#define TRUE 1
#if defined(__MWERKS__)
#define AT_ADDRESS(addr) : (addr)
#elif defined(__GNUC__)
//#define AT_ADDRESS(addr) __attribute__((address((addr))))
#define AT_ADDRESS(addr) // was removed in GCC. define in linker script instead.
#else
#define AT_ADDRESS(addr)
#endif
#ifndef ATTRIBUTE_ALIGN
#if defined(__MWERKS__) || defined(__GNUC__)
#define ATTRIBUTE_ALIGN(num) __attribute__((aligned(num)))
#elif defined(_MSC_VER)
#define ATTRIBUTE_ALIGN(num)
#else
#error unknown compiler
#endif
#endif
#ifndef DECL_WEAK
#if defined(__MWERKS__)
#define DECL_WEAK __declspec(weak)
#elif defined(__GNUC__)
#define DECL_WEAK __attribute__((weak))
#elif defined(_MSC_VER)
#define DECL_WEAK
#else
#error unknown compiler
#endif
#endif
#ifndef NULL
#ifdef __cplusplus
#define NULL 0
#else
#define NULL ((void*)0)
#endif
#endif
#ifdef __MWERKS__
#define __REGISTER register
#else
#define __REGISTER
#endif
#include <cstddef>
#endif
#endif