cosmopolitan/third_party/python/Include/osdefs.h
Justine Tunney d26d7ae0e4 Perform build and magnum tuning
Building o//third_party/python now takes 5 seconds on my PC

This change works towards modifying Python to use runtime dispatching
when appropriate. For example, when loading the magnums in the socket
module, it's a good idea to check if the magnum is zero, because that
means the local system platform doesn't support it.
2021-08-10 10:26:13 -07:00

35 lines
545 B
C

#ifndef Py_OSDEFS_H
#define Py_OSDEFS_H
COSMOPOLITAN_C_START_
/* clang-format off */
/* Operating system dependencies */
#ifdef MS_WINDOWS
#define SEP L'\\'
#define ALTSEP L'/'
#define MAXPATHLEN 256
#define DELIM L';'
#endif
/* Filename separator */
#ifndef SEP
#define SEP L'/'
#endif
#ifndef MAXPATHLEN
#if defined(PATH_MAX) && PATH_MAX > 1024
#define MAXPATHLEN PATH_MAX
#else
#define MAXPATHLEN 1024
#endif
#endif
/* Search path entry delimiter */
#ifndef DELIM
#define DELIM L':'
#endif
COSMOPOLITAN_C_END_
#endif /* !Py_OSDEFS_H */