commit | d82344378ad8e471b8ed12fb99807f68351c5412 | [log] [tgz] |
---|---|---|
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | Sun Dec 30 18:39:00 2018 -0800 |
committer | GitHub <noreply@github.com> | Sun Dec 30 18:39:00 2018 -0800 |
tree | 4167099d18d8f0b7f29a9477ebe9f8dcfb093593 | |
parent | e40429905773cdbdb5458a5d93600b5816668470 [diff] [blame] |
bpo-35550: Fix incorrect Solaris define guards (GH-11275) Python source code uses on several places ifdef sun or defined(sun) without the underscores, which is not standard compliant and shouldn't be used. Defines should check for __sun instead. Reference: http://nadeausoftware.com/articles/2012/01/c_c_tip_how_use_compiler_predefined_macros_detect_operating_systemGH-Solaris https://bugs.python.org/issue35550 (cherry picked from commit 6f9bc72c79c3262e5d0f2c0e96b016477399cfb1) Co-authored-by: Jakub KulĂk <Kulikjak@gmail.com>
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 383999e..909b06e 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c
@@ -5926,7 +5926,7 @@ #endif #if defined(HAVE_DEV_PTMX) && !defined(HAVE_OPENPTY) && !defined(HAVE__GETPTY) PyOS_sighandler_t sig_saved; -#ifdef sun +#if defined(__sun) && defined(__SVR4) extern char *ptsname(int fildes); #endif #endif