From 618a4e916b5cc91f12aa68c3e15656fc665fdf22 Mon Sep 17 00:00:00 2001 From: Peter Hunnisett Date: Fri, 22 Feb 2002 21:20:39 +0000 Subject: [PATCH] atexit doesn't take a _onexit_t parameter. --- dlls/msvcrt/exit.c | 5 +++-- include/msvcrt/stdlib.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/dlls/msvcrt/exit.c b/dlls/msvcrt/exit.c index f7b0710a8b8..a0dc17c0300 100644 --- a/dlls/msvcrt/exit.c +++ b/dlls/msvcrt/exit.c @@ -191,12 +191,13 @@ void MSVCRT_exit(int exitcode) /********************************************************************* * atexit (MSVCRT.@) */ -int MSVCRT_atexit(_onexit_t func) +int MSVCRT_atexit(void (*func)(void)) { TRACE("(%p)\n", func); - return _onexit(func) == func ? 0 : -1; + return _onexit((_onexit_t)func) == (_onexit_t)func ? 0 : -1; } + /********************************************************************* * _purecall (MSVCRT.@) */ diff --git a/include/msvcrt/stdlib.h b/include/msvcrt/stdlib.h index 30a46533c47..405ec62cb5d 100644 --- a/include/msvcrt/stdlib.h +++ b/include/msvcrt/stdlib.h @@ -138,7 +138,7 @@ char* _ultoa(unsigned long,char*,int); void MSVCRT(_exit)(int); void MSVCRT(abort)(); int MSVCRT(abs)(int); -int MSVCRT(atexit)(_onexit_t); +int MSVCRT(atexit)(void (*)(void)); double MSVCRT(atof)(const char*); int MSVCRT(atoi)(const char*); long MSVCRT(atol)(const char*);