diff options
author | Nebuleon Fumika | 2013-02-24 18:02:55 -0500 |
---|---|---|
committer | Nebuleon Fumika | 2013-02-24 18:02:55 -0500 |
commit | 1c0260ecfa0d4b5feeed552baae3ee116cb59574 (patch) | |
tree | 4db023969d1aba80bea87e98ad9d8314fc388159 /sdk-modifications | |
parent | 339cdb48281846943e631a36128d53b241d3c176 (diff) | |
download | snes9x2005-1c0260ecfa0d4b5feeed552baae3ee116cb59574.tar.gz snes9x2005-1c0260ecfa0d4b5feeed552baae3ee116cb59574.tar.bz2 snes9x2005-1c0260ecfa0d4b5feeed552baae3ee116cb59574.zip |
Define u8, s8, u16, s16, u32, s32, u64, s64 as typedefs. Ported from a test repository.
Diffstat (limited to 'sdk-modifications')
-rwxr-xr-x | sdk-modifications/include/ds2_types.h | 40 | ||||
-rwxr-xr-x | sdk-modifications/include/fs_common.h | 103 |
2 files changed, 61 insertions, 82 deletions
diff --git a/sdk-modifications/include/ds2_types.h b/sdk-modifications/include/ds2_types.h index 3ec59bf..ae66737 100755 --- a/sdk-modifications/include/ds2_types.h +++ b/sdk-modifications/include/ds2_types.h @@ -1,37 +1,29 @@ #ifndef __DS2_TYPES_H__ #define __DS2_TYPES_H__ -#ifndef u8 -#define u8 unsigned char -#endif +typedef unsigned char u8; +typedef char s8; -#ifndef s8 -#define s8 char -#endif +typedef unsigned short u16; +typedef short s16; -#ifndef u16 -#define u16 unsigned short -#endif +typedef unsigned int u32; +typedef int s32; -#ifndef s16 -#define s16 short -#endif +typedef unsigned long long u64; +typedef long long s64; -#ifndef u32 -#define u32 unsigned int -#endif +typedef volatile unsigned char vu8; +typedef volatile char vs8; -#ifndef s32 -#define s32 int -#endif +typedef volatile unsigned short vu16; +typedef volatile short vs16; -#ifndef u64 -#define u64 unsigned long long -#endif +typedef volatile unsigned int vu32; +typedef volatile int vs32; -#ifndef s64 -#define s64 long long -#endif +typedef volatile unsigned long long vu64; +typedef volatile long long vs64; #ifndef NULL #define NULL 0 diff --git a/sdk-modifications/include/fs_common.h b/sdk-modifications/include/fs_common.h index c482775..db47d9a 100755 --- a/sdk-modifications/include/fs_common.h +++ b/sdk-modifications/include/fs_common.h @@ -49,9 +49,10 @@ #define BYTES_PER_READ 512 -#ifndef NULL - #define NULL 0 -#endif +// MODIFICATION START [Neb] +// In libfat by Chishm, some types are #define'd here. In the DS2 SDK, +// these types are defined by another header. +#include "ds2_types.h" #ifndef bool #define bool int @@ -65,65 +66,51 @@ #define true 1 #endif -#ifndef u8 -#define u8 unsigned char -#endif +// MODIFICATION END [Neb] -#ifndef u16 -#define u16 unsigned short -#endif +struct _reent +{ + /* FILE is a big struct and may change over time. To try to achieve binary + compatibility with future versions, put stdin,stdout,stderr here. + These are pointers into member __sf defined below. */ +// __FILE *_stdin, *_stdout, *_stderr; /* XXX */ -#ifndef u32 -#define u32 unsigned long -#endif + int _errno; /* local copy of errno */ -#ifndef s32 -#define s32 long -#endif +// int _inc; /* used by tmpnam */ + +// char *_emergency; + +// int __sdidinit; /* 1 means stdio has been init'd */ + +// int _current_category; /* unused */ +// _CONST char *_current_locale; /* unused */ + +// struct _mprec *_mp; + +// void _EXFNPTR(__cleanup, (struct _reent *)); + +// int _gamma_signgam; + + /* used by some fp conversion routines */ +// int _cvtlen; /* should be size_t */ +// char *_cvtbuf; + +// struct _rand48 *_r48; +// struct __tm *_localtime_buf; +// char *_asctime_buf; + + /* signal info */ +// void (**(_sig_func))(int); + + /* atexit stuff */ +// struct _atexit *_atexit; +// struct _atexit _atexit0; -struct _reent
-{
- /* FILE is a big struct and may change over time. To try to achieve binary
- compatibility with future versions, put stdin,stdout,stderr here.
- These are pointers into member __sf defined below. */
-// __FILE *_stdin, *_stdout, *_stderr; /* XXX */
-
- int _errno; /* local copy of errno */
-
-// int _inc; /* used by tmpnam */
-
-// char *_emergency;
-
-// int __sdidinit; /* 1 means stdio has been init'd */
-
-// int _current_category; /* unused */
-// _CONST char *_current_locale; /* unused */
-
-// struct _mprec *_mp;
-
-// void _EXFNPTR(__cleanup, (struct _reent *));
-
-// int _gamma_signgam;
-
- /* used by some fp conversion routines */
-// int _cvtlen; /* should be size_t */
-// char *_cvtbuf;
-
-// struct _rand48 *_r48;
-// struct __tm *_localtime_buf;
-// char *_asctime_buf;
-
- /* signal info */
-// void (**(_sig_func))(int);
-
- /* atexit stuff */
-// struct _atexit *_atexit;
-// struct _atexit _atexit0;
-
-// struct _glue __sglue; /* root of glue chain */
-// __FILE *__sf; /* file descriptors */
-// struct _misc_reent *_misc; /* strtok, multibyte states */
-// char *_signal_buf; /* strsignal */
+// struct _glue __sglue; /* root of glue chain */ +// __FILE *__sf; /* file descriptors */ +// struct _misc_reent *_misc; /* strtok, multibyte states */ +// char *_signal_buf; /* strsignal */ }; #endif // _COMMON_H |