소스 검색

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

Eric Andersen 23 년 전
부모
커밋
44c91e6541
1개의 변경된 파일6개의 추가작업 그리고 1개의 파일을 삭제
  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;
 extern int atexit (void (*__func) (void)) __THROW;
 
 
 /* The following is used by uClibc in atexit.c and sysconf.c */
 /* 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
 #ifdef	__USE_MISC