summaryrefslogtreecommitdiff
path: root/libc/unistd/sysconf.c
AgeCommit message (Collapse)Author
2016-11-27remove UCLIBC_HAS_LFSWaldemar Brodkorb
2016-06-15sysconf: Support _SC_(AV)?PHYS_PAGES.Nicolas Cavallari
Do it by following the trail of the existing commented code, which implemented it by calling get_phys_pages() and get_avphys_pages(). This patch implements these two functions, which are also glibc extensions. Some program/libraries (e.g. libuv) assumes that sysconf(_SC_PHYS_PAGES) works on linux and never check for -1, thus they report an insane amount of memory. Signed-off-by: Nicolas Cavallari <nicolas.cavallari@green-communications.fr>
2012-11-18Replace FSF snail mail address with URLsMike Frysinger
This matches a similar change made to glibc. No functional changes here. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-06-15sysconf.c: the clock_getres function is good for NPTL as wellPeter S. Mazinger
Even if glibc reuses the syscall (bloat), we can reuse the function. Make sure, that we use it only if it is provided by the syscall and the function is really around (UCLIBC_HAS_REALTIME disables it), else we get into a loop. Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15wordexp.c, sysconf.c: include ctype.h for isspacePeter S. Mazinger
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-04-18sysconf: use getrlimit to determine ARG_MAXBernhard Reutner-Fischer
getrlimit previously was only called for NPTL (why?), fix that to be used everywhere. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-04-29sysconf: clock_getres depends on HAS_REALTIMEBernhard Reutner-Fischer
Bug was introduced in revision a202cf6f. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-08-05sysconf: implement _SC_NPROCESSORS_CONF, _SC_NPROCESSORS_ONLNBernhard Reutner-Fischer
perusing the config parser Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-07-09include/param.h: Dont use ARG_MAX from kernel headersKhem Raj
* Use getrlimit for ARG_MAX in sysconf on nptl. * Define NCARGS directly instead of ARG_MAX Signed-off-by: Khem Raj <raj.khem@gmail.com>
2010-02-17Assorted fixed to get nptl compiling on ARMKhem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2009-11-28Merge remote branch 'origin/master' into nptlAustin Foxley
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2009-11-26sync confname, environments with glibcBernhard Reutner-Fischer
Plus related synch. Add a testcase for the sysconf variables based on the one from glibc Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-10-17librt additions that are now possible with nptlAustin Foxley
* clock_getcpuclockid, clock_gettime, clock_nanosleep, mq_receive, mq_send, mq_timedreceive, mq_timedsend, _SC_MONOTONIC_CLOCK Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2009-09-18trim Experimentally off and uncommented hiddenBernhard Reutner-Fischer
sed -i -e '/Experimentally off - /d' $(grep -rl "Experimentally off - " *) sed -i -e '/^\/\*[[:space:]]*libc_hidden_proto(/d' $(grep -rl "libc_hidden_proto" *) should be a nop Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-08-05handle _SC_NPROCESSORS_CONF and _SC_NPROCESSORS_ONLNBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2008-11-20Last portion of libc_hidden_proto removal.Denis Vlasenko
Appears to build fine (several .configs tried)
2008-06-16- fix build errorBernhard Reutner-Fischer
brk.c:(.text.__GI_sysconf+0xd4): undefined reference to `clock_getres'
2008-06-12Include sys/syscall.h since we are checking for __NR_clock_getres.Peter Kjellerstedt
2007-04-13Patch by Ricard Wanderlof <ricardw at axis dot com>:Peter Kjellerstedt
* Add configurable buffer sizes for getpwnam() and getgrnam(). The default buffer size is, as before, 256 (glibc seems to use 1024 by default).
2007-01-22Recognize _SC_MONOTONIC_CLOCK in sysconf() even if __NR_clock_getresPeter Kjellerstedt
is not defined.
2007-01-21- repair misplaced #endif that got introduced in r17410. Fixes compilation.Bernhard Reutner-Fischer
2007-01-20The case for _SC_MONOTONIC_CLOCK should only exist if 'clock_getres' does."Steven J. Hill"
2006-09-22Added support for sysconf(_SC_MONOTONIC_CLOCK).Peter Kjellerstedt
2006-01-14make DODEBUG=y happy, update sysdeps/common/* copyrightPeter S. Mazinger
2006-01-14hidden_def/hidden_proto: convert all users (I hope) termios split, add some ↵Peter S. Mazinger
missing headers, other jump relocs removed
2005-12-03More hiding, including __mempcpyPeter S. Mazinger
2005-11-29Hiding againPeter S. Mazinger
2005-11-26100 JUMP relocs less (remaining 431) by hiding internally used onesPeter S. Mazinger
2005-09-21include headers only if the related option is enabledPeter S. Mazinger
2004-07-15Cleanup a few of the more egregiously broken sysconf values toEric Andersen
actually match reality. In particular, _SC_GETPW_R_SIZE_MAX and _SC_GETGR_R_SIZE_MAX were causing us problems with programs such as libglib, since they were always returning -1, which is a bit smaller than the actual passwd and group max buffer sizes. -Erik
2003-11-05Rip the guts out of the dynamically generated sysconf.c, and live with a simpleEric Andersen
static version. This will need further work later on, but should do the job for the time being,
2002-12-04For now, always claim we have exactly one cpu. It shouldEric Andersen
generally be the truth...
2002-07-15Clean up CLK_TCK situation. clock() and sysconf() now use anManuel Novoa III
arch-specific constant value defined in bits/uClibc_clk_tck.h. Default is 100 (common/bits) but alpha uses 1024 following glibc. Override per arch as necessary.
2001-11-20Oops. Lets try that again.Eric Andersen
2001-11-20Can't use CLK_TCK in here since /usr/include/bits/time.h nowEric Andersen
defines that as __sysconf(_SC_CLK_TCK) causing infinite recursion. -Erik
2001-10-14Erwin Authried <eauth@softsys.co.at> noticed that _XOPEN_SOURCE isEric Andersen
supposed to be a number
2001-09-27Update to accomodate the header file changesEric Andersen
2001-04-06Fix include/errno.h to not use kernel header, and instead use bits/errno.h.Eric Andersen
This required we use _LIBC instead of __LIBC__ to be consistent with glibc. This had some sideffects in sys/syscalls.h. While fixing things, I made everything use __set_errno() for (eventual) thread support. -Erik
2001-02-09Implement getdtablesize(), which is used by the rpc crap.Eric Andersen
-Erik
2001-01-27Enable auto-generation of a size-optimized sysconf function (saves .5k on i386).Manuel Novoa III
2001-01-25Clean up atexit.c; make sure sysconf and atexit agree; link in ref'd libgcc.aManuel Novoa III
objects with shared uClibc; allow disabling long long support.
2001-01-17Added missing _SC_2_FORT_RUN case. Fixed _SC_ATEXIT_MAX to match atexit.c.Manuel Novoa III
2000-11-16Bad Erik. Repeat after me: "I will always compile before I commit".Eric Andersen
-Erik
2000-11-16Doh!!! I am an idiot. I had broken malloc by disabling getpagesize(), and IEric Andersen
didn't even do it for a good reason. Fixed, so malloc should work again... -Erik
2000-11-04More cleanups. Fix things so tinylogin compiles.Eric Andersen
Fix a bug in getdelim -- patch from David Whedon <dwhedon@gordian.com>.