diff --git a/include/unistd.h b/include/unistd.h index 0d4283a117..e51ab9fc3e 100644 --- a/include/unistd.h +++ b/include/unistd.h @@ -48,12 +48,6 @@ * Pre-processor Definitions ****************************************************************************/ -/* The number of functions that may be registered to be called - * at program exit. - */ - -#define ATEXIT_MAX 1 - /* Values for seeking */ #define SEEK_SET 0 /* From the start of the file */ diff --git a/libs/libc/unistd/lib_sysconf.c b/libs/libc/unistd/lib_sysconf.c index 7f51d9e99e..c27acf740e 100644 --- a/libs/libc/unistd/lib_sysconf.c +++ b/libs/libc/unistd/lib_sysconf.c @@ -41,6 +41,7 @@ #include #include +#include #include /**************************************************************************** @@ -225,6 +226,13 @@ long sysconf(int name) case _SC_OPEN_MAX: return CONFIG_NFILE_DESCRIPTORS; + case _SC_ATEXIT_MAX: +#ifdef CONFIG_SCHED_EXIT_MAX + return CONFIG_SCHED_EXIT_MAX; +#else + return 0; +#endif + default: #if 0 /* Assume valid but not implemented for the time being */ errcode = EINVAL;