mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-27 11:53:32 +00:00
Previously this was mixed with vcruntime, with some objects being shared. But this is messy. Instead use a separate library and link ucrtbase to this as well. This also matches more closely how native libraries are organized, where vcstartup is merged into the CRT import libraries, while vcruntime is merged into the static CRT libraries.
19 lines
355 B
C
19 lines
355 B
C
//
|
|
// atexit.c
|
|
//
|
|
// Copyright (c) 2024 Timo Kreuzer
|
|
//
|
|
// Implementation of atexit.
|
|
//
|
|
// SPDX-License-Identifier: MIT
|
|
//
|
|
|
|
#include <stdlib.h>
|
|
|
|
int __cdecl atexit(void (__cdecl* _Func)(void))
|
|
{
|
|
// Go through _onexit, so that the initializer is pulled in.
|
|
_onexit_t result = _onexit((_onexit_t)_Func);
|
|
return (result == NULL) ? -1 : 0;
|
|
}
|