Browse Source
closes bpo-44751: Move crypt.h include from public header to _cryptmodule (GH-27394)
Automerge-Triggered-By: GH:benjaminp
pull/27407/head
Geoffrey Thomas
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
4 additions and
13 deletions
-
Include/Python.h
-
Misc/NEWS.d/next/C API/2021-07-27-17-29-12.bpo-44751.4qmbDG.rst
-
Modules/_cryptmodule.c
|
|
|
@ -35,19 +35,6 @@ |
|
|
|
#ifndef MS_WINDOWS |
|
|
|
#include <unistd.h> |
|
|
|
#endif |
|
|
|
#ifdef HAVE_CRYPT_H |
|
|
|
#if defined(HAVE_CRYPT_R) && !defined(_GNU_SOURCE) |
|
|
|
/* Required for glibc to expose the crypt_r() function prototype. */ |
|
|
|
# define _GNU_SOURCE |
|
|
|
# define _Py_GNU_SOURCE_FOR_CRYPT |
|
|
|
#endif |
|
|
|
#include <crypt.h> |
|
|
|
#ifdef _Py_GNU_SOURCE_FOR_CRYPT |
|
|
|
/* Don't leak the _GNU_SOURCE define to other headers. */ |
|
|
|
# undef _GNU_SOURCE |
|
|
|
# undef _Py_GNU_SOURCE_FOR_CRYPT |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
/* For size_t? */ |
|
|
|
#ifdef HAVE_STDDEF_H |
|
|
|
|
|
|
|
@ -0,0 +1 @@ |
|
|
|
Remove ``crypt.h`` include from the public ``Python.h`` header. |
|
|
|
@ -4,6 +4,9 @@ |
|
|
|
#include "Python.h" |
|
|
|
|
|
|
|
#include <sys/types.h> |
|
|
|
#ifdef HAVE_CRYPT_H |
|
|
|
#include <crypt.h> |
|
|
|
#endif |
|
|
|
|
|
|
|
/* Module crypt */ |
|
|
|
|
|
|
|
|