diff options
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/Kbuild.src | 1 | ||||
-rw-r--r-- | libbb/sysconf.c | 16 |
2 files changed, 17 insertions, 0 deletions
diff --git a/libbb/Kbuild.src b/libbb/Kbuild.src index 6578d1171..62680bd52 100644 --- a/libbb/Kbuild.src +++ b/libbb/Kbuild.src | |||
@@ -92,6 +92,7 @@ lib-y += skip_whitespace.o | |||
92 | lib-y += speed_table.o | 92 | lib-y += speed_table.o |
93 | lib-y += str_tolower.o | 93 | lib-y += str_tolower.o |
94 | lib-y += strrstr.o | 94 | lib-y += strrstr.o |
95 | lib-y += sysconf.o | ||
95 | lib-y += time.o | 96 | lib-y += time.o |
96 | lib-y += trim.o | 97 | lib-y += trim.o |
97 | lib-y += u_signal_names.o | 98 | lib-y += u_signal_names.o |
diff --git a/libbb/sysconf.c b/libbb/sysconf.c new file mode 100644 index 000000000..c5fa5e001 --- /dev/null +++ b/libbb/sysconf.c | |||
@@ -0,0 +1,16 @@ | |||
1 | /* vi: set sw=4 ts=4: */ | ||
2 | /* | ||
3 | * Various system configuration helpers. | ||
4 | * | ||
5 | * Copyright (C) 2014 Bartosz Golaszewski <bartekgola@gmail.com> | ||
6 | * | ||
7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | ||
8 | */ | ||
9 | #include "libbb.h" | ||
10 | |||
11 | #if defined _SC_ARG_MAX | ||
12 | unsigned FAST_FUNC bb_arg_max(void) | ||
13 | { | ||
14 | return sysconf(_SC_ARG_MAX); | ||
15 | } | ||
16 | #endif | ||