src/libcrt/crt/dllcrt1.c
int
atexit (p_atexit_fn pfn )
{
#ifdef DEBUG
  printf ("%s: registering exit function  0x%x at 0x%x\n",
	  __FUNCTION__, (unsigned)pfn, (unsigned)next_atexit);
#endif
  return (__dllonexit (pfn,  &first_atexit, &next_atexit)
	  == NULL ? -1  : 0 );
}
/*
 * The atexit exported from msvcrt.dll causes problems in DLLs.
 * Here, we override the exported version of atexit with one that passes the
 * private table initialised in DllMainCRTStartup to __dllonexit.
 * That means we have to hide the mscvrt.dll atexit because the
 * atexit defined here gets __dllonexit from the same lib. 
 */
The atexit exported from msvcrt.dll causes problems in DLLs.
Here, we override the exported version of atexit with one that passes the
private table initialised in DllMainCRTStartup to __dllonexit.
That means we have to hide the mscvrt.dll atexit because the
atexit defined here gets __dllonexit from the same lib.
The atexit exported from msvcrt . dll causes problems in DLLs . Here we override the exported version of atexit with one that passes the private table initialised in DllMainCRTStartup to __dllonexit . That means we have to hide the mscvrt . dll atexit because the atexit defined here gets __dllonexit from the same lib .
int
atexit (p_atexit_fn pfn )
{
#ifdef DEBUG
  printf ("%s: registering exit function  0x%x at 0x%x\n",
	  __FUNCTION__, (unsigned)pfn, (unsigned)next_atexit);
#endif
  return (__dllonexit (pfn,  &first_atexit, &next_atexit)
	  == NULL ? -1  : 0 );
}
int atexit ( p_atexit_fn pfn ) { #ifdef DEBUG printf ( " \n " , __FUNCTION__ , ( unsigned ) pfn , ( unsigned ) next_atexit ) ; #endif return ( __dllonexit ( pfn , & first_atexit , & next_atexit ) == NULL ? -1 : 0 ) ; }
The atexit exported from msvcrt.dll causes problems in DLLs.
The atexit exported from msvcrt . dll causes problems in DLLs .