[apue] 一个快速确定新系统上各类限制值的工具

对于在不同 Unix 系统之间移植程序,最重要的事情就是确定新系统的一些编译时、运行时固定或不固定的限制值了。例如文件路径最大长度 PATH_MAX、进程最大可打开文件句柄数 OPEN_MAX、用户可加入的附加用户组最大数量 NGROUPS_MAX、进程命令行参数最大字节数 ARG_MAX、内存页大小 PAGESIZE、线程栈大小默认值 STACKSIZE、临时文件最大数量 TMP_MAX 等等。甚至有些系统特征也可以通过查询来提前确定,例如是否支持读写锁、是否支持异步 IO、是否支持实时信号等等,这样程序就可以根据系统提供的能力来选择不同的接口去实现同样的功能。

回头来看 apue 第二章有关系统限制与选项这一块的内容,由于掺杂了 UNIX 标准化的内容,显得很没有条理,例如将各种限制按标准划分为:

  • ISO C
    • 编译时限制 (头文件常量)
  • POSIX
    • 不变的最小值 (声明遵循 POSIX 的系统必需支持到至少这么多,不能再小了)
    • 不变值 (SSIZE_MAX)
    • 运行时可增加的值
    • 运行时不变的值
    • 路径名可变值
  • XSI
    • 不变的最小值 (同上)
    • 数值限制
    • 运行时不变值

看得人一头雾水,其实如果抛开标准,单按限制的性质来分,就比较简单啦:

  • 编译时限制 (通过头文件常量)
  • 运行时限制
    • 不与文件系统相关部分(通过 sysconf)
    • 与文件系统相关部分(通过 pathconf)

也就是说,要确定一个系统限制,一共分两步:

  1. 确定相应的符号常量有没有在头文件定义,如果有,直接拿来用;
  2. 如果没有,走 sysconf 或 pathconf 查询。

对于系统选项,稍等复杂一点,分三步:

  1. 符号常量定义为 -1,平台不支持该选项;
  2. 符号常量定义大于 0,平台支持相应的选项;
  3. 符号常量定义为 0,需要进一步依靠 sysconf 或 pathconf 来查询。

到这里,你大概已经想到怎么自己制作一个工具了,那就是按上面的逻辑 coding 呗,可以把想要查的常量作为输入,查到的结果打印到控制台,就像下面这样:

conf.c

 1 #include "../apue.h" 
 2 #include <errno.h>
 3 #include <limits.h> 
 4 
 5 static void pr_sysconf (char*, int); 
 6 static void pr_pathconf (char *, char *, int); 
 7 
 8 int 
 9 main (int argc, char *argv[])
10 {
11   if (argc != 2)
12     err_quit ("usage: conf <dirname>"); 
13 
14 #ifdef _POSIX_OPEN_MAX
15   printf ("_POSIX_OPEN_MAX defined to be %d\n", _POSIX_OPEN_MAX); 
16 #else 
17   printf ("no symbol for _POSIX_OPEN_MAX\n"); 
18 #endif 
19 
20 #ifdef OPEN_MAX
21   printf ("OPEN_MAX defined to be %d\n", OPEN_MAX); 
22 #else 
23   printf ("no symbol for OPEN_MAX\n"); 
24 #endif 
25 
26 #ifdef _SC_OPEN_MAX
27   pr_sysconf ("sysconf (_SC_OPEN_MAX) = ", _SC_OPEN_MAX); 
28 #else 
29   printf ("no symbol for _SC_OPEN_MAX\n"); 
30 #endif 
31 
32 #ifdef _POSIX_NAME_MAX
33   printf ("_POSIX_NAME_MAX defined to be %d\n", _POSIX_NAME_MAX); 
34 #else 
35   printf ("no symbol for _POSIX_NAME_MAX\n"); 
36 #endif 
37 
38 #ifdef NAME_MAX
39   printf ("NAME_MAX defined to be %d\n", NAME_MAX); 
40 #else 
41   printf ("no symbol for NAME_MAX\n"); 
42 #endif 
43 
44 #ifdef _PC_NAME_MAX
45   pr_pathconf ("pathconf (_PC_NAME_MAX) = ", argv[1], _PC_NAME_MAX); 
46 #else 
47   printf ("no symbol for _PC_NAME_MAX\n"); 
48 #endif 
49 
50   exit (0); 
51 }
52 
53 static void 
54 pr_sysconf (char *msg, int name) 
55 {
56   long val; 
57   fputs (msg, stdout); 
58   errno = 0; 
59   if ((val = sysconf (name)) < 0) { 
60     if (errno != 0) { 
61       if (errno == EINVAL)
62         fputs ("(not supported)\n", stdout); 
63       else 
64         err_sys ("sysconf error"); 
65     }
66     else
67       fputs ("(no limit)\n", stdout); 
68   }
69   else
70     printf ("%ld\n", val); 
71 }
72 
73 
74 static void 
75 pr_pathconf (char *msg, char *path, int name) 
76 {
77   long val; 
78   fputs (msg, stdout); 
79   errno = 0; 
80   if ((val = pathconf (path, name)) < 0) { 
81     if (errno != 0) { 
82       if (errno == EINVAL)
83         fputs ("(not supported)\n", stdout); 
84       else 
85         err_sys ("pathconf error, path = %s", path); 
86     }
87     else
88       fputs ("(no limit)\n", stdout); 
89   }
90   else
91     printf ("%ld\n", val); 
92 }

 

这个程序处理了两个常量: OPEN_MAX 与 NAME_MAX,对于每个常量,它都尝试检测  _POSIX_XXX 是否存在,不同点在于,前者不依赖于文件系统,所以最后调用 sysconf 检测;后者依赖文件系统,所以调用 pathconf 检测。至于为何在 pr_sysconf / pr_pathconf 中清理 errno,可以参考我之前写过的一篇文章:[apue] sysconf 的四种返回状态 。这个程序要求一个路径,可以这样输入参数来使之工作:

$ ./conf /
_POSIX_OPEN_MAX defined to be 20
no symbol for OPEN_MAX
sysconf (_SC_OPEN_MAX) = 1024
_POSIX_NAME_MAX defined to be 14
NAME_MAX defined to be 255
pathconf (_PC_NAME_MAX) = 255

 

为方便工具灵活的处理各种不同输入,之样直接写死常量肯定是不灵活了,有的同学已经想到了将常量作为命令行参数传入,这个办法也可以。不过这里借鉴书上一种使用 awk 自动生成 c 代码的方法,将上面的例子 awk 化:

conf.awk

  1 #! /bin/awk -f
  2 BEGIN {
  3 printf("#define _GNU_SOURCE  \n")
  4 printf("#include \"../apue.h\" \n")
  5 printf("#include <errno.h>\n")
  6 printf("#include <limits.h> \n")
  7 printf("#include <sys/param.h> \n")
  8 printf("\n")
  9 printf("static void pr_sysconf (char*, int); \n")
 10 printf("static void pr_pathconf (char *, char *, int); \n")
 11 printf("\n")
 12 printf("int \n")
 13 printf("main (int argc, char *argv[])\n")
 14 printf("{\n")
 15 printf("  if (argc != 2)\n")
 16 printf("    err_quit (\"usage: conf <dirname>\"); \n")
 17 printf("\n")
 18 FS=":"
 19 while (getline < "sysconf.sym" > 0) {
 20 printf("#ifdef %s\n", $1)
 21 printf("  printf (\"%s defined to be %%d\\n\", %s+0); \n", $1, $1)
 22 printf("#else \n")
 23 printf("  printf (\"no symbol for %s\\n\"); \n", $1)
 24 printf("#endif \n")
 25 printf("\n")
 26 printf("#ifdef _%s\n", $1)
 27 printf("  printf (\"_%s defined to be %%d\\n\", _%s+0); \n", $1, $1)
 28 printf("#else \n")
 29 printf("  printf (\"no symbol for _%s\\n\"); \n", $1)
 30 printf("#endif \n")
 31 printf("\n")
 32 printf("#ifdef _POSIX_%s\n", $1)
 33 printf("  printf (\"_POSIX_%s defined to be %%d\\n\", _POSIX_%s+0); \n", $1, $1)
 34 printf("#else \n")
 35 printf("  printf (\"no symbol for _POSIX_%s\\n\"); \n", $1)
 36 printf("#endif \n")
 37 printf("\n")
 38 printf("#ifdef P%s\n", $1)
 39 printf("  printf (\"P%s defined to be %%d\\n\", P%s+0); \n", $1, $1)
 40 printf("#else \n")
 41 printf("  printf (\"no symbol for P%s\\n\"); \n", $1)
 42 printf("#endif \n")
 43 printf("\n")
 44 printf("#ifdef _SC_%s\n", $1)
 45 printf("  pr_sysconf (\"sysconf (_SC_%s) = \", _SC_%s); \n", $1, $1)
 46 printf("#else \n")
 47 printf("  printf (\"no symbol for _SC_%s\\n\"); \n", $1)
 48 printf("#endif \n")
 49 printf("printf (\"\\n\"); \n")
 50 printf("\n")
 51 }
 52 close ("sysconf.sym")
 53 while (getline < "pathconf.sym" > 0) {
 54 printf("#ifdef %s\n", $1)
 55 printf("  printf (\"%s defined to be %%d\\n\", %s+0); \n", $1, $1)
 56 printf("#else \n")
 57 printf("  printf (\"no symbol for %s\\n\"); \n", $1)
 58 printf("#endif \n")
 59 printf("\n")
 60 printf("#ifdef _%s\n", $1)
 61 printf("  printf (\"_%s defined to be %%d\\n\", _%s+0); \n", $1, $1)
 62 printf("#else \n")
 63 printf("  printf (\"no symbol for _%s\\n\"); \n", $1)
 64 printf("#endif \n")
 65 printf("\n")
 66 printf("#ifdef _POSIX_%s\n", $1)
 67 printf("  printf (\"_POSIX_%s defined to be %%d\\n\", _POSIX_%s+0); \n", $1, $1)
 68 printf("#else \n")
 69 printf("  printf (\"no symbol for _POSIX_%s\\n\"); \n", $1)
 70 printf("#endif \n")
 71 printf("\n")
 72 printf("#ifdef _PC_%s\n", $1)
 73 printf("  pr_pathconf (\"pathconf (_PC_%s) = \", argv[1], _PC_%s); \n", $1, $1)
 74 printf("#else \n")
 75 printf("  printf (\"no symbol for _PC_%s\\n\"); \n", $1)
 76 printf("#endif \n")
 77 printf("printf (\"\\n\"); \n")
 78 printf("\n")
 79 }
 80 close ("pathconf.sym"); 
 81 exit
 82 }
 83 END {
 84 printf("  exit (0); \n")
 85 printf("}\n")
 86 printf("\n")
 87 printf("static void \n")
 88 printf("pr_sysconf (char *msg, int name) \n")
 89 printf("{\n")
 90 printf("  long val; \n")
 91 printf("  fputs (msg, stdout); \n")
 92 printf("  errno = 0; \n")
 93 printf("  if ((val = sysconf (name)) < 0) { \n")
 94 printf("    if (errno != 0) { \n")
 95 printf("      if (errno == EINVAL)\n")
 96 printf("        fputs (\"(not supported)\\n\", stdout); \n")
 97 printf("      else \n")
 98 printf("        err_sys (\"sysconf error\"); \n")
 99 printf("    }\n")
100 printf("    else\n")
101 printf("      fputs (\"(no limit)\\n\", stdout); \n")
102 printf("  }\n")
103 printf("  else\n")
104 printf("    printf (\"%%ld\\n\", val); \n")
105 printf("}\n")
106 printf("\n")
107 printf("\n")
108 printf("static void \n")
109 printf("pr_pathconf (char *msg, char *path, int name) \n")
110 printf("{\n")
111 printf("  long val; \n")
112 printf("  fputs (msg, stdout); \n")
113 printf("  errno = 0; \n")
114 printf("  if ((val = pathconf (path, name)) < 0) { \n")
115 printf("    if (errno != 0) { \n")
116 printf("      if (errno == EINVAL)\n")
117 printf("        fputs (\"(not supported)\\n\", stdout); \n")
118 printf("      else \n")
119 printf("        err_sys (\"pathconf error, path = %%s\", path); \n")
120 printf("    }\n")
121 printf("    else\n")
122 printf("      fputs (\"(no limit)\\n\", stdout); \n")
123 printf("  }\n")
124 printf("  else\n")
125 printf("    printf (\"%%ld\\n\", val); \n")
126 printf("}\n")
127 }

 

其实原理很简单啦,就是把每一行都用 awk printf 来生成,只是针对常量部分,使用一个循环,分别从文件中读取常量来进行动态生成。这里需要提供两个文件: sysconf.sym 与 pathconf.sym,分别对应不依赖文件系统的常量与依赖文件系统的常量,因为最后它们的调用方法不同,之前已经说明过了。

sysconf.sym

ARG_MAX
ATEXIT_MAX
CHILD_MAX
CLK_TCK
CLOCKS_PER_SEC
HOST_NAME_MAX
IOV_MAX
LOGIN_NAME_MAX
NGROUPS_MAX
OPEN_MAX
PAGESIZE
PAGE_SIZE
RE_DUP_MAX
STREAM_MAX
SYMLOOP_MAX
TTY_NAME_MAX
TZNAME_MAX
BC_BASE_MAX
BC_DIM_MAX
BC_SCALE_MAX
BC_STRING_MAX
COLL_WEIGHTS_MAX
EXPR_NEST_MAX
LINE_MAX
POSIX_VERSION
POSIX_SOURCE
POSIX_C_SOURCE
POSIX2_VERSION
POSIX2_C_DEV
POSIX2_FORT_DEV
POSIX2_FORT_RUN
POSIX2_LOCALEDEF
POSIX2_SW_DEV
POSIX_PHYS_PAGES
POSIX_AVPHYS_PAGES
V6_ILP32_OFF32
V6_ILP32_OFFBIG
V6_LP64_OFF64
V6_LP64_OFFBIG
SSIZE_MAX
CHARCLASS_NAME_MAX
FOPEN_MAX
TMP_MAX
LONG_BIT
WORD_BIT
NL_ARGMAX
NL_LANGMAX
LANGMAX
NL_MSGMAX
MSGMAX
NL_NMAX
NMAX
NL_SETMAX
SETMAX
NL_TEXTMAX
TEXTMAX
NZERO
NOFILE
NFILE
JOB_CONTROL
READER_WRITER_LOCKS
SAVED_IDS
SHELL
VERSION
GETPW_R_SIZE_MAX
GETGR_R_SIZE_MAX
PASS_MAX
THREAD_DESTRUCTOR_ITERATIONS
THREAD_KEYS_MAX
THREAD_STACK_MIN
THREAD_THREADS_MAX
THREAD_SAFE_FUNCTIONS
ADVISORY_INFO
ASYNCHRONOUS_IO
BARRIERS
CPUTIME
CLOCK_SELECTION
FSYNC
IPV6
MAPPED_FILES
MEMLOCK
MEMLOCK_RANGE
MONOTONIC_CLOCK
MEMORY_PROTECTION
MESSAGE_PASSING
PRIORITIZED_IO
PRIORITIZED_SCHEDULING
RAW_SOCKETS
REALTIME_SIGNALS
SEMAPHORES
SHARED_MEMORY_OBJECTS
SYNCHRONIZED_IO
SPIN_LOCKS
SPAWN
SPORADIC_SERVER
THREAD_CPUTIME
TRACE
TRACE_INHERIT
TRACE_LOG
TRACE_EVENT_FILTER
THREADS
THREAD_PRIO_INHERIT
THREAD_PRIO_PROTECT
THREAD_PRIORITY_SCHEDULING
THREAD_ATTR_STACKADDR
THREAD_SAFE_FUNCTIONS
THREAD_PROCESS_SHARED
THREAD_SPORADIC_SERVER
THREAD_ATTR_STACKSIZE
TYPED_MEMORY_OBJECTS
XOPEN_SOURCE
XOPEN_UNIX
XOPEN_STREAMS
XOPEN_CRYPE
XOPEN_REALTIME
XOPEN_REALTIME_THREADS
XOPEN_LEGACY
XOPEN_VERSION
XOPEN_IOV_MAX
XOPEN_NAME_MAX
XOPEN_PATH_MAX
FILENAME_MAX
__STD_C__
_STRICT_ANSI_
_ISOC99_SOURCE
_BSD_SOURCE
_SVID_SOURCE
_GNU_SOURCE

 

pathconf.sym

FILESIZEBITS
LINK_MAX
MAX_CANON
MAX_INPUT
NAME_MAX
PATH_MAX
PIPE_BUF
SYMLINK_MAX
CHOWN_RESTRICTED
NO_TRUNC
VDISABLE

 

与书上不同,这里没有让用户分别提供常量的各个名称,以 OPEN_MAX 为例,书上的 sym 文件内容是 ”OPEN_MAX    _PC_OPEN_MAX“ 为一行内容,分别指定常量的编译期名称与运行期查询名称。这里感觉有些啰嗦,直接让用户提供一个原始名称 OPEN_MAX,然后我在 awk 脚本里做了一些处理,去拼接生成各种名称。例如还以 OPEN_MAX 为例,它会尝试以下名称:

  • OPEN_MAX  (原名称)
  • _OPEN_MAX  (_XXX)
  • _POSIX_OPEN_MAX  (_POSIX_XXX)
  • POPEN_MAX  (PXXX)
  • _PC_OPEN_MAX  (_PC_XXX)

主要起作用的规则是第 1 个与第 3 个,第 2 个规则对于形如 XOPEN_UNIX 的常量有用 (同时存在 _XOPEN_UNIX 与 _PC_XOPEN_UNIX);第 4 个规则对于形如  THREAD_KEYS_MAX 的常量有用 (同时存在 _POSIX_THREAD_KEYS_MAX / PTHREAD_KEYS_MAX / _PC_THREAD_KEYS_MAX);最后一个规则对于 pathconf.sym 而言是 _PC_XXX。

有了这个代码模板和常量定义文件之后,就可以通过 Makefile 将它们串在一起啦:

Makefile

 1 all: conf
 2 
 3 conf: conf.o apue.o
 4     gcc -Wall -g $^ -o $@
 5 
 6 conf.o: conf.c ../apue.h
 7     gcc -Wall -g -c $< -o $@
 8 
 9 conf.c: conf.awk sysconf.sym pathconf.sym
10     ./$^ > $@
11 
12 apue.o: ../apue.c ../apue.h 
13     gcc -Wall -g -c $< -o $@
14 
15 clean: 
16     @echo "start clean..."
17     -rm -f *.o core.* *.log *~ *.swp conf conf.c
18     @echo "end clean"
19 
20 .PHONY: clean

 

这样每次修改 sym 文件后,直接 make 就可以将新的常量包含进去了。下面是运行效果:

[yunhai@localhost 01.chapter]$ ./conf /
no symbol for ARG_MAX
no symbol for _ARG_MAX
_POSIX_ARG_MAX defined to be 4096
no symbol for PARG_MAX
sysconf (_SC_ARG_MAX) = 2621440

no symbol for ATEXIT_MAX
no symbol for _ATEXIT_MAX
no symbol for _POSIX_ATEXIT_MAX
no symbol for PATEXIT_MAX
sysconf (_SC_ATEXIT_MAX) = 2147483647

no symbol for CHILD_MAX
no symbol for _CHILD_MAX
_POSIX_CHILD_MAX defined to be 25
no symbol for PCHILD_MAX
sysconf (_SC_CHILD_MAX) = 1024

no symbol for CLK_TCK
no symbol for _CLK_TCK
no symbol for _POSIX_CLK_TCK
no symbol for PCLK_TCK
sysconf (_SC_CLK_TCK) = 100

no symbol for CLOCKS_PER_SEC
no symbol for _CLOCKS_PER_SEC
no symbol for _POSIX_CLOCKS_PER_SEC
no symbol for PCLOCKS_PER_SEC
no symbol for _SC_CLOCKS_PER_SEC

HOST_NAME_MAX defined to be 64
no symbol for _HOST_NAME_MAX
_POSIX_HOST_NAME_MAX defined to be 255
no symbol for PHOST_NAME_MAX
sysconf (_SC_HOST_NAME_MAX) = 64

IOV_MAX defined to be 1024
no symbol for _IOV_MAX
no symbol for _POSIX_IOV_MAX
no symbol for PIOV_MAX
sysconf (_SC_IOV_MAX) = 1024

LOGIN_NAME_MAX defined to be 256
no symbol for _LOGIN_NAME_MAX
_POSIX_LOGIN_NAME_MAX defined to be 9
no symbol for PLOGIN_NAME_MAX
sysconf (_SC_LOGIN_NAME_MAX) = 256

NGROUPS_MAX defined to be 65536
no symbol for _NGROUPS_MAX
_POSIX_NGROUPS_MAX defined to be 8
no symbol for PNGROUPS_MAX
sysconf (_SC_NGROUPS_MAX) = 65536

no symbol for OPEN_MAX
no symbol for _OPEN_MAX
_POSIX_OPEN_MAX defined to be 20
no symbol for POPEN_MAX
sysconf (_SC_OPEN_MAX) = 1024

no symbol for PAGESIZE
no symbol for _PAGESIZE
no symbol for _POSIX_PAGESIZE
no symbol for PPAGESIZE
sysconf (_SC_PAGESIZE) = 4096

no symbol for PAGE_SIZE
no symbol for _PAGE_SIZE
no symbol for _POSIX_PAGE_SIZE
no symbol for PPAGE_SIZE
sysconf (_SC_PAGE_SIZE) = 4096

RE_DUP_MAX defined to be 32767
no symbol for _RE_DUP_MAX
_POSIX_RE_DUP_MAX defined to be 255
no symbol for PRE_DUP_MAX
sysconf (_SC_RE_DUP_MAX) = 32767

no symbol for STREAM_MAX
no symbol for _STREAM_MAX
_POSIX_STREAM_MAX defined to be 8
no symbol for PSTREAM_MAX
sysconf (_SC_STREAM_MAX) = 16

no symbol for SYMLOOP_MAX
no symbol for _SYMLOOP_MAX
_POSIX_SYMLOOP_MAX defined to be 8
no symbol for PSYMLOOP_MAX
sysconf (_SC_SYMLOOP_MAX) = (no limit)

TTY_NAME_MAX defined to be 32
no symbol for _TTY_NAME_MAX
_POSIX_TTY_NAME_MAX defined to be 9
no symbol for PTTY_NAME_MAX
sysconf (_SC_TTY_NAME_MAX) = 32

no symbol for TZNAME_MAX
no symbol for _TZNAME_MAX
_POSIX_TZNAME_MAX defined to be 6
no symbol for PTZNAME_MAX
sysconf (_SC_TZNAME_MAX) = 6

BC_BASE_MAX defined to be 99
no symbol for _BC_BASE_MAX
no symbol for _POSIX_BC_BASE_MAX
no symbol for PBC_BASE_MAX
sysconf (_SC_BC_BASE_MAX) = 99

BC_DIM_MAX defined to be 2048
no symbol for _BC_DIM_MAX
no symbol for _POSIX_BC_DIM_MAX
no symbol for PBC_DIM_MAX
sysconf (_SC_BC_DIM_MAX) = 2048

BC_SCALE_MAX defined to be 99
no symbol for _BC_SCALE_MAX
no symbol for _POSIX_BC_SCALE_MAX
no symbol for PBC_SCALE_MAX
sysconf (_SC_BC_SCALE_MAX) = 99

BC_STRING_MAX defined to be 1000
no symbol for _BC_STRING_MAX
no symbol for _POSIX_BC_STRING_MAX
no symbol for PBC_STRING_MAX
sysconf (_SC_BC_STRING_MAX) = 1000

COLL_WEIGHTS_MAX defined to be 255
no symbol for _COLL_WEIGHTS_MAX
no symbol for _POSIX_COLL_WEIGHTS_MAX
no symbol for PCOLL_WEIGHTS_MAX
sysconf (_SC_COLL_WEIGHTS_MAX) = 255

EXPR_NEST_MAX defined to be 32
no symbol for _EXPR_NEST_MAX
no symbol for _POSIX_EXPR_NEST_MAX
no symbol for PEXPR_NEST_MAX
sysconf (_SC_EXPR_NEST_MAX) = 32

LINE_MAX defined to be 2048
no symbol for _LINE_MAX
no symbol for _POSIX_LINE_MAX
no symbol for PLINE_MAX
sysconf (_SC_LINE_MAX) = 2048

no symbol for POSIX_VERSION
_POSIX_VERSION defined to be 200809
no symbol for _POSIX_POSIX_VERSION
no symbol for PPOSIX_VERSION
no symbol for _SC_POSIX_VERSION

no symbol for POSIX_SOURCE
_POSIX_SOURCE defined to be 1
no symbol for _POSIX_POSIX_SOURCE
no symbol for PPOSIX_SOURCE
no symbol for _SC_POSIX_SOURCE

no symbol for POSIX_C_SOURCE
_POSIX_C_SOURCE defined to be 200809
no symbol for _POSIX_POSIX_C_SOURCE
no symbol for PPOSIX_C_SOURCE
no symbol for _SC_POSIX_C_SOURCE

no symbol for POSIX2_VERSION
_POSIX2_VERSION defined to be 200809
no symbol for _POSIX_POSIX2_VERSION
no symbol for PPOSIX2_VERSION
no symbol for _SC_POSIX2_VERSION

no symbol for POSIX2_C_DEV
_POSIX2_C_DEV defined to be 200809
no symbol for _POSIX_POSIX2_C_DEV
no symbol for PPOSIX2_C_DEV
no symbol for _SC_POSIX2_C_DEV

no symbol for POSIX2_FORT_DEV
no symbol for _POSIX2_FORT_DEV
no symbol for _POSIX_POSIX2_FORT_DEV
no symbol for PPOSIX2_FORT_DEV
no symbol for _SC_POSIX2_FORT_DEV

no symbol for POSIX2_FORT_RUN
no symbol for _POSIX2_FORT_RUN
no symbol for _POSIX_POSIX2_FORT_RUN
no symbol for PPOSIX2_FORT_RUN
no symbol for _SC_POSIX2_FORT_RUN

no symbol for POSIX2_LOCALEDEF
_POSIX2_LOCALEDEF defined to be 200809
no symbol for _POSIX_POSIX2_LOCALEDEF
no symbol for PPOSIX2_LOCALEDEF
no symbol for _SC_POSIX2_LOCALEDEF

no symbol for POSIX2_SW_DEV
_POSIX2_SW_DEV defined to be 200809
no symbol for _POSIX_POSIX2_SW_DEV
no symbol for PPOSIX2_SW_DEV
no symbol for _SC_POSIX2_SW_DEV

no symbol for POSIX_PHYS_PAGES
no symbol for _POSIX_PHYS_PAGES
no symbol for _POSIX_POSIX_PHYS_PAGES
no symbol for PPOSIX_PHYS_PAGES
no symbol for _SC_POSIX_PHYS_PAGES

no symbol for POSIX_AVPHYS_PAGES
no symbol for _POSIX_AVPHYS_PAGES
no symbol for _POSIX_POSIX_AVPHYS_PAGES
no symbol for PPOSIX_AVPHYS_PAGES
no symbol for _SC_POSIX_AVPHYS_PAGES

no symbol for V6_ILP32_OFF32
no symbol for _V6_ILP32_OFF32
_POSIX_V6_ILP32_OFF32 defined to be 1
no symbol for PV6_ILP32_OFF32
sysconf (_SC_V6_ILP32_OFF32) = 1

no symbol for V6_ILP32_OFFBIG
no symbol for _V6_ILP32_OFFBIG
_POSIX_V6_ILP32_OFFBIG defined to be 1
no symbol for PV6_ILP32_OFFBIG
sysconf (_SC_V6_ILP32_OFFBIG) = 1

no symbol for V6_LP64_OFF64
no symbol for _V6_LP64_OFF64
no symbol for _POSIX_V6_LP64_OFF64
no symbol for PV6_LP64_OFF64
sysconf (_SC_V6_LP64_OFF64) = (no limit)

no symbol for V6_LP64_OFFBIG
no symbol for _V6_LP64_OFFBIG
no symbol for _POSIX_V6_LP64_OFFBIG
no symbol for PV6_LP64_OFFBIG
no symbol for _SC_V6_LP64_OFFBIG

SSIZE_MAX defined to be 2147483647
no symbol for _SSIZE_MAX
_POSIX_SSIZE_MAX defined to be 32767
no symbol for PSSIZE_MAX
sysconf (_SC_SSIZE_MAX) = 32767

CHARCLASS_NAME_MAX defined to be 2048
no symbol for _CHARCLASS_NAME_MAX
no symbol for _POSIX_CHARCLASS_NAME_MAX
no symbol for PCHARCLASS_NAME_MAX
sysconf (_SC_CHARCLASS_NAME_MAX) = 2048

FOPEN_MAX defined to be 16
no symbol for _FOPEN_MAX
no symbol for _POSIX_FOPEN_MAX
no symbol for PFOPEN_MAX
no symbol for _SC_FOPEN_MAX

TMP_MAX defined to be 238328
no symbol for _TMP_MAX
no symbol for _POSIX_TMP_MAX
no symbol for PTMP_MAX
no symbol for _SC_TMP_MAX

LONG_BIT defined to be 32
no symbol for _LONG_BIT
no symbol for _POSIX_LONG_BIT
no symbol for PLONG_BIT
sysconf (_SC_LONG_BIT) = 32

WORD_BIT defined to be 32
no symbol for _WORD_BIT
no symbol for _POSIX_WORD_BIT
no symbol for PWORD_BIT
sysconf (_SC_WORD_BIT) = 32

NL_ARGMAX defined to be 4096
no symbol for _NL_ARGMAX
no symbol for _POSIX_NL_ARGMAX
no symbol for PNL_ARGMAX
sysconf (_SC_NL_ARGMAX) = 4096

NL_LANGMAX defined to be 2048
no symbol for _NL_LANGMAX
no symbol for _POSIX_NL_LANGMAX
no symbol for PNL_LANGMAX
sysconf (_SC_NL_LANGMAX) = 2048

no symbol for LANGMAX
no symbol for _LANGMAX
no symbol for _POSIX_LANGMAX
no symbol for PLANGMAX
no symbol for _SC_LANGMAX

NL_MSGMAX defined to be 2147483647
no symbol for _NL_MSGMAX
no symbol for _POSIX_NL_MSGMAX
no symbol for PNL_MSGMAX
sysconf (_SC_NL_MSGMAX) = 2147483647

no symbol for MSGMAX
no symbol for _MSGMAX
no symbol for _POSIX_MSGMAX
no symbol for PMSGMAX
no symbol for _SC_MSGMAX

NL_NMAX defined to be 2147483647
no symbol for _NL_NMAX
no symbol for _POSIX_NL_NMAX
no symbol for PNL_NMAX
sysconf (_SC_NL_NMAX) = 2147483647

no symbol for NMAX
no symbol for _NMAX
no symbol for _POSIX_NMAX
no symbol for PNMAX
no symbol for _SC_NMAX

NL_SETMAX defined to be 2147483647
no symbol for _NL_SETMAX
no symbol for _POSIX_NL_SETMAX
no symbol for PNL_SETMAX
sysconf (_SC_NL_SETMAX) = 2147483647

no symbol for SETMAX
no symbol for _SETMAX
no symbol for _POSIX_SETMAX
no symbol for PSETMAX
no symbol for _SC_SETMAX

NL_TEXTMAX defined to be 2147483647
no symbol for _NL_TEXTMAX
no symbol for _POSIX_NL_TEXTMAX
no symbol for PNL_TEXTMAX
sysconf (_SC_NL_TEXTMAX) = 2147483647

no symbol for TEXTMAX
no symbol for _TEXTMAX
no symbol for _POSIX_TEXTMAX
no symbol for PTEXTMAX
no symbol for _SC_TEXTMAX

NZERO defined to be 20
no symbol for _NZERO
no symbol for _POSIX_NZERO
no symbol for PNZERO
sysconf (_SC_NZERO) = 20

NOFILE defined to be 256
no symbol for _NOFILE
no symbol for _POSIX_NOFILE
no symbol for PNOFILE
no symbol for _SC_NOFILE

no symbol for NFILE
no symbol for _NFILE
no symbol for _POSIX_NFILE
no symbol for PNFILE
no symbol for _SC_NFILE

no symbol for JOB_CONTROL
no symbol for _JOB_CONTROL
_POSIX_JOB_CONTROL defined to be 1
no symbol for PJOB_CONTROL
sysconf (_SC_JOB_CONTROL) = 1

no symbol for READER_WRITER_LOCKS
no symbol for _READER_WRITER_LOCKS
_POSIX_READER_WRITER_LOCKS defined to be 200809
no symbol for PREADER_WRITER_LOCKS
sysconf (_SC_READER_WRITER_LOCKS) = 200809

no symbol for SAVED_IDS
no symbol for _SAVED_IDS
_POSIX_SAVED_IDS defined to be 1
no symbol for PSAVED_IDS
sysconf (_SC_SAVED_IDS) = 1

no symbol for SHELL
no symbol for _SHELL
_POSIX_SHELL defined to be 1
no symbol for PSHELL
sysconf (_SC_SHELL) = 1

no symbol for VERSION
no symbol for _VERSION
_POSIX_VERSION defined to be 200809
no symbol for PVERSION
sysconf (_SC_VERSION) = 200809

no symbol for GETPW_R_SIZE_MAX
no symbol for _GETPW_R_SIZE_MAX
no symbol for _POSIX_GETPW_R_SIZE_MAX
no symbol for PGETPW_R_SIZE_MAX
sysconf (_SC_GETPW_R_SIZE_MAX) = 1024

no symbol for GETGR_R_SIZE_MAX
no symbol for _GETGR_R_SIZE_MAX
no symbol for _POSIX_GETGR_R_SIZE_MAX
no symbol for PGETGR_R_SIZE_MAX
sysconf (_SC_GETGR_R_SIZE_MAX) = 1024

no symbol for PASS_MAX
no symbol for _PASS_MAX
no symbol for _POSIX_PASS_MAX
no symbol for PPASS_MAX
sysconf (_SC_PASS_MAX) = 8192

no symbol for THREAD_DESTRUCTOR_ITERATIONS
no symbol for _THREAD_DESTRUCTOR_ITERATIONS
_POSIX_THREAD_DESTRUCTOR_ITERATIONS defined to be 4
PTHREAD_DESTRUCTOR_ITERATIONS defined to be 4
sysconf (_SC_THREAD_DESTRUCTOR_ITERATIONS) = 4

no symbol for THREAD_KEYS_MAX
no symbol for _THREAD_KEYS_MAX
_POSIX_THREAD_KEYS_MAX defined to be 128
PTHREAD_KEYS_MAX defined to be 1024
sysconf (_SC_THREAD_KEYS_MAX) = 1024

no symbol for THREAD_STACK_MIN
no symbol for _THREAD_STACK_MIN
no symbol for _POSIX_THREAD_STACK_MIN
PTHREAD_STACK_MIN defined to be 16384
sysconf (_SC_THREAD_STACK_MIN) = 16384

no symbol for THREAD_THREADS_MAX
no symbol for _THREAD_THREADS_MAX
_POSIX_THREAD_THREADS_MAX defined to be 64
no symbol for PTHREAD_THREADS_MAX
sysconf (_SC_THREAD_THREADS_MAX) = (no limit)

no symbol for THREAD_SAFE_FUNCTIONS
no symbol for _THREAD_SAFE_FUNCTIONS
_POSIX_THREAD_SAFE_FUNCTIONS defined to be 200809
no symbol for PTHREAD_SAFE_FUNCTIONS
sysconf (_SC_THREAD_SAFE_FUNCTIONS) = 200809

no symbol for ADVISORY_INFO
no symbol for _ADVISORY_INFO
_POSIX_ADVISORY_INFO defined to be 200809
no symbol for PADVISORY_INFO
sysconf (_SC_ADVISORY_INFO) = 200809

no symbol for ASYNCHRONOUS_IO
no symbol for _ASYNCHRONOUS_IO
_POSIX_ASYNCHRONOUS_IO defined to be 200809
no symbol for PASYNCHRONOUS_IO
sysconf (_SC_ASYNCHRONOUS_IO) = 200809

no symbol for BARRIERS
no symbol for _BARRIERS
_POSIX_BARRIERS defined to be 200809
no symbol for PBARRIERS
sysconf (_SC_BARRIERS) = 200809

no symbol for CPUTIME
no symbol for _CPUTIME
_POSIX_CPUTIME defined to be 0
no symbol for PCPUTIME
sysconf (_SC_CPUTIME) = 200809

no symbol for CLOCK_SELECTION
no symbol for _CLOCK_SELECTION
_POSIX_CLOCK_SELECTION defined to be 200809
no symbol for PCLOCK_SELECTION
sysconf (_SC_CLOCK_SELECTION) = 200809

no symbol for FSYNC
no symbol for _FSYNC
_POSIX_FSYNC defined to be 200809
no symbol for PFSYNC
sysconf (_SC_FSYNC) = 200809

no symbol for IPV6
no symbol for _IPV6
_POSIX_IPV6 defined to be 200809
no symbol for PIPV6
sysconf (_SC_IPV6) = 200809

no symbol for MAPPED_FILES
no symbol for _MAPPED_FILES
_POSIX_MAPPED_FILES defined to be 200809
no symbol for PMAPPED_FILES
sysconf (_SC_MAPPED_FILES) = 200809

no symbol for MEMLOCK
no symbol for _MEMLOCK
_POSIX_MEMLOCK defined to be 200809
no symbol for PMEMLOCK
sysconf (_SC_MEMLOCK) = 200809

no symbol for MEMLOCK_RANGE
no symbol for _MEMLOCK_RANGE
_POSIX_MEMLOCK_RANGE defined to be 200809
no symbol for PMEMLOCK_RANGE
sysconf (_SC_MEMLOCK_RANGE) = 200809

no symbol for MONOTONIC_CLOCK
no symbol for _MONOTONIC_CLOCK
_POSIX_MONOTONIC_CLOCK defined to be 0
no symbol for PMONOTONIC_CLOCK
sysconf (_SC_MONOTONIC_CLOCK) = 200809

no symbol for MEMORY_PROTECTION
no symbol for _MEMORY_PROTECTION
_POSIX_MEMORY_PROTECTION defined to be 200809
no symbol for PMEMORY_PROTECTION
sysconf (_SC_MEMORY_PROTECTION) = 200809

no symbol for MESSAGE_PASSING
no symbol for _MESSAGE_PASSING
_POSIX_MESSAGE_PASSING defined to be 200809
no symbol for PMESSAGE_PASSING
sysconf (_SC_MESSAGE_PASSING) = 200809

no symbol for PRIORITIZED_IO
no symbol for _PRIORITIZED_IO
_POSIX_PRIORITIZED_IO defined to be 200809
no symbol for PPRIORITIZED_IO
sysconf (_SC_PRIORITIZED_IO) = 200809

no symbol for PRIORITIZED_SCHEDULING
no symbol for _PRIORITIZED_SCHEDULING
no symbol for _POSIX_PRIORITIZED_SCHEDULING
no symbol for PPRIORITIZED_SCHEDULING
no symbol for _SC_PRIORITIZED_SCHEDULING

no symbol for RAW_SOCKETS
no symbol for _RAW_SOCKETS
_POSIX_RAW_SOCKETS defined to be 200809
no symbol for PRAW_SOCKETS
sysconf (_SC_RAW_SOCKETS) = 200809

no symbol for REALTIME_SIGNALS
no symbol for _REALTIME_SIGNALS
_POSIX_REALTIME_SIGNALS defined to be 200809
no symbol for PREALTIME_SIGNALS
sysconf (_SC_REALTIME_SIGNALS) = 200809

no symbol for SEMAPHORES
no symbol for _SEMAPHORES
_POSIX_SEMAPHORES defined to be 200809
no symbol for PSEMAPHORES
sysconf (_SC_SEMAPHORES) = 200809

no symbol for SHARED_MEMORY_OBJECTS
no symbol for _SHARED_MEMORY_OBJECTS
_POSIX_SHARED_MEMORY_OBJECTS defined to be 200809
no symbol for PSHARED_MEMORY_OBJECTS
sysconf (_SC_SHARED_MEMORY_OBJECTS) = 200809

no symbol for SYNCHRONIZED_IO
no symbol for _SYNCHRONIZED_IO
_POSIX_SYNCHRONIZED_IO defined to be 200809
no symbol for PSYNCHRONIZED_IO
sysconf (_SC_SYNCHRONIZED_IO) = 200809

no symbol for SPIN_LOCKS
no symbol for _SPIN_LOCKS
_POSIX_SPIN_LOCKS defined to be 200809
no symbol for PSPIN_LOCKS
sysconf (_SC_SPIN_LOCKS) = 200809

no symbol for SPAWN
no symbol for _SPAWN
_POSIX_SPAWN defined to be 200809
no symbol for PSPAWN
sysconf (_SC_SPAWN) = 200809

no symbol for SPORADIC_SERVER
no symbol for _SPORADIC_SERVER
_POSIX_SPORADIC_SERVER defined to be -1
no symbol for PSPORADIC_SERVER
sysconf (_SC_SPORADIC_SERVER) = (no limit)

no symbol for THREAD_CPUTIME
no symbol for _THREAD_CPUTIME
_POSIX_THREAD_CPUTIME defined to be 0
no symbol for PTHREAD_CPUTIME
sysconf (_SC_THREAD_CPUTIME) = 200809

no symbol for TRACE
no symbol for _TRACE
_POSIX_TRACE defined to be -1
no symbol for PTRACE
sysconf (_SC_TRACE) = (no limit)

no symbol for TRACE_INHERIT
no symbol for _TRACE_INHERIT
_POSIX_TRACE_INHERIT defined to be -1
no symbol for PTRACE_INHERIT
sysconf (_SC_TRACE_INHERIT) = (no limit)

no symbol for TRACE_LOG
no symbol for _TRACE_LOG
_POSIX_TRACE_LOG defined to be -1
no symbol for PTRACE_LOG
sysconf (_SC_TRACE_LOG) = (no limit)

no symbol for TRACE_EVENT_FILTER
no symbol for _TRACE_EVENT_FILTER
_POSIX_TRACE_EVENT_FILTER defined to be -1
no symbol for PTRACE_EVENT_FILTER
sysconf (_SC_TRACE_EVENT_FILTER) = (no limit)

no symbol for THREADS
no symbol for _THREADS
_POSIX_THREADS defined to be 200809
no symbol for PTHREADS
sysconf (_SC_THREADS) = 200809

no symbol for THREAD_PRIO_INHERIT
no symbol for _THREAD_PRIO_INHERIT
_POSIX_THREAD_PRIO_INHERIT defined to be 200809
no symbol for PTHREAD_PRIO_INHERIT
sysconf (_SC_THREAD_PRIO_INHERIT) = 200809

no symbol for THREAD_PRIO_PROTECT
no symbol for _THREAD_PRIO_PROTECT
_POSIX_THREAD_PRIO_PROTECT defined to be 200809
no symbol for PTHREAD_PRIO_PROTECT
sysconf (_SC_THREAD_PRIO_PROTECT) = 200809

no symbol for THREAD_PRIORITY_SCHEDULING
no symbol for _THREAD_PRIORITY_SCHEDULING
_POSIX_THREAD_PRIORITY_SCHEDULING defined to be 200809
no symbol for PTHREAD_PRIORITY_SCHEDULING
sysconf (_SC_THREAD_PRIORITY_SCHEDULING) = 200809

no symbol for THREAD_ATTR_STACKADDR
no symbol for _THREAD_ATTR_STACKADDR
_POSIX_THREAD_ATTR_STACKADDR defined to be 200809
no symbol for PTHREAD_ATTR_STACKADDR
sysconf (_SC_THREAD_ATTR_STACKADDR) = 200809

no symbol for THREAD_SAFE_FUNCTIONS
no symbol for _THREAD_SAFE_FUNCTIONS
_POSIX_THREAD_SAFE_FUNCTIONS defined to be 200809
no symbol for PTHREAD_SAFE_FUNCTIONS
sysconf (_SC_THREAD_SAFE_FUNCTIONS) = 200809

no symbol for THREAD_PROCESS_SHARED
no symbol for _THREAD_PROCESS_SHARED
_POSIX_THREAD_PROCESS_SHARED defined to be 200809
no symbol for PTHREAD_PROCESS_SHARED
sysconf (_SC_THREAD_PROCESS_SHARED) = 200809

no symbol for THREAD_SPORADIC_SERVER
no symbol for _THREAD_SPORADIC_SERVER
_POSIX_THREAD_SPORADIC_SERVER defined to be -1
no symbol for PTHREAD_SPORADIC_SERVER
sysconf (_SC_THREAD_SPORADIC_SERVER) = (no limit)

no symbol for THREAD_ATTR_STACKSIZE
no symbol for _THREAD_ATTR_STACKSIZE
_POSIX_THREAD_ATTR_STACKSIZE defined to be 200809
no symbol for PTHREAD_ATTR_STACKSIZE
sysconf (_SC_THREAD_ATTR_STACKSIZE) = 200809

no symbol for TYPED_MEMORY_OBJECTS
no symbol for _TYPED_MEMORY_OBJECTS
_POSIX_TYPED_MEMORY_OBJECTS defined to be -1
no symbol for PTYPED_MEMORY_OBJECTS
sysconf (_SC_TYPED_MEMORY_OBJECTS) = (no limit)

no symbol for XOPEN_SOURCE
_XOPEN_SOURCE defined to be 700
no symbol for _POSIX_XOPEN_SOURCE
no symbol for PXOPEN_SOURCE
no symbol for _SC_XOPEN_SOURCE

no symbol for XOPEN_UNIX
_XOPEN_UNIX defined to be 1
no symbol for _POSIX_XOPEN_UNIX
no symbol for PXOPEN_UNIX
sysconf (_SC_XOPEN_UNIX) = 1

no symbol for XOPEN_STREAMS
_XOPEN_STREAMS defined to be -1
no symbol for _POSIX_XOPEN_STREAMS
no symbol for PXOPEN_STREAMS
sysconf (_SC_XOPEN_STREAMS) = (no limit)

no symbol for XOPEN_CRYPE
no symbol for _XOPEN_CRYPE
no symbol for _POSIX_XOPEN_CRYPE
no symbol for PXOPEN_CRYPE
no symbol for _SC_XOPEN_CRYPE

no symbol for XOPEN_REALTIME
_XOPEN_REALTIME defined to be 1
no symbol for _POSIX_XOPEN_REALTIME
no symbol for PXOPEN_REALTIME
sysconf (_SC_XOPEN_REALTIME) = 1

no symbol for XOPEN_REALTIME_THREADS
_XOPEN_REALTIME_THREADS defined to be 1
no symbol for _POSIX_XOPEN_REALTIME_THREADS
no symbol for PXOPEN_REALTIME_THREADS
sysconf (_SC_XOPEN_REALTIME_THREADS) = 1

no symbol for XOPEN_LEGACY
_XOPEN_LEGACY defined to be 1
no symbol for _POSIX_XOPEN_LEGACY
no symbol for PXOPEN_LEGACY
sysconf (_SC_XOPEN_LEGACY) = 1

no symbol for XOPEN_VERSION
_XOPEN_VERSION defined to be 700
no symbol for _POSIX_XOPEN_VERSION
no symbol for PXOPEN_VERSION
sysconf (_SC_XOPEN_VERSION) = 700

no symbol for XOPEN_IOV_MAX
_XOPEN_IOV_MAX defined to be 16
no symbol for _POSIX_XOPEN_IOV_MAX
no symbol for PXOPEN_IOV_MAX
no symbol for _SC_XOPEN_IOV_MAX

no symbol for XOPEN_NAME_MAX
no symbol for _XOPEN_NAME_MAX
no symbol for _POSIX_XOPEN_NAME_MAX
no symbol for PXOPEN_NAME_MAX
no symbol for _SC_XOPEN_NAME_MAX

no symbol for XOPEN_PATH_MAX
no symbol for _XOPEN_PATH_MAX
no symbol for _POSIX_XOPEN_PATH_MAX
no symbol for PXOPEN_PATH_MAX
no symbol for _SC_XOPEN_PATH_MAX

FILENAME_MAX defined to be 4096
no symbol for _FILENAME_MAX
no symbol for _POSIX_FILENAME_MAX
no symbol for PFILENAME_MAX
no symbol for _SC_FILENAME_MAX

no symbol for __STD_C__
no symbol for ___STD_C__
no symbol for _POSIX___STD_C__
no symbol for P__STD_C__
no symbol for _SC___STD_C__

no symbol for _STRICT_ANSI_
no symbol for __STRICT_ANSI_
no symbol for _POSIX__STRICT_ANSI_
no symbol for P_STRICT_ANSI_
no symbol for _SC__STRICT_ANSI_

_ISOC99_SOURCE defined to be 1
no symbol for __ISOC99_SOURCE
no symbol for _POSIX__ISOC99_SOURCE
no symbol for P_ISOC99_SOURCE
no symbol for _SC__ISOC99_SOURCE

_BSD_SOURCE defined to be 1
no symbol for __BSD_SOURCE
no symbol for _POSIX__BSD_SOURCE
no symbol for P_BSD_SOURCE
no symbol for _SC__BSD_SOURCE

_SVID_SOURCE defined to be 1
no symbol for __SVID_SOURCE
no symbol for _POSIX__SVID_SOURCE
no symbol for P_SVID_SOURCE
no symbol for _SC__SVID_SOURCE

_GNU_SOURCE defined to be 0
no symbol for __GNU_SOURCE
no symbol for _POSIX__GNU_SOURCE
no symbol for P_GNU_SOURCE
no symbol for _SC__GNU_SOURCE

no symbol for FILESIZEBITS
no symbol for _FILESIZEBITS
no symbol for _POSIX_FILESIZEBITS
pathconf (_PC_FILESIZEBITS) = 64

no symbol for LINK_MAX
no symbol for _LINK_MAX
_POSIX_LINK_MAX defined to be 8
pathconf (_PC_LINK_MAX) = 32000

MAX_CANON defined to be 255
no symbol for _MAX_CANON
_POSIX_MAX_CANON defined to be 255
pathconf (_PC_MAX_CANON) = 255

MAX_INPUT defined to be 255
no symbol for _MAX_INPUT
_POSIX_MAX_INPUT defined to be 255
pathconf (_PC_MAX_INPUT) = 255

NAME_MAX defined to be 255
no symbol for _NAME_MAX
_POSIX_NAME_MAX defined to be 14
pathconf (_PC_NAME_MAX) = 255

PATH_MAX defined to be 4096
no symbol for _PATH_MAX
_POSIX_PATH_MAX defined to be 256
pathconf (_PC_PATH_MAX) = 4096

PIPE_BUF defined to be 4096
no symbol for _PIPE_BUF
_POSIX_PIPE_BUF defined to be 512
pathconf (_PC_PIPE_BUF) = 4096

no symbol for SYMLINK_MAX
no symbol for _SYMLINK_MAX
_POSIX_SYMLINK_MAX defined to be 255
pathconf (_PC_SYMLINK_MAX) = (no limit)

no symbol for CHOWN_RESTRICTED
no symbol for _CHOWN_RESTRICTED
_POSIX_CHOWN_RESTRICTED defined to be 0
pathconf (_PC_CHOWN_RESTRICTED) = 1

no symbol for NO_TRUNC
no symbol for _NO_TRUNC
_POSIX_NO_TRUNC defined to be 1
pathconf (_PC_NO_TRUNC) = 1

no symbol for VDISABLE
no symbol for _VDISABLE
_POSIX_VDISABLE defined to be 0
pathconf (_PC_VDISABLE) = 0

 

我运行的环境是 CentOS 6.7,通过 grep 去掉没有定义的常量 (grep -v 'no symbol') 之后,和在另一台机器上 (NeoKylin)上的运行结果做个对比,如下:

 

其中 CentOS 是 32 位,而中标麒麟是 64 位。不过好像也看不出来什么很大的差异,而且有些限制通过这样的查询也不一定准确,例如最大打开文件句柄数,很可能就和 ulimit 设置相关,如果想找到确切的限制值的话,建议还是使用 getrlimit 去获取,会更准确一些。

posted @ 2020-06-17 17:26  goodcitizen  阅读(846)  评论(2编辑  收藏  举报