mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-23 02:50:29 +00:00
Fix the MODE=tinylinux build
This commit is contained in:
parent
965516e313
commit
610e0d95cb
5 changed files with 56 additions and 24 deletions
|
@ -154,6 +154,9 @@ __msabi dontasan EFI_STATUS EfiMain(EFI_HANDLE ImageHandle,
|
|||
uintptr_t Args, MapKey, DescSize;
|
||||
uint64_t p, pe, cr4, *m, *pd, *sp, *pml4t, *pdt1, *pdt2, *pdpt1, *pdpt2;
|
||||
|
||||
extern char os asm("__hostos");
|
||||
os = _HOSTMETAL;
|
||||
|
||||
/*
|
||||
* Allocates and clears PC-compatible memory and copies image. Marks the
|
||||
* pages as EfiRuntimeServicesData, so that we can simply free up all
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/dce.h"
|
||||
#include "libc/intrin/bits.h"
|
||||
#include "libc/intrin/safemacros.internal.h"
|
||||
#include "libc/nt/enum/fileflagandattributes.h"
|
||||
|
@ -123,7 +124,8 @@ textwindows dontasan int GetDosArgv(const char16_t *cmdline, char *buf,
|
|||
cmd[j++] = st->s[i];
|
||||
}
|
||||
cmd[j] = 0;
|
||||
if ((attr = __imp_GetFileAttributesW(cmd)) != -1u &&
|
||||
if (IsWindows() && //
|
||||
(attr = __imp_GetFileAttributesW(cmd)) != -1u && //
|
||||
!(attr & kNtFileAttributeDirectory)) {
|
||||
AppendDosArgv('.', st);
|
||||
AppendDosArgv('\\', st);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue