mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-03 03:02:28 +00:00
Get LIBC_MEM and LIBC_STDIO building with aarch64
This commit is contained in:
parent
ae0ee59614
commit
d04430f4ef
81 changed files with 440 additions and 1064 deletions
|
@ -114,7 +114,7 @@ void GetOpts(int argc, char *argv[]) {
|
|||
test_ = true;
|
||||
break;
|
||||
case 'o':
|
||||
fclose_s(&fout_);
|
||||
fclose(fout_);
|
||||
if (!(fout_ = fopen((hint_ = optarg), "w"))) {
|
||||
PrintIoErrorMessage();
|
||||
exit(1);
|
||||
|
@ -191,9 +191,11 @@ int Run(char **paths, size_t count) {
|
|||
hint_ = "/dev/stdin";
|
||||
if (!fout_) fout_ = stdout;
|
||||
rc = RunLengthCode();
|
||||
rc |= fclose_s(&fin_);
|
||||
rc |= fclose(fin_);
|
||||
fin_ = 0;
|
||||
} else {
|
||||
rc = fclose_s(&fin_);
|
||||
rc = fclose(fin_);
|
||||
fin_ = 0;
|
||||
for (i = 0; i < count && rc != -1; ++i) {
|
||||
rc = -1;
|
||||
if ((fin_ = fopen((hint_ = paths[i]), "r"))) {
|
||||
|
@ -219,18 +221,21 @@ int Run(char **paths, size_t count) {
|
|||
if (rc != -1 && !decompress_) {
|
||||
rc = RunLengthEncode2();
|
||||
}
|
||||
if ((rc |= fclose_s(&fout_)) != -1) {
|
||||
if ((rc |= fclose(fout_)) != -1) {
|
||||
unlink(paths[i]);
|
||||
}
|
||||
fout_ = 0;
|
||||
}
|
||||
}
|
||||
rc |= fclose_s(&fin_);
|
||||
rc |= fclose(fin_);
|
||||
fin_ = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (rc != -1 && fout_) {
|
||||
rc = RunLengthEncode2();
|
||||
rc |= fclose_s(&fout_);
|
||||
rc |= fclose(fout_);
|
||||
fout_ = 0;
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue