Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions Include/pymacro.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
#ifndef Py_PYMACRO_H
#define Py_PYMACRO_H

// _Py_STDC_VERSION: the version of the C standard.
// gh-160208: The C++ standard allows __STDC_VERSION__ to be defined to an
// arbitrary value, which means we can't use __STDC_VERSION__ on C++.
#if !defined(__cplusplus) && defined(__STDC_VERSION__)
# define _Py_STDC_VERSION __STDC_VERSION__
#endif

// gh-91782: On FreeBSD 12, if the _POSIX_C_SOURCE and _XOPEN_SOURCE macros are
// defined, <sys/cdefs.h> disables C11 support and <assert.h> does not define
// the static_assert() macro.
Expand Down
7 changes: 7 additions & 0 deletions Include/pyport.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@
# error "Python's source code assumes C's unsigned char is an 8-bit type"
#endif

// _Py_STDC_VERSION: the version of the C standard.
// gh-160208: The C++ standard allows __STDC_VERSION__ to be defined to an
// arbitrary value, which means we can't use __STDC_VERSION__ on C++.
#if defined(__STDC_VERSION__) && !defined(__cplusplus)
# define _Py_STDC_VERSION __STDC_VERSION__
#endif


// Preprocessor check for a builtin preprocessor function. Always return 0
// if __has_builtin() macro is not defined.
Expand Down
Loading