common.h
1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#ifndef __BB_SYSAPP_COMMON_H_
#define __BB_SYSAPP_COMMON_H_
#include <PR/R4300.h>
#include <PR/bbtypes.h>
#define KEYLIST_SIZE 16384
#define CERTBUF_SIZE 16384
#define CRLBUF_SIZE 16384
#ifdef _LANGUAGE_C_PLUS_PLUS
extern "C" {
#endif
#if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
#define ALIGN_DCACHE __attribute__((aligned(DCACHE_LINESIZE)))
/*
* Globals with hard-coded parameters (params in globals.c)
*/
extern const char gSaCertFname[];
extern const char gSaRlFname[];
extern const char gSaAppExt[];
extern const char gSaRecExt[];
extern const char gSaTicketFname[];
extern const char gSaRecryptKeyFname[];
extern const char gSaClubTitle[];
/* extra stdlib funcs */
int strcmp(const char *s,const char *t);
void *memset(char *s,int c,size_t n);
int memcmp(const void *s1, const void *s2, size_t n);
int strncmp(const char *s,const char *t,int n);
#define NIBBLE_TO_ASCII(v) ((v)<10?('0'+(v)):('a'+(v)-10))
void osBbSaCidToAppName(BbContentId cid, const char *ext, char *name);
#undef PRINTF
#ifdef _DEBUG
#define PRINTF osSyncPrintf
#else
#define PRINTF(format, args...)
#endif
#endif
#ifdef _LANGUAGE_C_PLUS_PLUS
}
#endif
#endif