diff options
author | Benjamin Peterson <benjamin@python.org> | 2016-09-07 21:08:34 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2016-09-07 21:08:34 (GMT) |
commit | b6c345878afcd7f9a78b4c1b15940d76875db0d3 (patch) | |
tree | 5d7ab728ada33bd1222a59a7a97d3f275c363d41 /Modules | |
parent | 56be5f5376d19ffe1a3859f19577dcb6df00332f (diff) | |
download | cpython-b6c345878afcd7f9a78b4c1b15940d76875db0d3.zip cpython-b6c345878afcd7f9a78b4c1b15940d76875db0d3.tar.gz cpython-b6c345878afcd7f9a78b4c1b15940d76875db0d3.tar.bz2 |
use the '__linux__' instead 'linux' preprocessor define
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/socketmodule.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index 0b45c33..1f52922 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -153,7 +153,7 @@ if_indextoname(index) -- return 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 @@ -176,7 +176,7 @@ if_indextoname(index) -- return 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 @@ -1214,7 +1214,7 @@ 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); @@ -1529,7 +1529,7 @@ getsockaddrarg(PySocketSockObject *s, PyObject *args, assert(path.len >= 0); addr = (struct sockaddr_un*)addr_ret; -#ifdef linux +#ifdef __linux__ if (path.len > 0 && *(const char *)path.buf == 0) { /* Linux abstract namespace extension */ if ((size_t)path.len > sizeof addr->sun_path) { |