mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-01-31 03:27:39 +00:00
Move zlib down
This commit is contained in:
parent
4021cd0c1e
commit
e2b3c3618e
4 changed files with 10 additions and 10 deletions
2
Makefile
2
Makefile
|
@ -131,7 +131,6 @@ include libc/tinymath/tinymath.mk # │ You can issue raw system calls
|
|||
include libc/str/str.mk # │
|
||||
include third_party/xed/xed.mk # │
|
||||
include third_party/puff/puff.mk # │
|
||||
include third_party/zlib/zlib.mk # │
|
||||
include libc/elf/elf.mk # │
|
||||
include ape/ape.mk # │
|
||||
include libc/fmt/fmt.mk # │
|
||||
|
@ -147,6 +146,7 @@ include third_party/gdtoa/gdtoa.mk # ├──DYNAMIC RUNTIME
|
|||
include third_party/nsync/mem/mem.mk # │ You can now use stdio
|
||||
include libc/thread/thread.mk # │ You can finally call malloc()
|
||||
include tool/hello/hello.mk # │
|
||||
include third_party/zlib/zlib.mk # │
|
||||
include libc/stdio/stdio.mk # │
|
||||
include libc/time/time.mk # │
|
||||
include net/net.mk # │
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/stdio/stdio.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "libc/sysv/consts/at.h"
|
||||
#include "libc/sysv/consts/o.h"
|
||||
#include "libc/testlib/testlib.h"
|
||||
#include "libc/x/x.h"
|
||||
|
@ -77,10 +78,14 @@ TEST(mkdir, enametoolong) {
|
|||
EXPECT_SYS(ENAMETOOLONG, -1, mkdir(s, 0644));
|
||||
}
|
||||
|
||||
TEST(makedirs, testEmptyString_ENOENT) {
|
||||
TEST(mkdir, testEmptyString_ENOENT) {
|
||||
EXPECT_SYS(ENOENT, -1, mkdir("", 0755));
|
||||
}
|
||||
|
||||
TEST(mkdir, slashSlash) {
|
||||
EXPECT_SYS(0, 0, mkdirat(AT_FDCWD, "o//", 0777));
|
||||
}
|
||||
|
||||
TEST(mkdirat, testRelativePath_opensRelativeToDirFd) {
|
||||
int dirfd;
|
||||
ASSERT_SYS(0, 0, mkdir("foo", 0755));
|
||||
|
|
1
third_party/zlib/zlib.mk
vendored
1
third_party/zlib/zlib.mk
vendored
|
@ -19,6 +19,7 @@ THIRD_PARTY_ZLIB_A_CHECKS = \
|
|||
THIRD_PARTY_ZLIB_A_DIRECTDEPS = \
|
||||
LIBC_INTRIN \
|
||||
LIBC_NEXGEN32E \
|
||||
LIBC_MEM \
|
||||
LIBC_STR \
|
||||
LIBC_SYSV
|
||||
|
||||
|
|
10
third_party/zlib/zutil.c
vendored
10
third_party/zlib/zutil.c
vendored
|
@ -313,11 +313,7 @@ voidpf ZLIB_INTERNAL zcalloc (opaque, items, size)
|
|||
unsigned size;
|
||||
{
|
||||
(void)opaque;
|
||||
if (_weaken(malloc)) {
|
||||
return _weaken(malloc)(items * size);
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
return malloc(items * size);
|
||||
}
|
||||
|
||||
void ZLIB_INTERNAL zcfree (opaque, ptr)
|
||||
|
@ -325,9 +321,7 @@ void ZLIB_INTERNAL zcfree (opaque, ptr)
|
|||
voidpf ptr;
|
||||
{
|
||||
(void)opaque;
|
||||
if (_weaken(free)) {
|
||||
_weaken(free)(ptr);
|
||||
}
|
||||
free(ptr);
|
||||
}
|
||||
|
||||
#endif /* MY_ZCALLOC */
|
||||
|
|
Loading…
Reference in a new issue