detect_posix.cpp
Go to the documentation of this file.
1 
11 /*****************************************************************************
12 ** Includes
13 *****************************************************************************/
14 
15 #include <iostream>
16 
17 /*****************************************************************************
18 ** Preprocessing
19 *****************************************************************************/
20 
21 #ifdef __GNUC__
22  #include <unistd.h>
23  #include <cstdio>
24 #endif
25 
26 /*****************************************************************************
27 ** Main
28 *****************************************************************************/
29 
30 
31 int main()
32 {
33 #ifndef _POSIX_VERSION
34  printf("No support for POSIX on this system!\n");
35 #else //see what POSIX version
36  long val;
37  int errno;
38 
39  #if defined(POSIX_VERSION)
40  printf("POSIX_VERSION = %d.\n",_POSIX_VERSION);
41  #endif
42  #if defined(POSIX2_VERSION)
43  printf("POSIX2_VERSION = %d.\n",_POSIX2_VERSION);
44  #endif
45  #if defined(POSIX2_C_VERSION)
46  printf("POSIX2_C_VERSION = %d.\n",_POSIX2_C_VERSION);
47  #endif
48  #if _POSIX_VERSION == 199009
49  printf("This system supports POSIX.1 without support for POSIX.4.\n");
50  #else
51  #if _POSIX_VERSION >= 199309
52  printf ("This system has Posix Version %ld. \n", _POSIX_VERSION);
53  printf ("POSIX.1 and POSIX.4 are both supported. \n");
54  #else
55  printf("This system supports a strange POSIX version between 199009 and 199309.\n");
56  #endif
57  //DO POSIX.4 tests
58  printf ("POSIX.4 Options Test Results:\n");
59  #ifdef _POSIX_REALTIME_SIGNALS
60  printf(" POSIX.4 Additional real time signals are supported.\n");
61  #ifdef _POSIX_RTSIG_MAX
62  printf(" _POSIX_RTSIG_MAX=%d Max real time signals.\n",_POSIX_RTSIG_MAX);
63  #else
64  printf(" No _POSIX_RTSIG_MAX value exists.\n");
65  #endif
66  #ifdef _POSIX_SIGQUEUE_MAX
67  printf(" _POSIX_SIGQUEUE_MAX=%d Max real time signals at once per process.\n",_POSIX_SIGQUEUE_MAX);
68  #else
69  printf(" No _POSIX_SIGQUEUE_MAX value exists.\n");
70  #endif
71  #else
72  printf(" POSIX.4 Additional real time signals are not supported.\n");
73  #endif
74  #ifdef _POSIX_PRIORITY_SCHEDULING
75  printf(" POSIX.4 Priority scheduling is supported.\n");
76  #else
77  printf(" POSIX.4 Priority scheduling is not supported.\n");
78  #endif
79  #ifdef _POSIX_TIMERS
80  printf(" POSIX.4 Clocks and timers are supported.\n");
81  #ifdef _POSIX_TIMER_MAX
82  printf(" _POSIX_TIMER_MAX=%d Max number of concurrent timers a process can have.\n",_POSIX_TIMER_MAX);
83  #else
84  printf(" No _POSIX_TIMER_MAX value exists.\n");
85  #endif
86  #ifdef _POSIX_DELAYTIMER_MAX
87  printf(" _POSIX_DELAYTIMER_MAX=%d Max number of times a timer can have a detectable overrun.\n",_POSIX_DELAYTIMER_MAX);
88  #else
89  printf(" No _POSIX_DELAYTIMER_MAX value exists.\n");
90  #endif
91  #else
92  printf(" POSIX.4 Clocks and timers are not supported.\n");
93  #endif
94  #ifdef _POSIX_ASYNCHRONOUS_IO
95  printf(" POSIX.4 Asynchronous I/O is supported.\n");
96  #ifdef _POSIX_AIO_LISTIO_MAX
97  printf(" _POSIX_AIO_LISTIO_MAX=%d Max operations in one call\n",_POSIX_AIO_LISTIO_MAX);
98  #else
99  printf(" No _POSIX_AIO_LISTIO_MAX value exists.\n");
100  #endif
101  #ifdef _POSIX_AIO_MAX
102  printf(" _POSIX_AIO_MAX=%d Max concurrent Async I/Os\n",_POSIX_AIO_MAX);
103  #else
104  printf(" No _POSIX_AIO_MAX value exists.\n");
105  #endif
106  #else
107  printf(" POSIX.4 Asynchronous I/O is not supported.\n");
108  #endif
109  #ifdef _POSIX_SYNCHRONIZED_IO //Only supported if Asynchronous I/O is supported
110  printf(" POSIX.4 Synchronized I/O is supported.\n");
111  #else
112  printf(" POSIX.4 Synchronized I/O is not supported.\n");
113  #endif
114  #ifdef _POSIX_PRIORITIZED_IO
115  printf(" POSIX.4 Prioritized asynchronous I/O is supported.\n");
116  #ifdef _POSIX_AIO_PRIO_DELTA_MAX
117  printf(" _POSIX_AIO_PRIO_DELTA_MAX=%d Max amount AIO priority can be decreased.\n",_POSIX_AIO_PRIO_DELTA_MAX);
118  #else
119  printf(" No _POSIX_AIO_PRIO_DELTA_MAX value exists.\n");
120  #endif
121  #else
122  printf(" POSIX.4 Prioritized asynchronous I/O is not supported.\n");
123  #endif
124  #ifdef _POSIX_FSYNC
125  printf(" POSIX.4 The fsync function is supported.\n");
126  #else
127  printf(" POSIX.4 The fsync function is not supported.\n");
128  #endif
129  #ifdef _POSIX_MAPPED_FILES
130  printf(" POSIX.4 Mapping files as memory is supported.\n");
131  #else
132  printf(" POSIX.4 Mapping files as memory is not supported.\n");
133  #endif
134  #ifdef _POSIX_MEMLOCK
135  printf(" POSIX.4 Locking memory is supported.\n");
136  #else
137  printf(" POSIX.4 Locking memory is not supported.\n");
138  #endif
139  #ifdef _POSIX_MEMLOCK_RANGE
140  printf(" POSIX.4 Locking memory ranges is supported.\n");
141  #else
142  printf(" POSIX.4 Locking memory ranges is not supported.\n");
143  #endif
144  #ifdef _POSIX_MEMORY_PROTECTION
145  printf(" POSIX.4 Setting memory protection is supported.\n");
146  #else
147  printf(" POSIX.4 Setting memory protection is not supported.\n");
148  #endif
149  #ifdef _POSIX_MESSAGE_PASSING
150  printf(" POSIX.4 Message Queues are supported.\n");
151  #ifdef _POSIX_MQ_OPEN_MAX
152  printf(" _POSIX_MQ_OPEN_MAX=%d Max # of message queues per process.\n",_POSIX_MQ_OPEN_MAX);
153  #else
154  printf(" No _POSIX_MQ_OPEN_MAX value exists.\n");
155  #endif
156  #ifdef _POSIX_MQ_PRIO_MAX
157  printf(" _POSIX_MQ_PRIO_MAX=%d Max # of message priorities.\n",_POSIX_MQ_PRIO_MAX);
158  #else
159  printf(" No _POSIX_MQ_PRIO_MAX value exists.\n");
160  #endif
161  #else
162  printf(" POSIX.4 Message Queues are not supported.\n");
163  #endif
164  #ifdef _POSIX_SEMAPHORES
165  printf(" POSIX.4 Semaphores are supported.\n");
166  #ifdef _POSIX_SEM_NSEMS_MAX
167  printf(" _POSIX_SEM_NSEMS_MAX=%d Max # of open semaphores per process.\n",_POSIX_SEM_NSEMS_MAX);
168  #else
169  printf(" No _POSIX_SEM_NSEMS_MAX value exists.\n");
170  #endif
171  #ifdef _POSIX_SEM_VALUE_MAX
172  printf(" _POSIX_SEM_VALUE_MAX=%d Maximum semaphore value.\n",_POSIX_SEM_VALUE_MAX);
173  #else
174  printf(" No _POSIX_SEM_VALUE_MAX value exists.\n");
175  #endif
176  #else
177  printf(" POSIX.4 Semaphores are not supported.\n");
178  #endif
179  #ifdef _POSIX_SHARED_MEMORY_OBJECTS
180  printf(" POSIX.4 Shared memory objects are supported.\n");
181  #else
182  printf(" POSIX.4 Shared memory objects are not supported.\n");
183  #endif
184 
185  #ifdef _POSIX_THREADS
186  printf(" POSIX.1c pthreads are supported.\n");
187  #else
188  printf(" POSIX.1c pthreads are not supported.\n");
189  #endif
190  #ifdef _POSIX_THREAD_ATTR_STACKADDRTHREAD_ATTR_STACKADDR
191  printf(" POSIX.4 Thread stack address attribute option is supported.\n");
192  #else
193  printf(" POSIX.4 Thread stack address attribute option is not supported.\n");
194  #endif
195  #ifdef _POSIX_THREAD_ATTR_STACKSIZE
196  printf(" POSIX.4 Thread stack size attribute option is supported.\n");
197  #else
198  printf(" POSIX.4 Thread stack size attribute option is not supported.\n");
199  #endif
200  #ifdef _POSIX_THREAD_SAFE_FUNCTIONS
201  printf(" POSIX.4 Thread-safe functions are supported.\n");
202  #else
203  printf(" POSIX.4 Thread-safe functions are not supported.\n");
204  #endif
205  #ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
206  printf(" POSIX.1c thread execution scheduling is supported.\n");
207  #else
208  printf(" POSIX.1c thread execution scheduling is not supported.\n");
209  #endif
210  #ifdef _POSIX_THREAD_PRIO_INHERIT
211  printf(" POSIX.4 Thread priority inheritance option is supported.\n");
212  #else
213  printf(" POSIX.4 Thread priority inheritance option is not supported.\n");
214  #endif
215  #ifdef _POSIX_THREAD_PROCESS_SHARED
216  printf(" POSIX.4 Process-shared synchronization is supported.\n");
217  #else
218  printf(" POSIX.4 Process-shared synchronization is not supported.\n");
219  #endif
220  #ifdef _POSIX_POSIX_PII
221  printf(" Protocol-independent interfaces are supported.\n");
222  #else
223  printf(" Protocol-independent interfaces are not supported.\n");
224  #endif
225  #ifdef _POSIX_PII_XTI
226  printf(" XTI protocol-indep. interfaces are supported.\n");
227  #else
228  printf(" XTI protocol-indep. interfaces are not supported.\n");
229  #endif
230  #ifdef _POSIX_PII_SOCKET
231  printf(" Socket protocol-indep. interfaces are supported.\n");
232  #else
233  printf(" Socket protocol-indep. interfaces are not supported.\n");
234  #endif
235  #ifdef _POSIX_PII_INTERNET
236  printf(" Internet family of protocols is supported.\n");
237  #else
238  printf(" Internet family of protocols is not supported.\n");
239  #endif
240  #ifdef _POSIX_PII_INTERNET_STREAM
241  printf(" Connection-mode Internet protocol is supported.\n");
242  #else
243  printf(" Connection-mode Internet protocol is not supported.\n");
244  #endif
245  #ifdef _POSIX_PII_INTERNET_DGRAM
246  printf(" Connectionless Internet protocol is supported.\n");
247  #else
248  printf(" Connectionless Internet protocol is not supported.\n");
249  #endif
250  #ifdef _POSIX_PII_OSI
251  printf(" ISO/OSI family of protocols is supported.\n");
252  #else
253  printf(" ISO/OSI family of protocols is not supported.\n");
254  #endif
255  #ifdef _POSIX_PII_OSI_COTS
256  printf(" Connection-mode ISO/OSI service is supported.\n");
257  #else
258  printf(" Connection-mode ISO/OSI service is not supported.\n");
259  #endif
260  #ifdef _POSIX_PII_OSI_CLTS
261  printf(" Connectionless ISO/OSI service is supported.\n");
262  #else
263  printf(" Connectionless ISO/OSI service is not supported.\n");
264  #endif
265  #ifdef _POSIX_POLL
266  printf(" Implementation supports `poll' function.\n");
267  #else
268  printf(" poll function is not supported.\n");
269  #endif
270  #ifdef _POSIX_SELECT
271  printf(" Implementation supports `select' and `pselect'.\n");
272  #else
273  printf(" Implementation does not support `select' and `pselect'.\n");
274  #endif
275  #ifdef _XOPEN_REALTIME
276  printf(" X/Open realtime support is available.\n");
277  #else
278  printf(" X/Open realtime support is not available..\n");
279  #endif
280  #ifdef _XOPEN_REALTIME_THREADS
281  printf(" X/Open realtime thread support is available.\n");
282  #else
283  printf(" X/Open realtime thread support is not available.\n");
284  #endif
285  #ifdef _XOPEN_SHM
286  printf(" XPG4.2 Shared memory interface is supported.\n");
287  #else
288  printf(" XPG4.2 Shared memory interface is not supported.\n");
289  #endif
290  #ifdef _XBS5_ILP32_OFF32
291  printf(" 32-bit int, long, pointer, and off_t types are supported.\n");
292  #else
293  printf(" 32-bit int, long, pointer, and off_t types are not supported.\n");
294  #endif
295  #ifdef _XBS5_ILP32_OFFBIG
296  printf(" 32-bit int, long, and pointer and off_t with at least 64 bits is supported.\n");
297  #else
298  printf(" 32-bit int, long, and pointer and off_t with at least 64 bits is not supported.\n");
299  #endif
300  #ifdef _XBS5_LP64_OFF64
301  printf(" 32-bit int, and 64-bit long, pointer, and off_t types are supported.\n");
302  #else
303  printf(" 32-bit int, and 64-bit long, pointer, and off_t types are not supported.\n");
304  #endif
305  #ifdef _XBS5_LPBIG_OFFBIG
306  printf(" 32 bits int and long, pointer, and off_t with at least 64 bits are supported.\n");
307  #else
308  printf(" 32 bits int and long, pointer, and off_t with at least 64 bits are not supported.\n");
309  #endif
310 
311 
312  #endif
313  //Do POSIX.1 tests
314  printf ("POSIX.1 Options Test Results:\n");
315  #ifdef _POSIX_JOB_CONTROL
316  printf(" POSIX.1 Job control is supported.\n");
317  #else
318  printf(" POSIX.1 Job control is not supported.\n");
319  #endif
320  #ifdef _POSIX_CHOWN_RESTRICTED
321  printf(" POSIX.1 Chown restrictions are supported.\n");
322  #else
323  printf(" POSIX.1 Chown restrictions are not supported.\n");
324  #endif
325  #ifdef _POSIX_SAVED_IDS
326  printf(" POSIX.1 Process saved IDs are supported.\n");
327  #else
328  printf(" POSIX.1 Process saved IDs are not supported.\n");
329  #endif
330  #ifdef _POSIX_NO_TRUNC
331  printf(" POSIX.1 Long pathname errors are supported.\n");
332  #else
333  printf(" POSIX.1 Long pathname errors are not supported.\n");
334  #endif
335  #ifdef _POSIX_VDISABLE
336  printf(" POSIX.1 Some terminal charactistics disabling is supported.\n");
337  #else
338  printf(" POSIX.1 Some terminal charactistics disabling is not supported.\n");
339  #endif
340  #ifdef NGROUPS_MAX
341  printf(" POSIX.1 Supplementary group IDs is supported.\n");
342  #else
343  printf(" POSIX.1 Supplementary group IDs is not supported.\n");
344  #endif
345 
346  //System Run time testing
347  printf("\nSystem run time tests:\n");
348  errno=0;
349  val=sysconf(_SC_JOB_CONTROL);
350  if ((val == -1) && (errno))
351  {
352  printf("Bad option _SC_JOB_CONTROL\n");
353  }
354  else if ((val == -1) && (!errno))
355  {
356  printf("POSIX.1 JOB CONTROL not Supported.\n");
357  }
358  else
359  {
360  printf("POSIX.1 JOB CONTROL Supported.\n");
361  }
362  errno=0;
363  val=sysconf(_SC_SAVED_IDS);
364  if ((val == -1) && (errno))
365  {
366  printf("Bad option _SC_SAVED_IDS\n");
367  }
368  else if ((val == -1) && (!errno))
369  {
370  printf("POSIX.1 SAVED IDS not Supported.\n");
371  }
372  else
373  {
374  printf("POSIX.1 SAVED IDS Supported.\n");
375  }
376  errno=0;
377  val=sysconf(_SC_VERSION);
378  if ((val == -1) && (errno))
379  {
380  printf("Bad option _SC_VERSION\n");
381  }
382  else if ((val == -1) && (!errno))
383  {
384  printf("POSIX.1 VERSION not Supported.\n");
385  }
386  else
387  {
388  printf("POSIX.1 VERSION Supported.\n");
389  }
390  val=sysconf(_SC_ARG_MAX);
391  if (val == -1)
392  {
393  printf("Bad option _SC_ARG_MAX\n");
394  }
395  else
396  {
397  printf("POSIX.1 ARG MAX Value=%ld.\n",val);
398  }
399  val=sysconf(_SC_CHILD_MAX);
400  if (val == -1)
401  {
402  printf("Bad option _SC_CHILD_MAX\n");
403  }
404  else
405  {
406  printf("POSIX.1 CHILD MAX Value=%ld.\n",val);
407  }
408  val=sysconf(_SC_CLK_TCK);
409  if (val == -1)
410  {
411  printf("Bad option _SC_CLK_TCK\n");
412  }
413  else
414  {
415  printf("POSIX.1 CLK TCK Value=%ld.\n",val);
416  }
417  val=sysconf(_SC_NGROUPS_MAX);
418  if (val == -1)
419  {
420  printf("Bad option _SC_NGROUPS_MAX\n");
421  }
422  else
423  {
424  printf("POSIX.1 NGROUPS MAX Value=%ld.\n",val);
425  }
426  val=sysconf(_SC_OPEN_MAX);
427  if (val == -1)
428  {
429  printf("Bad option _SC_OPEN_MAX\n");
430  }
431  else
432  {
433  printf("POSIX.1 OPEN MAX Value=%ld.\n",val);
434  }
435  val=sysconf(_SC_STREAM_MAX);
436  if (val == -1)
437  {
438  printf("Bad option _SC_STREAM_MAX\n");
439  }
440  else
441  {
442  printf("POSIX.1 STREAM MAX Value=%ld.\n",val);
443  }
444  val=sysconf(_SC_TZNAME_MAX);
445  if (val == -1)
446  {
447  printf("Bad option _SC_TZNAME_MAX\n");
448  }
449  else
450  {
451  printf("POSIX.1 TZNAME MAX Value=%ld.\n",val);
452  }
453  errno=0;
454  val=sysconf(_SC_ASYNCHRONOUS_IO);
455  if ((val == -1) && (errno))
456  {
457  printf("Bad option _SC_ASYNCHRONOUS_IO\n");
458  }
459  else if ((val == -1) && (!errno))
460  {
461  printf("POSIX.4 ASYNCHRONOUS IO not Supported.\n");
462  }
463  else
464  {
465  printf("POSIX.4 ASYNCHRONOUS IO Supported.\n");
466  }
467  errno=0;
468  val=sysconf(_SC_MAPPED_FILES);
469  if ((val == -1) && (errno))
470  {
471  printf("Bad option _SC_MAPPED_FILES\n");
472  }
473  else if ((val == -1) && (!errno))
474  {
475  printf("POSIX.4 MAPPED FILES not Supported.\n");
476  }
477  else
478  {
479  printf("POSIX.4 MAPPED FILES Supported.\n");
480  }
481  errno=0;
482  val=sysconf(_SC_MEMLOCK_RANGE);
483  if ((val == -1) && (errno))
484  {
485  printf("Bad option _SC_MEMLOCK_RANGE\n");
486  }
487  else if ((val == -1) && (!errno))
488  {
489  printf("POSIX.4 MEMLOCK RANGE not Supported.\n");
490  }
491  else
492  {
493  printf("POSIX.4 MEMLOCK RANGE Supported.\n");
494  }
495  errno=0;
496  val=sysconf(_SC_MEMORY_PROTECTION);
497  if ((val == -1) && (errno))
498  {
499  printf("Bad option _SC_MEMORY_PROTECTION\n");
500  }
501  else if ((val == -1) && (!errno))
502  {
503  printf("POSIX.4 MEMORY PROTECTION not Supported.\n");
504  }
505  else
506  {
507  printf("POSIX.4 MEMORY PROTECTION Supported.\n");
508  }
509  errno=0;
510  val=sysconf(_SC_MESSAGE_PASSING);
511  if ((val == -1) && (errno))
512  {
513  printf("Bad option _SC_MESSAGE_PASSING\n");
514  }
515  else if ((val == -1) && (!errno))
516  {
517  printf("POSIX.4 MESSAGE PASSING not Supported.\n");
518  }
519  else
520  {
521  printf("POSIX.4 MESSAGE PASSING Supported.\n");
522  }
523  errno=0;
524  val=sysconf(_SC_PRIORITIZED_IO);
525  if ((val == -1) && (errno))
526  {
527  printf("Bad option _SC_PRIORITIZED_IO\n");
528  }
529  else if ((val == -1) && (!errno))
530  {
531  printf("POSIX.4 PRIORITIZED IO not Supported.\n");
532  }
533  else
534  {
535  printf("POSIX.4 PRIORITIZED IO Supported.\n");
536  }
537  errno=0;
538  val=sysconf(_SC_PRIORITY_SCHEDULING);
539  if ((val == -1) && (errno))
540  {
541  printf("Bad option _SC_PRIORITY_SCHEDULING\n");
542  }
543  else if ((val == -1) && (!errno))
544  {
545  printf("POSIX.4 PRIORITY SCHEDULING not Supported.\n");
546  }
547  else
548  {
549  printf("POSIX.4 PRIORITY SCHEDULING Supported.\n");
550  }
551  errno=0;
552  val=sysconf(_SC_REALTIME_SIGNALS);
553  if ((val == -1) && (errno))
554  {
555  printf("Bad option _SC_REALTIME_SIGNALS\n");
556  }
557  else if ((val == -1) && (!errno))
558  {
559  printf("POSIX.4 REALTIME SIGNALS not Supported.\n");
560  }
561  else
562  {
563  printf("POSIX.4 REALTIME SIGNALS Supported.\n");
564  }
565  errno=0;
566  val=sysconf(_SC_SEMAPHORES);
567  if ((val == -1) && (errno))
568  {
569  printf("Bad option _SC_SEMAPHORES\n");
570  }
571  else if ((val == -1) && (!errno))
572  {
573  printf("POSIX.4 SEMAPHORES not Supported.\n");
574  }
575  else
576  {
577  printf("POSIX.4 SEMAPHORES Supported.\n");
578  }
579  errno=0;
580  val=sysconf(_SC_FSYNC);
581  if ((val == -1) && (errno))
582  {
583  printf("Bad option _SC_FSYNC\n");
584  }
585  else if ((val == -1) && (!errno))
586  {
587  printf("POSIX.4 FSYNC not Supported.\n");
588  }
589  else
590  {
591  printf("POSIX.4 FSYNC Supported.\n");
592  }
593  errno=0;
594  val=sysconf(_SC_SHARED_MEMORY_OBJECTS);
595  if ((val == -1) && (errno))
596  {
597  printf("Bad option _SC_SHARED_MEMORY_OBJECTS\n");
598  }
599  else if ((val == -1) && (!errno))
600  {
601  printf("POSIX.4 SHARED_MEMORY_OBJECTS not Supported.\n");
602  }
603  else
604  {
605  printf("POSIX.4 SHARED_MEMORY_OBJECTS Supported.\n");
606  }
607  errno=0;
608  val=sysconf(_SC_SYNCHRONIZED_IO);
609  if ((val == -1) && (errno))
610  {
611  printf("Bad option _SC_SYNCHRONIZED_IO\n");
612  }
613  else if ((val == -1) && (!errno))
614  {
615  printf("POSIX.4 SYNCHRONIZED IO not Supported.\n");
616  }
617  else
618  {
619  printf("POSIX.4 SYNCHRONIZED IO Supported.\n");
620  }
621  errno=0;
622  val=sysconf(_SC_TIMERS);
623  if ((val == -1) && (errno))
624  {
625  printf("Bad option _SC_TIMERS\n");
626  }
627  else if ((val == -1) && (!errno))
628  {
629  printf("POSIX.4 TIMERS not Supported.\n");
630  }
631  else
632  {
633  printf("POSIX.4 TIMERS Supported.\n");
634  }
635  val=sysconf(_SC_AIO_LISTIO_MAX);
636  if (val == -1)
637  {
638  printf("Bad option _SC_AIO_LISTIO_MAX\n");
639  }
640  else
641  {
642  printf("POSIX.4 AIO LISTIO MAX Value=%ld.\n",val);
643  }
644  val=sysconf(_SC_AIO_MAX);
645  if (val == -1)
646  {
647  printf("Bad option _SC_AIO_MAX\n");
648  }
649  else
650  {
651  printf("POSIX.4 AIO MAX Value=%ld.\n",val);
652  }
653  val=sysconf(_SC_AIO_PRIO_DELTA_MAX);
654  if (val == -1)
655  {
656  printf("Bad option _SC_AIO_PRIO_DELTA_MAX\n");
657  }
658  else
659  {
660  printf("POSIX.4 AIO PRIO DELTA MAX Value=%ld.\n",val);
661  }
662  val=sysconf(_SC_DELAYTIMER_MAX);
663  if (val == -1)
664  {
665  printf("Bad option _SC_DELAYTIMER_MAX\n");
666  }
667  else
668  {
669  printf("POSIX.4 DELAYTIMER MAX Value=%ld.\n",val);
670  }
671  val=sysconf(_SC_MQ_OPEN_MAX);
672  if (val == -1)
673  {
674  printf("Bad option _SC_MQ_OPEN_MAX\n");
675  }
676  else
677  {
678  printf("POSIX.4 MQ OPEN MAX Value=%ld.\n",val);
679  }
680  val=sysconf(_SC_MQ_PRIO_MAX);
681  if (val == -1)
682  {
683  printf("Bad option _SC_MQ_PRIO_MAX\n");
684  }
685  else
686  {
687  printf("POSIX.4 MQ PRIO MAX Value=%ld.\n",val);
688  }
689  val=sysconf(_SC_PAGESIZE);
690  if (val == -1)
691  {
692  printf("Bad option _SC_PAGESIZE\n");
693  }
694  else
695  {
696  printf("POSIX.4 PAGESIZE Value=%ld.\n",val);
697  }
698  val=sysconf(_SC_RTSIG_MAX);
699  if (val == -1)
700  {
701  printf("Bad option _SC_RTSIG_MAX\n");
702  }
703  else
704  {
705  printf("POSIX.4 RTSIG MAX Value=%ld.\n",val);
706  }
707  val=sysconf(_SC_SEM_NSEMS_MAX);
708  if (val == -1)
709  {
710  printf("Bad option _SC_SEM_NSEMS_MAX\n");
711  }
712  else
713  {
714  printf("POSIX.4 SEM NSEMS MAX Value=%ld.\n",val);
715  }
716  val=sysconf(_SC_SEM_VALUE_MAX);
717  if (val == -1)
718  {
719  printf("Bad option _SC_SEM_VALUE_MAX\n");
720  }
721  else
722  {
723  printf("POSIX.4 SEM VALUE MAX Value=%ld.\n",val);
724  }
725  val=sysconf(_SC_SIGQUEUE_MAX);
726  if (val == -1)
727  {
728  printf("Bad option _SC_SIGQUEUE_MAX\n");
729  }
730  else
731  {
732  printf("POSIX.4 SIGQUEUE MAX Value=%ld.\n",val);
733  }
734  val=sysconf(_SC_TIMER_MAX);
735  if (val == -1)
736  {
737  printf("Bad option _SC_TIMER_MAX\n");
738  }
739  else
740  {
741  printf("POSIX.4 TIMER MAX Value=%ld.\n",val);
742  }
743 
744 #endif
745 
746  return 0;
747 }
main
int main()
Definition: detect_posix.cpp:31


ecl_config
Author(s): Daniel Stonier
autogenerated on Wed Mar 2 2022 00:13:53