Make more libc improvements

- Make memmem() faster
- Make readdir() thread safe
- Remove 64kb limit from mkdeps.com
- Add old crypt() function from Musl
- Improve new fix-third-party.py tool
- Improve libc/isystem/ headers and fix bugs
This commit is contained in:
Justine Tunney 2022-08-06 17:18:40 -07:00
parent a8cf0f7e89
commit 6a5717a48f
50 changed files with 3783 additions and 280 deletions

4
libc/isystem/crypt.h Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_CRYPT_H_
#define COSMOPOLITAN_LIBC_ISYSTEM_CRYPT_H_
#include "third_party/musl/crypt.h"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_CRYPT_H_ */

View file

@ -1,4 +1,4 @@
#ifndef LIBC_ISYSTEM_SYS_DLFCN_H_
#define LIBC_ISYSTEM_SYS_DLFCN_H_
#include "libc/calls/calls.h"
#include "libc/runtime/dlfcn.h"
#endif

View file

@ -1,4 +1,4 @@
#ifndef LIBC_ISYSTEM_ERR_H_
#define LIBC_ISYSTEM_ERR_H_
#include "libc/log/log.h"
#include "libc/log/bsd.h"
#endif

View file

@ -1,4 +1,5 @@
#ifndef LIBC_ISYSTEM_FLOAT_H_
#define LIBC_ISYSTEM_FLOAT_H_
#include "libc/math.h"
#include "libc/runtime/fenv.h"
#endif

View file

@ -1,4 +1,5 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_LANGINFO_H_
#define COSMOPOLITAN_LIBC_ISYSTEM_LANGINFO_H_
#include "libc/unicode/langinfo.h"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_LANGINFO_H_ */

4
libc/isystem/nl_types.h Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_NL_TYPES_H_
#define COSMOPOLITAN_LIBC_ISYSTEM_NL_TYPES_H_
#include "libc/unicode/nltypes.h"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_NL_TYPES_H_ */

View file

@ -2,7 +2,6 @@
#define LIBC_ISYSTEM_STDIO_H_
#include "libc/calls/calls.h"
#include "libc/fmt/fmt.h"
#include "libc/log/log.h"
#include "libc/stdio/stdio.h"
#include "libc/stdio/temp.h"
#endif

View file

@ -1,10 +1,8 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_SYS_FILE_H_
#define COSMOPOLITAN_LIBC_ISYSTEM_SYS_FILE_H_
#include "libc/calls/calls.h"
#include "libc/calls/struct/flock.h"
#include "libc/sysv/consts/l.h"
#include "libc/sysv/consts/lock.h"
#define L_SET SEEK_SET
#define L_INCR SEEK_CUR
#define L_XTND SEEK_END
#include "libc/sysv/consts/ok.h"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_SYS_FILE_H_ */

View file

@ -2,5 +2,4 @@
#define COSMOPOLITAN_LIBC_ISYSTEM_SYS_IPC_H_
#include "libc/calls/ipc.h"
#include "libc/calls/weirdtypes.h"
#include "libc/sysv/consts/ipc.h"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_SYS_IPC_H_ */

5
libc/isystem/sys/prctl.h Normal file
View file

@ -0,0 +1,5 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_SYS_PRCTL_H_
#define COSMOPOLITAN_LIBC_ISYSTEM_SYS_PRCTL_H_
#include "libc/calls/calls.h"
#include "libc/sysv/consts/pr.h"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_SYS_PRCTL_H_ */