sdk-core
v2026.11.05
PS2 SDK - core tier (build-critical EE/IOP modules)
Toggle main menu visibility
Loading...
Searching...
No Matches
cc.h
Go to the documentation of this file.
1
5
#ifndef __CC_H__
6
#define __CC_H__
7
8
#include <errno.h>
9
#include <stddef.h>
10
/* Upstream lwIP's sockets.h references struct timeval without including
11
sys/time.h when LWIP_TIMEVAL_PRIVATE=0. Pull it in via this port header
12
so every lwIP translation unit (and every consumer that #includes
13
arch/cc.h transitively through lwip/opt.h) sees struct timeval. */
14
#include <
sys/time.h
>
15
16
#define BYTE_ORDER LITTLE_ENDIAN
17
18
typedef
unsigned
char
u8_t;
19
typedef
signed
char
s8_t;
20
typedef
unsigned
short
int
u16_t;
21
typedef
signed
short
s16_t;
22
typedef
unsigned
int
u32_t;
23
typedef
signed
int
s32_t;
24
25
typedef
u32_t mem_ptr_t;
26
27
/* Define (sn)printf formatters for these lwIP types */
28
#define U8_F "hu"
29
#define S8_F "hd"
30
#define X8_F "hx"
31
#define U16_F "hu"
32
#define S16_F "hd"
33
#define X16_F "hx"
34
#define U32_F "lu"
35
#define S32_F "ld"
36
#define X32_F "lx"
37
#define SZT_F "uz"
38
39
#define PACK_STRUCT_FIELD(x) x __attribute((packed))
40
#define PACK_STRUCT_STRUCT __attribute((packed))
41
/* Used for struct fields of u8_t,
42
* where some compilers warn that packing is not necessary */
43
#define PACK_STRUCT_FLD_8(x) x
44
/* Used for struct fields of that are packed structs themself,
45
* where some compilers warn that packing is not necessary */
46
#define PACK_STRUCT_FLD_S(x) x
47
#define PACK_STRUCT_BEGIN
48
#define PACK_STRUCT_END
49
50
#ifdef DEBUG
51
#include <
stdio.h
>
52
#define LWIP_PLATFORM_DIAG(args) printf args
53
#define LWIP_PLATFORM_ASSERT(args) printf args
54
#else
55
#define LWIP_PLATFORM_DIAG(args)
56
#define LWIP_PLATFORM_ASSERT(args)
57
#endif
58
59
#define atoi(x) strtol(x, NULL, 10)
60
61
#define LWIP_NO_STDINT_H 1
//stdint.h does not exist.
62
#define LWIP_NO_INTTYPES_H 1
//inttypes.h does not exist.
63
64
#define lwip_htons(x) PP_HTONS(x)
65
#define lwip_htonl(x) PP_HTONL(x)
66
67
#endif
/* __CC_H__ */
stdio.h
time.h
core
ps2ip-nm
include
arch
cc.h
Generated by
1.18.0