ObjFW  Diff

Differences From Artifact [3e0d609d4b]:

To Artifact [d45496454a]:


23
24
25
26
27
28
29

30
31
32
33
34
35
36
#  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


struct of_libc {
	/*
	 * 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.
	 */
	void *_Nullable (*_Nonnull malloc)(size_t);
	void *_Nullable (*_Nonnull calloc)(size_t, size_t);







>







23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#  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 (*of_sig_t)(int);
struct of_libc {
	/*
	 * 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.
	 */
	void *_Nullable (*_Nonnull malloc)(size_t);
	void *_Nullable (*_Nonnull calloc)(size_t, size_t);
66
67
68
69
70
71
72





73
74
75
76

77
78
79
80
	void *_Nullable (*_Nonnull __deregister_frame_info)(
	    const void *_Nonnull);
# endif

	/* Needed only by ObjFW. */
	int (*_Nonnull vsnprintf)(const char *_Nonnull restrict, size_t,
	    const char *_Nonnull restrict, va_list);





	void (*_Nonnull exit)(int);
	char *_Nullable (*_Nonnull setlocale)(int, const char *_Nullable);
	int (*_Nonnull _Unwind_Backtrace)(int (*_Nonnull)(void *_Nonnull,
	    void *_Null_unspecified), void *_Null_unspecified);

};

extern bool of_init(unsigned int version, struct of_libc *libc, FILE **sF);
#endif







>
>
>
>
>




>




67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
	void *_Nullable (*_Nonnull __deregister_frame_info)(
	    const void *_Nonnull);
# endif

	/* Needed only by ObjFW. */
	int (*_Nonnull vsnprintf)(const char *_Nonnull restrict, size_t,
	    const char *_Nonnull restrict, va_list);
# ifdef OF_AMIGAOS_M68K
	/* strtod() uses sscanf() internally */
	int (*_Nonnull vsscanf)(const char *_Nonnull restrict,
	    const char *_Nonnull restrict, va_list);
# endif
	void (*_Nonnull exit)(int);
	char *_Nullable (*_Nonnull setlocale)(int, const char *_Nullable);
	int (*_Nonnull _Unwind_Backtrace)(int (*_Nonnull)(void *_Nonnull,
	    void *_Null_unspecified), void *_Null_unspecified);
	of_sig_t _Nullable (*_Nonnull signal)(int, of_sig_t _Nullable);
};

extern bool of_init(unsigned int version, struct of_libc *libc, FILE **sF);
#endif