Denys Vlasenko | f92f1d0 | 2014-06-22 13:54:40 +0200 | [diff] [blame] | 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 | |
Denys Vlasenko | 04c1417 | 2014-11-26 15:17:59 +0100 | [diff] [blame] | 11 | #if !defined(bb_arg_max) |
Denys Vlasenko | f92f1d0 | 2014-06-22 13:54:40 +0200 | [diff] [blame] | 12 | unsigned FAST_FUNC bb_arg_max(void) |
| 13 | { |
| 14 | return sysconf(_SC_ARG_MAX); |
| 15 | } |
| 16 | #endif |
Bartosz Golaszewski | 5d2e409 | 2014-06-22 14:01:13 +0200 | [diff] [blame] | 17 | |
| 18 | /* Return the number of clock ticks per second. */ |
| 19 | unsigned FAST_FUNC bb_clk_tck(void) |
| 20 | { |
| 21 | return sysconf(_SC_CLK_TCK); |
| 22 | } |