musl/include
Rich Felker cdf51506ce replace old and ugly crypt implementation
the new version is largely the work of Solar Designer, with minor
changes for integration with musl. compared to the old code, text size
is reduced by about 7k, stack space usage by about 70k, and
performance is greatly improved by avoiding expensive calculation of
constant tables on each run.

this version also adds support for extended des-based password hashes,
which allow for unlimited key (password) length and configurable
iteration counts.

i've also published the interface for crypt_r in a new crypt.h header.
especially since this is not a standard interface, i did not feel
compelled to match the glibc abi for the crypt_data structure. the
glibc structure is way too big to allocate on the stack; in fact it's
so big that the first usage may cause the main thread to exceed its
pre-committed stack size of 128k and thus could cause the program to
crash even on systems with overcommit disabled. the only legitimate
use of crypt_data for crypt_r is to store the hash string to return,
so i've reserved 256 bytes, which should be more than sufficient
(longest known password hashes are ~60 characters, and beyond that is
possibly even exceeding some implementations' passwd file field size
limit).
2012-06-29 00:56:37 -04:00
..
arpa header file fixes: multiple include guard consistency and correctness 2012-06-15 21:52:53 -04:00
net header file fixes: multiple include guard consistency and correctness 2012-06-15 21:52:53 -04:00
netinet support _BSD_SOURCE feature test macro 2012-05-22 21:52:08 -04:00
netpacket add netpacket/packet.h 2011-06-09 21:47:24 -04:00
sys add process_vm_readv and process_vm_writev syscall wrappers 2012-06-23 21:38:47 -04:00
aio.h _GNU_SOURCE is supposed to imply _LARGEFILE64_SOURCE 2012-06-04 08:03:56 -04:00
alloca.h alloca cannot be a function. #define it to the gcc builtin if possible 2012-04-09 15:06:58 -04:00
ar.h some extra legacy header stuff 2012-05-06 16:35:32 -04:00
assert.h initial check-in, version 0.5.0 2011-02-12 00:22:29 -05:00
byteswap.h uglify headers for the sake of junk that compiles with gcc -std=c89/-ansi 2012-05-03 22:27:36 -04:00
complex.h simplify creal and cimag macros 2012-03-22 20:00:58 -04:00
cpio.h initial check-in, version 0.5.0 2011-02-12 00:22:29 -05:00
crypt.h replace old and ugly crypt implementation 2012-06-29 00:56:37 -04:00
ctype.h support _BSD_SOURCE feature test macro 2012-05-22 21:52:08 -04:00
dirent.h add (currently stubbed due to stubbed strverscmp) versionsort function 2012-06-13 11:14:38 -04:00
dlfcn.h further fixup dlfcn.h 2011-06-27 01:02:28 -04:00
elf.h header file fixes: multiple include guard consistency and correctness 2012-06-15 21:52:53 -04:00
endian.h take byte order from gcc if gcc has defined it 2012-05-06 13:40:19 -04:00
err.h support the nonstandard err.h interfaces 2011-04-05 11:16:49 -04:00
errno.h remove useless "extern" keywords in headers 2012-01-26 10:53:37 -05:00
fcntl.h proper error handling for fcntl F_GETOWN on modern kernels 2012-06-20 22:16:47 -04:00
features.h initial check-in, version 0.5.0 2011-02-12 00:22:29 -05:00
fenv.h initial check-in, version 0.5.0 2011-02-12 00:22:29 -05:00
float.h fix DECIMAL_DIG definitions 2012-03-21 12:42:48 -04:00
fnmatch.h add some missing GNU FNM_* extensions to the header 2011-10-17 12:24:23 -04:00
ftw.h _GNU_SOURCE is supposed to imply _LARGEFILE64_SOURCE 2012-06-04 08:03:56 -04:00
getopt.h getopt.h is a GNU-getopt-specific header. always expose GNU functions. 2011-04-05 15:45:24 -04:00
glob.h _GNU_SOURCE is supposed to imply _LARGEFILE64_SOURCE 2012-06-04 08:03:56 -04:00
grp.h support _BSD_SOURCE feature test macro 2012-05-22 21:52:08 -04:00
iconv.h initial check-in, version 0.5.0 2011-02-12 00:22:29 -05:00
inttypes.h initial check-in, version 0.5.0 2011-02-12 00:22:29 -05:00
iso646.h add previously-missing ios646.h 2011-02-14 21:59:38 -05:00
langinfo.h extensive header cleanup for standards conformance & correctness 2011-02-14 18:41:25 -05:00
lastlog.h some extra legacy header stuff 2012-05-06 16:35:32 -04:00
libgen.h initial check-in, version 0.5.0 2011-02-12 00:22:29 -05:00
libintl.h initial check-in, version 0.5.0 2011-02-12 00:22:29 -05:00
limits.h missing limit LOGIN_NAME_MAX 2012-05-14 00:01:48 -04:00
locale.h more header cleanup and conformance fixes - locale.h, time.h 2011-02-14 20:45:37 -05:00
malloc.h initial check-in, version 0.5.0 2011-02-12 00:22:29 -05:00
math.h support _BSD_SOURCE feature test macro 2012-05-22 21:52:08 -04:00
memory.h add memory.h, bogus legacy alias for string.h 2012-03-01 01:34:58 -05:00
mntent.h add profile for getmntent_r 2011-04-13 15:24:26 -04:00
monetary.h initial, very primitive strfmon 2012-03-21 00:47:37 -04:00
mqueue.h fix incorrect include guard in mqueue.h 2011-09-20 12:14:06 -04:00
netdb.h support _BSD_SOURCE feature test macro 2012-05-22 21:52:08 -04:00
nl_types.h initial check-in, version 0.5.0 2011-02-12 00:22:29 -05:00
paths.h header file fixes: multiple include guard consistency and correctness 2012-06-15 21:52:53 -04:00
poll.h initial check-in, version 0.5.0 2011-02-12 00:22:29 -05:00
pthread.h use c++-friendly initializers for pthread initializer definitions 2012-02-29 22:55:08 -05:00
pty.h fix __cplusplus extern "C" closing brace in pty.h (typo?) 2011-11-10 21:01:24 -05:00
pwd.h move getpass decl to the right place 2012-05-20 22:56:06 -04:00
regex.h duplicate re_nsub in LSB/glibc ABI compatible location 2011-06-16 16:53:11 -04:00
resolv.h header file fixes: multiple include guard consistency and correctness 2012-06-15 21:52:53 -04:00
sched.h add linux-specific unshare syscall wrapper 2012-04-29 19:54:03 -04:00
search.h search: add tdestroy (gnu extension) 2012-05-13 01:34:20 +02:00
semaphore.h preliminaries to adding POSIX semaphores 2011-03-03 18:32:26 -05:00
setjmp.h debloat jmp_buf in _GNU_SOURCE mode 2012-05-23 00:10:39 -04:00
shadow.h initial check-in, version 0.5.0 2011-02-12 00:22:29 -05:00
signal.h bsd_signal is a legacy (removed) XSI function, not needed in _BSD_SOURCE 2012-05-22 21:54:19 -04:00
spawn.h fix various errors in function signatures/prototypes found by nsz 2011-09-13 21:09:35 -04:00
stdarg.h use compiler builtins for variadic macros when available 2011-04-27 23:41:48 -04:00
stdbool.h make stdbool.h conform to c99 2011-09-20 14:51:56 -04:00
stddef.h initial check-in, version 0.5.0 2011-02-12 00:22:29 -05:00
stdint.h fix signedness errors in stdint.h constant macros 2012-06-08 11:11:44 -04:00
stdio.h _GNU_SOURCE is supposed to imply _LARGEFILE64_SOURCE 2012-06-04 08:03:56 -04:00
stdio_ext.h include declarations for new stdio_ext functions (gnulib support) 2012-06-19 15:18:22 -04:00
stdlib.h _GNU_SOURCE is supposed to imply _LARGEFILE64_SOURCE 2012-06-04 08:03:56 -04:00
string.h support _BSD_SOURCE feature test macro 2012-05-22 21:52:08 -04:00
strings.h more locale_t interfaces (string stuff) and header updates 2012-02-06 21:51:02 -05:00
stropts.h add isastream (obsolete STREAMS junk) 2012-05-06 09:03:19 -04:00
syscall.h header file fixes: multiple include guard consistency and correctness 2012-06-15 21:52:53 -04:00
sysexits.h add sysexits.h legacy header 2011-04-05 15:40:36 -04:00
syslog.h header file fixes: multiple include guard consistency and correctness 2012-06-15 21:52:53 -04:00
tar.h initial check-in, version 0.5.0 2011-02-12 00:22:29 -05:00
termios.h support _BSD_SOURCE feature test macro 2012-05-22 21:52:08 -04:00
tgmath.h math: fix nextafter definition in tgmath.h 2012-05-28 22:55:03 +02:00
time.h revert one change in time.h; no evidence BSD_SOURCE should expose these.. 2012-06-13 14:46:11 -04:00
ucontext.h consistency: use struct __ucontext instead of ucontext_t in prototypes 2011-07-31 00:10:29 -04:00
ulimit.h initial check-in, version 0.5.0 2011-02-12 00:22:29 -05:00
unistd.h _GNU_SOURCE is supposed to imply _LARGEFILE64_SOURCE 2012-06-04 08:03:56 -04:00
utime.h initial check-in, version 0.5.0 2011-02-12 00:22:29 -05:00
utmp.h some extra legacy header stuff 2012-05-06 16:35:32 -04:00
utmpx.h utmpx.h is no longer under standards, so expose ut_exit structure 2011-04-12 12:03:33 -04:00
wchar.h add all missing wchar functions except floating point parsers 2012-03-01 23:24:45 -05:00
wctype.h fix some omissions and mistakes in locale_t interface definitions 2012-02-06 21:33:40 -05:00
wordexp.h fix typo in wordexp.h (note that the function is still unimplemented) 2011-02-19 12:44:36 -05:00