/* atexit.c (emx+gcc) -- Copyright (c) 1990-1996 by Eberhard Mattes */

#include <stdlib.h>
#include <emx/startup.h>

int atexit (void (*func)(void))
{
  if (_atexit_n >= sizeof (_atexit_v) / sizeof (_atexit_v[0]))
    return -1;
  _atexit_v[_atexit_n++] = func;
  return 0;
}
