Commit Graph

8 Commits

Author SHA1 Message Date
sin fe1ba7dbf1 implement hcreate_r, hdestroy_r and hsearch_r
the size and alignment of struct hsearch_data are matched to the glibc
definition for binary compatibility. the members of the structure do
not match, which should not be a problem as long as applications
correctly treat the structure as opaque.

unlike the glibc implementation, this version of hcreate_r does not
require the caller to zero-fill the structure before use.
2014-04-02 18:37:45 -04:00
Szabolcs Nagy b7d3210196 POSIX conformance fix: define struct entry in search.h 2013-10-29 20:25:11 +00:00
Rich Felker c1a9658bd1 default features: make musl usable without feature test macros
the old behavior of exposing nothing except plain ISO C can be
obtained by defining __STRICT_ANSI__ or using a compiler option (such
as -std=c99) that predefines it. the new default featureset is POSIX
with XSI plus _BSD_SOURCE. any explicit feature test macros will
inhibit the default.

installation docs have also been updated to reflect this change.
2012-09-07 23:13:55 -04:00
Rich Felker 400c5e5c83 use restrict everywhere it's required by c99 and/or posix 2008
to deal with the fact that the public headers may be used with pre-c99
compilers, __restrict is used in place of restrict, and defined
appropriately for any supported compiler. we also avoid the form
[restrict] since older versions of gcc rejected it due to a bug in the
original c99 standard, and instead use the form *restrict.
2012-09-06 22:44:55 -04:00
nsz d197d6421c search: add tdestroy (gnu extension) 2012-05-13 01:34:20 +02:00
Rich Felker 319df20bc9 gnu search.h has struct qelem... 2011-09-21 21:01:56 -04:00
Rich Felker febbd12d00 XSI search.h API implementation by Szabolcs Nagy 2011-06-25 18:18:57 -04:00
Rich Felker 0b44a0315b initial check-in, version 0.5.0 2011-02-12 00:22:29 -05:00