Last change
on this file since 3772 was 3621, checked in by Bruno Cornec, 8 years ago |
New 3?3 banch for incorporation of latest busybox 1.25. Changing minor version to handle potential incompatibilities.
|
-
Property svn:eol-style
set to
native
|
File size:
648 bytes
|
Rev | Line | |
---|
[3621] | 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(bb_arg_max)
|
---|
| 12 | unsigned FAST_FUNC bb_arg_max(void)
|
---|
| 13 | {
|
---|
| 14 | long r = sysconf(_SC_ARG_MAX);
|
---|
| 15 |
|
---|
| 16 | /* I've seen a version of uclibc which returned -1.
|
---|
| 17 | * Guard about it, and also avoid insanely large values
|
---|
| 18 | */
|
---|
| 19 | if ((unsigned long)r > 64*1024*1024)
|
---|
| 20 | r = 64*1024*1024;
|
---|
| 21 |
|
---|
| 22 | return r;
|
---|
| 23 | }
|
---|
| 24 | #endif
|
---|
| 25 |
|
---|
| 26 | /* Return the number of clock ticks per second. */
|
---|
| 27 | unsigned FAST_FUNC bb_clk_tck(void)
|
---|
| 28 | {
|
---|
| 29 | return sysconf(_SC_CLK_TCK);
|
---|
| 30 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.