aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/getconf
diff options
context:
space:
mode:
authorGarrett Wollman <wollman@FreeBSD.org>2002-10-27 04:10:34 +0000
committerGarrett Wollman <wollman@FreeBSD.org>2002-10-27 04:10:34 +0000
commit11e3dcb669476407277199c394a4c7d15c826165 (patch)
treeecf2a4791500bde9262ec73d613db6c74b5e63d8 /usr.bin/getconf
parente0208e53202d374be7b97b0372dd214faa4a7c5c (diff)
Notes
Diffstat (limited to 'usr.bin/getconf')
-rw-r--r--usr.bin/getconf/getconf.c2
-rw-r--r--usr.bin/getconf/getconf.h8
-rw-r--r--usr.bin/getconf/pathconf.gperf6
-rw-r--r--usr.bin/getconf/sysconf.gperf2
4 files changed, 16 insertions, 2 deletions
diff --git a/usr.bin/getconf/getconf.c b/usr.bin/getconf/getconf.c
index 1e991b6ab372..8bfeb93c4713 100644
--- a/usr.bin/getconf/getconf.c
+++ b/usr.bin/getconf/getconf.c
@@ -98,7 +98,7 @@ main(int argc, char **argv)
if (argv[optind + 1] == NULL) { /* confstr or sysconf */
if ((valid = find_limit(name, &limitval)) != 0) {
if (valid > 0)
- printf("%jd\n", limitval);
+ printf("%" PRIdMAX "\n", limitval);
else
printf("undefined\n");
diff --git a/usr.bin/getconf/getconf.h b/usr.bin/getconf/getconf.h
index 60d10d24f678..aab06a6eb6ee 100644
--- a/usr.bin/getconf/getconf.h
+++ b/usr.bin/getconf/getconf.h
@@ -29,7 +29,13 @@
* $FreeBSD$
*/
-#include <stdint.h>
+#ifdef STABLE
+typedef long long intmax_t;
+#define strtoimax(p, ep, radix) (strtoll((p), (ep), (radix)))
+#define PRIdMAX "lld"
+#else
+#include <inttypes.h>
+#endif
int find_confstr(const char *name, int *key);
int find_limit(const char *name, intmax_t *value);
diff --git a/usr.bin/getconf/pathconf.gperf b/usr.bin/getconf/pathconf.gperf
index b44e824349fc..60c05d45580d 100644
--- a/usr.bin/getconf/pathconf.gperf
+++ b/usr.bin/getconf/pathconf.gperf
@@ -33,6 +33,12 @@ POSIX_REC_INCR_XFER_SIZE, _PC_REC_INCR_XFER_SIZE
POSIX_REC_MAX_XFER_SIZE, _PC_REC_MAX_XFER_SIZE
POSIX_REC_MIN_XFER_SIZE, _PC_REC_MIN_XFER_SIZE
POSIX_REC_XFER_ALIGN, _PC_REC_XFER_ALIGN
+SYMLINK_MAX, _PC_SYMLINK_MAX
+TRUSTEDBSD_ACL_EXTENDED, _PC_ACL_EXTENDED
+TRUSTEDBSD_ACL_PATH_MAX, _PC_ACL_PATH_MAX
+TRUSTEDBSD_CAP_PRESENT, _PC_CAP_PRESENT
+TRUSTEDBSD_INF_PRESENT, _PC_INF_PRESENT
+TRUSTEDBSD_MAC_PRESENT, _PC_MAC_PRESENT
_POSIX_CHOWN_RESTRICTED, _PC_CHOWN_RESTRICTED
_POSIX_NO_TRUNC, _PC_NO_TRUNC
_POSIX_VDISABLE, _PC_VDISABLE
diff --git a/usr.bin/getconf/sysconf.gperf b/usr.bin/getconf/sysconf.gperf
index 5467d1135a4e..1c9d2bc28045 100644
--- a/usr.bin/getconf/sysconf.gperf
+++ b/usr.bin/getconf/sysconf.gperf
@@ -60,6 +60,7 @@ SEM_NSEMS_MAX, _SC_SEM_NSEMS_MAX
SEM_VALUE_MAX, _SC_SEM_VALUE_MAX
SIGQUEUE_MAX, _SC_SIGQUEUE_MAX
STREAM_MAX, _SC_STREAM_MAX
+SYMLOOP_MAX, _SC_SYMLOOP_MAX
TIMER_MAX, _SC_TIMER_MAX
TTY_NAME_MAX, _SC_TTY_NAME_MAX
TZNAME_MAX, _SC_TZNAME_MAX
@@ -79,6 +80,7 @@ _POSIX_CLOCK_SELECTION, _SC_CLOCK_SELECTION
_POSIX_CPUTIME, _SC_CPUTIME
_POSIX_FILE_LOCKING, _SC_FILE_LOCKING
_POSIX_FSYNC, _SC_FSYNC
+_POSIX_IPV6, _SC_IPV6
_POSIX_JOB_CONTROL, _SC_JOB_CONTROL
_POSIX_MAPPED_FILES, _SC_MAPPED_FILES
_POSIX_MEMLOCK, _SC_MEMLOCK