Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- dlls/ucrtbase/Makefile.in | 1 + dlls/ucrtbase/atexit.c | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 dlls/ucrtbase/atexit.c
diff --git a/dlls/ucrtbase/Makefile.in b/dlls/ucrtbase/Makefile.in index e7d0759072c..9d6483ef450 100644 --- a/dlls/ucrtbase/Makefile.in +++ b/dlls/ucrtbase/Makefile.in @@ -6,6 +6,7 @@ DELAYIMPORTS = advapi32 user32 PARENTSRC = ../msvcrt
C_SRCS = \ + atexit.c \ console.c \ cpp.c \ crt_gccmain.c \ diff --git a/dlls/ucrtbase/atexit.c b/dlls/ucrtbase/atexit.c new file mode 100644 index 00000000000..48ff1c177ba --- /dev/null +++ b/dlls/ucrtbase/atexit.c @@ -0,0 +1,31 @@ +/* + * Copyright 2021 Zebediah Figura + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +/* these functions are part of the import lib for compatibility with the Mingw runtime */ +#if 0 +#pragma makedep implib +#endif + +#include <stdlib.h> + +extern int __cdecl _crt_atexit(void (__cdecl *func)(void)); + +int __cdecl atexit(void (__cdecl *func)(void)) +{ + return _crt_atexit(func); +}