ObjFW  Check-in [c3ec28e2ea]

Overview
Comment:Pass atexit from the linklib
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | amiga-library
Files: files | file ages | folders
SHA3-256: c3ec28e2ea20b41f8be43437bd6dc8326df6bfb0a0a97bc3d12d75117d6ea9d1
User & Date: js on 2020-12-19 22:39:28
Other Links: branch diff | manifest | tags
Context
2020-12-20
11:21
Move DOSBase for Amiga .library to libbases.m check-in: 71f240abd9 user: js tags: amiga-library
2020-12-19
22:39
Pass atexit from the linklib check-in: c3ec28e2ea user: js tags: amiga-library
22:24
Add -laboxstub -labox for .library on MorphOS check-in: 878cc0296e user: js tags: amiga-library
Changes

Modified src/amiga-library.h from [0a3c3fc0c8] to [61ebf20fdf].

78
79
80
81
82
83
84

85
86
87
88
89
90
91
	    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);

	of_sig_t _Nullable (*_Nonnull signal)(int, of_sig_t _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 of_init(unsigned int version, struct of_libc *libc, FILE **sF);







>







78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
	    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);
	int (*_Nonnull atexit)(void (*_Nonnull)(void));
	of_sig_t _Nullable (*_Nonnull signal)(int, of_sig_t _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 of_init(unsigned int version, struct of_libc *libc, FILE **sF);

Modified src/amiga-library.m from [0e90e7af65] to [22b5af809e].

634
635
636
637
638
639
640






641
642
643
644
645
646
647
void
exit(int status)
{
	libc.exit(status);

	OF_UNREACHABLE
}







of_sig_t
signal(int sig, of_sig_t func)
{
	return libc.signal(sig, func);
}








>
>
>
>
>
>







634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
void
exit(int status)
{
	libc.exit(status);

	OF_UNREACHABLE
}

int
atexit(void (*function)(void))
{
	return libc.atexit(function);
}

of_sig_t
signal(int sig, of_sig_t func)
{
	return libc.signal(sig, func);
}

Modified src/linklib/linklib.m from [f3aac09e4e] to [01a802be95].

326
327
328
329
330
331
332

333
334
335
336
337
338
339
#endif
		.get_errno = get_errno,
		.vsnprintf = vsnprintf,
#ifdef OF_AMIGAOS_M68K
		.vsscanf = vsscanf,
#endif
		.exit = exit,

		.signal = signal,
		.setlocale = setlocale,
		._Unwind_Backtrace = _Unwind_Backtrace
	};

	if (initialized)
		return;







>







326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
#endif
		.get_errno = get_errno,
		.vsnprintf = vsnprintf,
#ifdef OF_AMIGAOS_M68K
		.vsscanf = vsscanf,
#endif
		.exit = exit,
		.atexit = atexit,
		.signal = signal,
		.setlocale = setlocale,
		._Unwind_Backtrace = _Unwind_Backtrace
	};

	if (initialized)
		return;