Add MODE=optlinux build mode (#141)

This commit is contained in:
Justine Tunney 2021-10-14 19:36:49 -07:00
parent 226aaf3547
commit 67b5200a0b
111 changed files with 934 additions and 854 deletions

View file

@ -16,8 +16,12 @@
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
*/
#include "libc/dce.h"
#include "libc/runtime/runtime.h"
#define ToUpper(c) \
(IsWindows() && (c) >= 'a' && (c) <= 'z' ? (c) - 'a' + 'A' : (c))
/**
* Returns value of environment variable, or NULL if not found.
*
@ -35,11 +39,11 @@ char *getenv(const char *s) {
}
break;
}
if (s[j] != p[i][j]) {
if (ToUpper(s[j]) != ToUpper(p[i][j])) {
break;
}
}
}
}
return NULL;
return 0;
}