PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
cc.h
1#ifndef __CC_H__
2#define __CC_H__
3
4#include <errno.h>
5#include <stdlib.h>
6#include <stddef.h>
7
8#define PACK_STRUCT_FIELD(x) x __attribute((packed))
9#define PACK_STRUCT_STRUCT __attribute((packed))
10/* Used for struct fields of u8_t,
11 * where some compilers warn that packing is not necessary */
12#define PACK_STRUCT_FLD_8(x) x
13/* Used for struct fields of that are packed structs themself,
14 * where some compilers warn that packing is not necessary */
15#define PACK_STRUCT_FLD_S(x) x
16#define PACK_STRUCT_BEGIN
17#define PACK_STRUCT_END
18
19#ifdef DEBUG
20#include <stdio.h>
21#define LWIP_PLATFORM_DIAG(args) printf args
22#define LWIP_PLATFORM_ASSERT(args) printf args
23#else
24#define LWIP_PLATFORM_DIAG(args)
25#define LWIP_PLATFORM_ASSERT(args)
26#endif
27
28#define lwip_htons(x) PP_HTONS(x)
29#define lwip_htonl(x) PP_HTONL(x)
30
31// I think there is an issue in the lwip code that doesn't import stdlib properly
32#define LWIP_RAND() ((u32_t)rand())
33
34#endif /* __CC_H__ */