summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2011-07-08Add support for tgmath--the type-generic math; now that both mathMartynas Venckus
and complex math routines are complete. OK kettenis@.
2011-07-08Finalize work on complex math routines, now that we have theMartynas Venckus
extended-precision support. Mostly from Cephes.
2011-07-07fix typos; while here, improve spacing in comments.Igor Sobrado
changes to libevent and zlib headers sent to the upstream maintainers. ok jmc@ (for typos), millert@
2011-07-06sigset_t is unsigned, so eliminate a warning by shifting a 1U insteadPhilip Guenthe
of a 1 when creating signal masks. ok millert@
2011-07-06Finalize work on the math library. It's time to do this monsterMartynas Venckus
commit, and deal with problems (if any) in tree. Note that this adds the following functions. Ports with hacks might need adjustments. nexttoward(3), fma(3), nexttowardf(3), fmaf(3), acoshl(3), asinhl(3), atanhl(3), coshl(3), sinhl(3), tanhl(3), expl(3), expm1l(3), logl(3), log10l(3), log1pl(3), log2l(3), modfl(3), cbrtl(3), hypotl(3), powl(3), erfl(3), erfcl(3), lgammal(3), tgammal(3), ceill(3), floorl(3), lrintl(3), llrintl(3), roundl(3), lroundl(3), llroundl(3), truncl(3), fmodl(3), remainderl(3), remquol(3), nextafterl(3), nexttowardl(3), fmal(3). With this commit, our library implements all functionality required by C99. Documentation bits will follow.
2011-07-04Add wcsdup(), from NetBSD.Nicholas Marriott
ok deraadt matthew
2011-07-03As pointed out by Richard Guenther our definitionJonathan Gray
of NULL was incorrect for c++ compilers that aren't gcc (or pretend to be gcc like clang). ok miod@
2011-06-26half-guard the actual function prototypes.Marc Espie
precludes -Wredundant-declarations with multiple includes. okay millert@
2011-06-01Use __POSIX_VISIBLE not __POSIX_C_SOURCE to bracket the definitionsTodd C. Miller
of wcscasecmp() and wcsncasecmp(). Noticed by naddy@ OK espie@
2011-05-28wcs(n)casecmp support, manpage comments from jmc@, okay deraadt@Marc Espie
2011-05-25Also enclose variable names with external linkage in __BEGIN_DECLS.Martynas Venckus
Doesn't matter much since C++ ABI used by GCC doesn't mangle variable names; however technically is required by Section 7.5 of the C++ spec. Discussed with/OK guenther@, matthew@.
2011-04-28- enable fenvMartynas Venckus
- add nearbyint, nearbyintf and nearbyintl implemented using fenv
2011-04-28Bring back wprintf. We've sorted out what to do for gcc2 and gcc3.Stefan Sperling
"Yes, go ahead then" deraadt
2011-04-25Teach sysconf(_SC_GETGR_R_SIZE_MAX) the correct size of a buffer for theStuart Henderson
reentrant getgrent functions (getgrgid_r, getgrnam_r). seems reasonable to millert@, ok deraadt@
2011-04-24Back out wprintf until we've determined what to do for gcc2 and gcc3 arches.Stefan Sperling
2011-04-24Add fwprintf, swprintf, vfwprintf, vswprintf, vwprintf, and wprintf to libc.Stefan Sperling
Based on our vfprintf etc. implementations. Wide character parts based on NetBSD but with lots of macros expanded. Minor bump for libc. ok kettenis espie
2011-04-21fenv for amd64; from matthew@Martynas Venckus
feedback & ok guenther@, matthew@
2011-04-06Define NULL as a void * instead of a long integer, as required by Single Unix.Miod Vallat
Kernel and bootblocks still use the old 0L value until all the NULL abuses in the code are fixed.
2011-04-05Add AI_FQDN flag to getaddrinfo(3). Prompted by discussions with djm@Matthew Dempsky
about cert checking in OpenSSH. Man page wording tweaks thanks to jmc@. ok henning@, jmc@; positive feedback from djm@, ajacoutat@ Committing now to reuse guenther@'s libc minor bump instead of cranking it again, as suggested by deraadt@.
2011-03-12Replace the old, broken KERN_PROC ABI and its matching functionsPhilip Guenthe
in libkvm with the stable-ABI versions that are currently named KERN_PROC2, kvm_get{proc,argv,envv}2(). The latter names and symbols will continue to be supported for a few releases. Committing now that they ports people have had a couple releases to update pkgs that usd the old functions
2010-12-31Standards compliance: expose dirfd with XPG7 and scandir and alphasortPhilip Guenthe
with POSIX 2008 ok millert@
2010-12-14- make HUGE_VAL, HUGE_VALF, HUGE_VALL, INFINITY, NAN expand to theMartynas Venckus
constant expressions with the help of gcc post-3.3. ok millert@, mikeb@. been in snaps for weeks.
2010-11-06make sio_onvol(3) return a integer exposing whether a volume knobAlexandre Ratchov
is available for the stream. As we're at it, remove macros and functions that are neither used nor documented.
2010-10-28Change basep parameter of getdirentries() to be off_t *, not long *Todd C. Miller
so it works correctly with large offsets (and matches other systems). This requires adding a new getdirentries syscall, with the old one renamed to ogetdirentries. All in-tree consumers of getdirentries() have been updated. Bump libc and libpthread major numbers. OK and with deraadt@
2010-10-28remove skipjack and cast from the libc; ok deraadtMike Belopuhov
2010-10-17unlink libsectok from the build; ok markus@ deraadt@Damien Miller
2010-10-01Now that __only_inline is in <sys/cdefs.h>, replace the local versions inPhilip Guenthe
<ctype.h> and <signal.h> ok kettenis@ millert@ deraadt@
2010-09-24Bump fts_level from short to int and add a spare short so thingsTodd C. Miller
line up nicely. OK deraadt@
2010-09-24Add timingsafe_bcmp(3) to libc, mention that it's already in theMatthew Dempsky
kernel in kern(9), and remove it from OpenSSH. ok deraadt@, djm@
2010-09-24add a GLOB_KEEPSTAT option that retains a copy of the struct statDamien Miller
information that is looked up while matching glob(3)s Keeping this information around can make a big difference when fetching it is expensive, e.g. in sftp which uses GLOB_ALTDIRFUNC feedback millert@ jmc@ "get it in before the libc crank" deraadt@
2010-09-01Oracle has re-licensed sunrpc under a three-clause BSD license.Todd C. Miller
Update our sources appropriately. OK deraadt@ jsg@
2010-08-24backout VIS_HEX. guenther@ points out that the C89 \xff encodingDamien Miller
idiotically accepts more then two hex digits following the \x, even on platforms where a char has 8 bits. It is therefore dangerous to have an almost-bit-not-quite compatible format in vis(3). The VIS_ALL (encode all characters) option introduced in the same commit remains.
2010-08-23unbreak tree: add VIS_HEX and VIS_ALL flagsDamien Miller
2010-07-26Always force GNU inline semantics here as well.Mark Kettenis
2010-07-25When using GCC, we always want GNU inline semantics. Fixes issues withMark Kettenis
-Wsystem-headers and -std=c99, where GCC 4.2 would warn that it couldn't give us C99 inline semantics. ok guenther@, dcoppa@, millert@, deraadt@
2010-07-24Teach lint about C99's _Bool and _Complex, plus some related gccPhilip Guenthe
extensions: __real__ and __imag__ operators, the use of '~' for complex conjugation, and 'i' or 'j' as a suffix for complex constants. While this doesn't handle folding and overflow detection for complex constants correctly, it's good enough to make it through libm...and found several bugs once it could do so. "no objections" miod@, krw@
2010-07-24Don't declare wcscoll() twicePhilip Guenthe
2010-05-25unlink g77 from the build.Marc Espie
as discussed with Theo, so that he can synch set. (eventual gcc2 fallout to fix later)
2010-05-18add posix_madvise, posix_memalign, strndup, and strnlen. mostly fromTed Unangst
brad and millert, with hints from guenther, jmc, and otto I think. ok previous.
2010-05-10Switch to using COMPILER_VERSION instead of USE_GCC3, allows for more flexibleDale Rahn
complier picking, eg supporting gcc2, gcc3, and gcc4. based on diff by Marco, with fixes from espie@. ok espie@ general mumbling of approval of others.
2010-05-01incomming -> incomingMichael Knudsen
The ones found in gnu/ left out by intention. ok jmc
2010-02-03MACHINE_ARCH -> MACHINE_CPU when applicable.Miod Vallat
** it is necessary to update make(1) before building now **
2009-12-15dumped is _still_ spelled with one p and not twoAlexander Hall
ok krw@
2009-11-09Fix the handle locking in stdio to use flockfile/funlockfileKurt Miller
internally when and where required. Macros in <stdio.h> are updated to automatically call the underlying functions when the process is threaded to obtain the necessary locking. A private mutex is added to protect __sglue, the internal list of FILE handles, and another to protect the one-time initialization. Some routines in libc that use getc() change to use getc_unlocked() as they're either protected by their own lock or aren't thread-safe routines anyway. committing on behalf of and okay guenther@ now that we have install media space available.
2009-10-22Back out previous commit, as it caused too much growth for the installPhilip Guenthe
media to fit
2009-10-21Fix the handle locking in stdio to use flockfile/funlockfilePhilip Guenthe
internally when and where required. Macros in <stdio.h> are updated to automatically call the underlying functions when the process is threaded to obtain the necessary locking. A private mutex is added to protect __sglue, the internal list of FILE handles, and another to protect the one-time initialization. Some routines in libc that use getc() change to use getc_unlocked() as they're either protected by their own lock or aren't thread-safe routines anyway. ok kurt@, earlier version tested by sthen@ and jj@
2009-09-27use c calling conventions so that g++ doesn't mangle fpgetmask &Martynas Venckus
friends' names unbreaking at least enblend-enfuse & inkscape on macppc & alpha reported, tested: ajacoutot@, sthen@ ok: millert@, otto@
2009-09-22Use __builtin_offsetof for offsetof definition on gcc >= 4Jonathan Gray
This is required as gcc grows ever more pedantic with old age and cavorts with standards bodies that like to create paradoxes. ok kettenis@ miod@ millert@ espie@
2009-08-27Don't stop traversing a directory hierarchy if we reach SHRT_MAX,Todd C. Miller
just stop updating fts_level so we don't overflow it. This allows rm, find, etc to operate on very deep hierarchies. Consumers of fts(3) do need to be aware that the actual level may be larger than fts_level. During the next libc major bump we will make fts_level an int instead of a short. OK deraadt@
2009-07-25int is big enough to fully represent exponents of all supported fpMartynas Venckus
formats. which even for 80-bit & 128-bit long doubles is only 15 bits. therefore, scalbln, scalblnf, scalblnl are essentially the same as scalbn, scalbnf, scalbnl with bounds checking so that LONG_MIN..INT_MIN, and INT_MAX..LONG_MAX ranges properly raise exceptions & yield correct values. looks good to millert@