Skip to content

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Feb 7, 2022

  • audioop.c: #ifdef WORDS_BIGENDIAN
  • ctypes.h: #ifdef USING_MALLOC_CLOSURE_DOT_C
  • pytime.c: #ifdef APPLE
  • unicodeobject.c: #ifdef HAVE_NON_UNICODE_WCHAR_T_REPRESENTATION

https://bugs.python.org/issue46670

* audioop.c: #ifdef WORDS_BIGENDIAN
* ctypes.h: #ifdef USING_MALLOC_CLOSURE_DOT_C
* pytime.c: #ifdef __APPLE__
* unicodeobject.c: #ifdef HAVE_NON_UNICODE_WCHAR_T_REPRESENTATION
@vstinner vstinner changed the title bpo-46670: Fix #ifdef __APPLE__ in pytime.c bpo-46670: Test if a macro is defined, not its value Feb 7, 2022
@vstinner
Copy link
Member Author

vstinner commented Feb 7, 2022

Origin of these macros:

setup.py:1767:   extra_compile_args.append('-DUSING_MALLOC_CLOSURE_DOT_C=1')
setup.py:1804:   ext.extra_compile_args.append("-DUSING_APPLE_OS_LIBFFI=1")

pyconfig.h.in:

/* Define if the internal form of wchar_t in non-Unicode locales is not
   Unicode. */
#undef HAVE_NON_UNICODE_WCHAR_T_REPRESENTATION

/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
   significant byte first (like Motorola and SPARC, unlike Intel). */
#if defined AC_APPLE_UNIVERSAL_BUILD
# if defined __BIG_ENDIAN__
#  define WORDS_BIGENDIAN 1
# endif
#else
# ifndef WORDS_BIGENDIAN
#  undef WORDS_BIGENDIAN
# endif
#endif

_ctypes/malloc_closure.c: #ifdef HAVE_FFI_CLOSURE_ALLOC, #ifdef USING_APPLE_OS_LIBFFI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants