diff --git a/Modules/_ctypes/libffi/src/dlmalloc.c b/Modules/_ctypes/libffi/src/dlmalloc.c index 783c5c2..b253491 100644 --- a/Modules/_ctypes/libffi/src/dlmalloc.c +++ b/Modules/_ctypes/libffi/src/dlmalloc.c @@ -512,11 +512,11 @@ DEFAULT_MMAP_THRESHOLD default: 256K #define MMAP_CLEARS 1 #endif /* MMAP_CLEARS */ #ifndef HAVE_MREMAP -#ifdef linux +#ifdef __linux #define HAVE_MREMAP 1 -#else /* linux */ +#else /* __linux */ #define HAVE_MREMAP 0 -#endif /* linux */ +#endif /* __linux */ #endif /* HAVE_MREMAP */ #ifndef MALLOC_FAILURE_ACTION #define MALLOC_FAILURE_ACTION errno = ENOMEM; diff --git a/Modules/_ctypes/libffi/src/mips/ffitarget.h b/Modules/_ctypes/libffi/src/mips/ffitarget.h index c5f4e05..440604d 100644 --- a/Modules/_ctypes/libffi/src/mips/ffitarget.h +++ b/Modules/_ctypes/libffi/src/mips/ffitarget.h @@ -27,7 +27,7 @@ #ifndef LIBFFI_TARGET_H #define LIBFFI_TARGET_H -#ifdef linux +#ifdef __linux # include #else # include diff --git a/Modules/_ctypes/libffi/src/x86/ffi.c b/Modules/_ctypes/libffi/src/x86/ffi.c index 8049653..01f7e84 100644 --- a/Modules/_ctypes/libffi/src/x86/ffi.c +++ b/Modules/_ctypes/libffi/src/x86/ffi.c @@ -209,7 +209,7 @@ ffi_status ffi_prep_cif_machdep(ffi_cif *cif) #endif { cif->flags = FFI_TYPE_STRUCT; - // allocate space for return value pointer + /* allocate space for return value pointer */ cif->bytes += ALIGN(sizeof(void*), FFI_SIZEOF_ARG); } break; diff --git a/Modules/fpectlmodule.c b/Modules/fpectlmodule.c index 6af2f82..ccaa519 100644 --- a/Modules/fpectlmodule.c +++ b/Modules/fpectlmodule.c @@ -175,7 +175,7 @@ static void fpe_reset(Sigfunc *handler) PyOS_setsig(SIGFPE, handler); /*-- DEC ALPHA LINUX ------------------------------------------------------*/ -#elif defined(__alpha) && defined(linux) +#elif defined(__alpha) && defined(__linux) #include unsigned long fp_control = IEEE_TRAP_ENABLE_INV | IEEE_TRAP_ENABLE_DZE | IEEE_TRAP_ENABLE_OVF; @@ -214,7 +214,7 @@ static void fpe_reset(Sigfunc *handler) PyOS_setsig(SIGFPE, handler); /*-- Linux ----------------------------------------------------------------*/ -#elif defined(linux) +#elif defined(__linux) #ifdef __GLIBC__ #include #else diff --git a/Modules/ossaudiodev.c b/Modules/ossaudiodev.c index e660e50..1899db8 100644 --- a/Modules/ossaudiodev.c +++ b/Modules/ossaudiodev.c @@ -32,7 +32,7 @@ #include #include -#if defined(linux) +#if defined(__linux) #ifndef HAVE_STDINT_H typedef unsigned long uint32_t; diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 396243e..e0083fc 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -6437,7 +6437,7 @@ done: if (!PyArg_ParseTupleAndKeywords(args, kwdict, "iiOn:sendfile", keywords, &out, &in, &offobj, &count)) return NULL; -#ifdef linux +#ifdef __linux if (offobj == Py_None) { Py_BEGIN_ALLOW_THREADS ret = sendfile(out, in, NULL, count); diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index d3f65aa..b0c0aaa 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -150,7 +150,7 @@ if_indextoname(index) -- returns the corresponding interface name\n\ On the other hand, not all Linux versions agree, so there the settings computed by the configure script are needed! */ -#ifndef linux +#ifndef __linux # undef HAVE_GETHOSTBYNAME_R_3_ARG # undef HAVE_GETHOSTBYNAME_R_5_ARG # undef HAVE_GETHOSTBYNAME_R_6_ARG @@ -165,7 +165,7 @@ if_indextoname(index) -- returns the corresponding interface name\n\ # define HAVE_GETHOSTBYNAME_R_3_ARG # elif defined(__sun) || defined(__sgi) # define HAVE_GETHOSTBYNAME_R_5_ARG -# elif defined(linux) +# elif defined(__linux) /* Rely on the configure script */ # else # undef HAVE_GETHOSTBYNAME_R @@ -1053,13 +1053,13 @@ makesockaddr(SOCKET_T sockfd, struct sockaddr *addr, size_t addrlen, int proto) case AF_UNIX: { struct sockaddr_un *a = (struct sockaddr_un *) addr; -#ifdef linux +#ifdef __linux if (a->sun_path[0] == 0) { /* Linux abstract namespace */ addrlen -= offsetof(struct sockaddr_un, sun_path); return PyBytes_FromStringAndSize(a->sun_path, addrlen); } else -#endif /* linux */ +#endif /* __linux */ { /* regular NULL-terminated string */ return PyUnicode_FromString(a->sun_path); @@ -1243,7 +1243,7 @@ getsockaddrarg(PySocketSockObject *s, PyObject *args, return 0; addr = (struct sockaddr_un*)addr_ret; -#ifdef linux +#ifdef __linux if (len > 0 && path[0] == 0) { /* Linux abstract namespace extension */ if (len > sizeof addr->sun_path) { @@ -1253,7 +1253,7 @@ getsockaddrarg(PySocketSockObject *s, PyObject *args, } } else -#endif /* linux */ +#endif /* __linux */ { /* regular NULL-terminated string */ if (len >= sizeof addr->sun_path) {