Prechádzať zdrojové kódy

Fixup sysconf to report the correct answer when UCLIBC_DYNAMIC_ATEXIT
is enabled.

Eric Andersen 23 rokov pred
rodič
commit
44c91e6541
1 zmenil súbory, kde vykonal 6 pridanie a 1 odobranie
  1. 6 1
      include/stdlib.h

+ 6 - 1
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