Skip to content

Commit 0a0ced1

Browse files
committed
move BOOL to separate header
This avoids collisions when porting some libraries
1 parent bc4b778 commit 0a0ced1

11 files changed

Lines changed: 26 additions & 10 deletions

File tree

gc/gcbool.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#pragma once
2+
3+
typedef unsigned int BOOL;
4+
/*+----------------------------------------------------------------------------------------------+*/
5+
// alias type typedefs
6+
#define FIXED s32 ///< Alias type for sfp32
7+
/*+----------------------------------------------------------------------------------------------+*/
8+
#ifndef TRUE
9+
#define TRUE 1 ///< True
10+
#endif
11+
/*+----------------------------------------------------------------------------------------------+*/
12+
#ifndef FALSE
13+
#define FALSE 0 ///< False
14+
#endif
15+
/*+----------------------------------------------------------------------------------------------+*/
16+

gc/gctypes.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,19 +48,10 @@ typedef volatile double vf64;
4848
/*+----------------------------------------------------------------------------------------------+*/
4949

5050

51-
typedef unsigned int BOOL;
5251
/*+----------------------------------------------------------------------------------------------+*/
5352
// alias type typedefs
5453
#define FIXED s32 ///< Alias type for sfp32
5554
/*+----------------------------------------------------------------------------------------------+*/
56-
#ifndef TRUE
57-
#define TRUE 1 ///< True
58-
#endif
59-
/*+----------------------------------------------------------------------------------------------+*/
60-
#ifndef FALSE
61-
#define FALSE 0 ///< False
62-
#endif
63-
/*+----------------------------------------------------------------------------------------------+*/
6455
#ifndef NULL
6556
#define NULL 0 ///< Pointer to 0
6657
#endif

gc/ogc/aram.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ distribution.
3838
*/
3939

4040
#include <gctypes.h>
41-
41+
#include <gcbool.h>
4242

4343
/*!
4444
* \addtogroup dmamode ARAM DMA transfer direction

gc/ogc/cache.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ distribution.
3939
*/
4040

4141
#include <gctypes.h>
42+
#include <gcbool.h>
4243

4344
#define LC_BASEPREFIX 0xe000
4445
#define LC_BASE (LC_BASEPREFIX<<16)

gc/ogc/lwp.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ distribution.
3939
*/
4040

4141
#include <gctypes.h>
42+
#include <gcbool.h>
4243

4344
#define LWP_CLOSED -1
4445
#define LWP_SUCCESSFUL 0

gc/ogc/lwp_heap.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#define __LWP_HEAP_H__
33

44
#include <gctypes.h>
5+
#include <gcbool.h>
56
#include "machine/asm.h"
67

78
#define HEAP_BLOCK_USED 1

gc/ogc/lwp_watchdog.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
#define __LWP_WATCHDOG_H__
33

44
#include <gctypes.h>
5+
#include <gcbool.h>
6+
57
#include "lwp_queue.h"
68
#include <time.h>
79

gc/ogc/message.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ distribution.
3737
*/
3838

3939
#include <gctypes.h>
40+
#include <gcbool.h>
4041

4142
#define MQ_BOX_NULL 0xffffffff
4243

gc/ogc/system.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ distribution.
3939
*/
4040

4141
#include <gctypes.h>
42+
#include <gcbool.h>
4243
#include <gcutil.h>
4344
#include <time.h>
4445
#include <ogc/lwp_queue.h>

libogc/dsp.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ distribution.
3232
#include <stdlib.h>
3333
#include <stdio.h>
3434
#include "gcutil.h"
35+
#include <gcbool.h>
3536
#include "asm.h"
3637
#include "processor.h"
3738
#include "irq.h"

0 commit comments

Comments
 (0)