mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 05:42:29 +00:00
Fix Clang support
The amalgamated release is now confirmed to be working with Clang, including its integrated assembler. Fixes #41
This commit is contained in:
parent
e06c90fafc
commit
d7733579d3
103 changed files with 384 additions and 359 deletions
|
@ -26,7 +26,7 @@
|
|||
#include "libc/sysv/consts/o.h"
|
||||
#include "libc/sysv/consts/prot.h"
|
||||
|
||||
static void *filecmp$mmap(int fd, size_t size) {
|
||||
static void *filecmp_mmap(int fd, size_t size) {
|
||||
return size ? mmap(NULL, size, PROT_READ, MAP_SHARED, fd, 0) : NULL;
|
||||
}
|
||||
|
||||
|
@ -49,8 +49,8 @@ int filecmp(const char *pathname1, const char *pathname2) {
|
|||
(fd2 = open(pathname2, O_RDONLY)) != -1 &&
|
||||
(size1 = getfiledescriptorsize(fd1)) != -1 &&
|
||||
(size2 = getfiledescriptorsize(fd2)) != -1 &&
|
||||
(addr1 = filecmp$mmap(fd1, size1)) != MAP_FAILED &&
|
||||
(addr2 = filecmp$mmap(fd2, size2)) != MAP_FAILED) {
|
||||
(addr1 = filecmp_mmap(fd1, size1)) != MAP_FAILED &&
|
||||
(addr2 = filecmp_mmap(fd2, size2)) != MAP_FAILED) {
|
||||
olderr = errno;
|
||||
madvise(addr1, size1, MADV_WILLNEED | MADV_SEQUENTIAL);
|
||||
madvise(addr2, size2, MADV_WILLNEED | MADV_SEQUENTIAL);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue