mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-01 08:48:29 +00:00
Get address sanitizer mostly working
This commit is contained in:
parent
1f1f3cd477
commit
7327c345f9
149 changed files with 3777 additions and 3457 deletions
|
@ -28,13 +28,14 @@
|
|||
*/
|
||||
nodiscard char *commandvenv(const char *var, const char *cmd) {
|
||||
const char *exepath;
|
||||
char pathbuf[PATH_MAX];
|
||||
if ((exepath = getenv(var))) {
|
||||
if (!isempty(exepath) && access(exepath, X_OK) != -1) {
|
||||
return exepath;
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
} else if ((exepath = commandv(cmd))) {
|
||||
} else if ((exepath = commandv(cmd, pathbuf))) {
|
||||
return exepath;
|
||||
} else {
|
||||
return NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue