summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2002-11-27 23:02:15 +0000
committerEric Andersen <andersen@codepoet.org>2002-11-27 23:02:15 +0000
commit44c91e654102116f99f80635c483db49126730e8 (patch)
treec791cc1f8d9c0303c30a09792ba93b84b5770f38
parentfa28831a8c4ebaf627d6a1cff941b4d357b80d36 (diff)
Fixup sysconf to report the correct answer when UCLIBC_DYNAMIC_ATEXIT
is enabled.
-rw-r--r--include/stdlib.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/stdlib.h b/include/stdlib.h
index 637bf705c..23f8bf208 100644
--- a/include/stdlib.h
+++ b/include/stdlib.h
@@ -579,7 +579,12 @@ extern void abort (void) __THROW __attribute__ ((__noreturn__));
extern int atexit (void (*__func) (void)) __THROW;
/* The following is used by uClibc in atexit.c and sysconf.c */
-#define __UCLIBC_MAX_ATEXIT 20
+/* We have no limit when __UCLIBC_DYNAMIC_ATEXIT__ is enabled. */
+#ifdef __UCLIBC_DYNAMIC_ATEXIT__
+# define __UCLIBC_MAX_ATEXIT INT_MAX
+#else
+# define __UCLIBC_MAX_ATEXIT 20
+#endif
#ifdef __USE_MISC