ObjFW  Diff

Differences From Artifact [486f50c32d]:

To Artifact [790ebf9372]:


21
22
23
24
25
26
27




28
29
30
31
32
33
34
# include <ppcinline/macros.h>
# define OF_M68K_ARG(type, name, reg) type name = (type)REG_##reg;
#else
# define OF_M68K_ARG(type, name, reg)		\
	register type reg_##name __asm__(#reg);	\
	type name = reg_##name;
#endif





typedef void (*OFSignalHandler)(int);

struct OFLibC {
	/*
	 * Needed by the runtime. Some of them are also used by ObjFW, but we
	 * need all of them to pass them along to the runtime.







>
>
>
>







21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# include <ppcinline/macros.h>
# define OF_M68K_ARG(type, name, reg) type name = (type)REG_##reg;
#else
# define OF_M68K_ARG(type, name, reg)		\
	register type reg_##name __asm__(#reg);	\
	type name = reg_##name;
#endif

#ifdef OF_MORPHOS
# include <setjmp.h>
#endif

typedef void (*OFSignalHandler)(int);

struct OFLibC {
	/*
	 * Needed by the runtime. Some of them are also used by ObjFW, but we
	 * need all of them to pass them along to the runtime.
95
96
97
98
99
100
101




102
103
104
105
106
107
108
	    const char *_Nonnull, const struct tm *_Nonnull);
	void (*_Nonnull exit)(int);
	int (*_Nonnull atexit)(void (*_Nonnull)(void));
	OFSignalHandler _Nullable (*_Nonnull signal)(int, OFSignalHandler _Nullable);
	char *_Nullable (*_Nonnull setlocale)(int, const char *_Nullable);
	int (*_Nonnull _Unwind_Backtrace)(int (*_Nonnull)(void *_Nonnull,
	    void *_Null_unspecified), void *_Null_unspecified);




};

extern bool OFInit(unsigned int version, struct OFLibC *_Nonnull libC,
    FILE *_Nonnull *_Nonnull sF);
extern unsigned long *OFHashSeedRef(void);
extern void OFPBKDF2Wrapper(const OFPBKDF2Parameters *_Nonnull parameters);
extern void OFScryptWrapper(const OFScryptParameters *_Nonnull parameters);







>
>
>
>







99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
	    const char *_Nonnull, const struct tm *_Nonnull);
	void (*_Nonnull exit)(int);
	int (*_Nonnull atexit)(void (*_Nonnull)(void));
	OFSignalHandler _Nullable (*_Nonnull signal)(int, OFSignalHandler _Nullable);
	char *_Nullable (*_Nonnull setlocale)(int, const char *_Nullable);
	int (*_Nonnull _Unwind_Backtrace)(int (*_Nonnull)(void *_Nonnull,
	    void *_Null_unspecified), void *_Null_unspecified);
#ifdef OF_MORPHOS
	int (*_Nonnull setjmp)(jmp_buf);
	void __dead2 (*_Nonnull longjmp)(jmp_buf, int);
#endif
};

extern bool OFInit(unsigned int version, struct OFLibC *_Nonnull libC,
    FILE *_Nonnull *_Nonnull sF);
extern unsigned long *OFHashSeedRef(void);
extern void OFPBKDF2Wrapper(const OFPBKDF2Parameters *_Nonnull parameters);
extern void OFScryptWrapper(const OFScryptParameters *_Nonnull parameters);