mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-10-12 12:58:07 +00:00
Remove Windows executable path guessing logic
Unlike CMD.EXE, CreateProcess() doesn't care if an executable name ends with .COM or .EXE. We now have the unbourne shell and bash working well on Windows, so we don't need DOS anymore. Making this change will grant us better performance, particularly for builds, because commandv() will need to make fewer system calls. Path mangling magic still happens with WinMain() and ntspawn() in order to do things like turn \ into / so the interop works well at the borders. But all the code in libraries, which did that, has been removed. It's not possible for libraries to abstract the differences between paths.
This commit is contained in:
parent
0c5dd7b342
commit
c88f95a892
19 changed files with 125 additions and 610 deletions
20
libc/str/path.h
Normal file → Executable file
20
libc/str/path.h
Normal file → Executable file
|
@ -1,20 +0,0 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_STR_PATH_H_
|
||||
#define COSMOPOLITAN_LIBC_STR_PATH_H_
|
||||
|
||||
#define _kPathAbs 1
|
||||
#define _kPathDev 2
|
||||
#define _kPathRoot 4
|
||||
#define _kPathDos 8
|
||||
#define _kPathWin 16
|
||||
#define _kPathNt 32
|
||||
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
int _classifypath(const char *) libcesque nosideeffect;
|
||||
bool _isabspath(const char *) libcesque strlenesque;
|
||||
bool _isdirsep(int) libcesque pureconst;
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_STR_PATH_H_ */
|
Loading…
Add table
Add a link
Reference in a new issue