瀏覽代碼

Added missing _SC_2_FORT_RUN case. Fixed _SC_ATEXIT_MAX to match atexit.c.

Manuel Novoa III 24 年之前
父節點
當前提交
bb303cab91
共有 1 個文件被更改,包括 9 次插入2 次删除
  1. 9 2
      libc/unistd/sysconf.c

+ 9 - 2
libc/unistd/sysconf.c

@@ -481,6 +481,13 @@ long int sysconf(int name)
       return -1;
 #endif
 
+    case _SC_2_FORT_RUN:
+#ifdef	_POSIX2_FORT_RUN
+      return _POSIX2_FORT_RUN;
+#else
+      return -1;
+#endif
+
     case _SC_2_LOCALEDEF:
 #ifdef	_POSIX2_LOCALEDEF
       return _POSIX2_LOCALEDEF;
@@ -651,8 +658,8 @@ long int sysconf(int name)
 #endif
 
     case _SC_ATEXIT_MAX:
-      /* We have no limit since we use lists.  */
-      return INT_MAX;
+      /* See stdlib/atexit.c  */
+      return 20;
 
     case _SC_PASS_MAX:
       /* We have no limit but since the return value might be used to