_SC_PAGESIZE sysconf() support
This commit is contained in:
parent
e28fe339bf
commit
0bcb14b384
|
@ -63,6 +63,8 @@
|
||||||
#define _SC_VERSION 8
|
#define _SC_VERSION 8
|
||||||
#define _SC_STREAM_MAX 9
|
#define _SC_STREAM_MAX 9
|
||||||
#define _SC_TZNAME_MAX 10
|
#define _SC_TZNAME_MAX 10
|
||||||
|
#define _SC_PAGESIZE 11
|
||||||
|
#define _SC_PAGE_SIZE _SC_PAGESIZE
|
||||||
|
|
||||||
/* The following relate to configurable pathname variables. POSIX Table 5-2. */
|
/* The following relate to configurable pathname variables. POSIX Table 5-2. */
|
||||||
#define _PC_LINK_MAX 1 /* link count */
|
#define _PC_LINK_MAX 1 /* link count */
|
||||||
|
|
|
@ -45,6 +45,9 @@ int name; /* property being inspected */
|
||||||
case _SC_TZNAME_MAX:
|
case _SC_TZNAME_MAX:
|
||||||
return (long) TZNAME_MAX;
|
return (long) TZNAME_MAX;
|
||||||
|
|
||||||
|
case _SC_PAGESIZE:
|
||||||
|
return getpagesize();
|
||||||
|
|
||||||
default:
|
default:
|
||||||
errno = EINVAL;
|
errno = EINVAL;
|
||||||
return -1L;
|
return -1L;
|
||||||
|
|
Loading…
Reference in a new issue