ObjFW  Check-in [4686d22cd1]

Overview
Comment:Remove fprintf and fflush from Amiga library
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | amiga-library
Files: files | file ages | folders
SHA3-256: 4686d22cd1bc641948522e26bd28deee5f0a61f6fc31861092c2681610afd98e
User & Date: js on 2022-11-13 11:31:31
Other Links: branch diff | manifest | tags
Context
2022-11-13
12:25
Pass asprintf from linklib on MorphOS check-in: 34e0add5b4 user: js tags: amiga-library
11:31
Remove fprintf and fflush from Amiga library check-in: 4686d22cd1 user: js tags: amiga-library
11:29
Use OFLog() instead of fprintf(stderr, ...) check-in: 095a015165 user: js tags: amiga-library
Changes

Modified src/amiga-library.h from [2821a7950c] to [d2404b2d4a].

33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
	 * 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);
	void *_Nullable (*_Nonnull realloc)(void *_Nullable, size_t);
	void (*_Nonnull free)(void *_Nullable);
	int (*_Nonnull vfprintf)(FILE *_Nonnull restrict,
	    const char *_Nonnull restrict, va_list);
	int (*_Nonnull fflush)(FILE *_Nonnull);
	void (*_Nonnull abort)(void);
#ifdef HAVE_SJLJ_EXCEPTIONS
	int (*_Nonnull _Unwind_SjLj_RaiseException)(void *_Nonnull);
#else
	int (*_Nonnull _Unwind_RaiseException)(void *_Nonnull);
#endif
	void (*_Nonnull _Unwind_DeleteException)(void *_Nonnull);







<
<
<







33
34
35
36
37
38
39



40
41
42
43
44
45
46
	 * 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);
	void *_Nullable (*_Nonnull realloc)(void *_Nullable, size_t);
	void (*_Nonnull free)(void *_Nullable);



	void (*_Nonnull abort)(void);
#ifdef HAVE_SJLJ_EXCEPTIONS
	int (*_Nonnull _Unwind_SjLj_RaiseException)(void *_Nonnull);
#else
	int (*_Nonnull _Unwind_RaiseException)(void *_Nonnull);
#endif
	void (*_Nonnull _Unwind_DeleteException)(void *_Nonnull);

Modified src/amiga-library.m from [87f8097e13] to [1421eda773].

402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440

void
free(void *ptr)
{
	libC.free(ptr);
}

int
fprintf(FILE *restrict stream, const char *restrict fmt, ...)
{
	int ret;
	va_list args;

	va_start(args, fmt);
	ret = libC.vfprintf(stream, fmt, args);
	va_end(args);

	return ret;
}

int
vfprintf(FILE *restrict stream, const char *restrict fmt, va_list args)
{
	return libC.vfprintf(stream, fmt, args);
}

int
fflush(FILE *restrict stream)
{
	return libC.fflush(stream);
}

void
abort(void)
{
	libC.abort();

	OF_UNREACHABLE
}







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







402
403
404
405
406
407
408

























409
410
411
412
413
414
415

void
free(void *ptr)
{
	libC.free(ptr);
}


























void
abort(void)
{
	libC.abort();

	OF_UNREACHABLE
}