0010-3.13-gh-129296-Fix-pyatomic.h-include-paths-GH-12932.patch 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. From 0ee012224447b6ec7f6f20d316b24449fdcc0d4b Mon Sep 17 00:00:00 2001
  2. From: "Miss Islington (bot)"
  3. <31488909+miss-islington@users.noreply.github.com>
  4. Date: Fri, 28 Feb 2025 09:22:15 +0100
  5. Subject: [PATCH] [3.13] gh-129296: Fix `pyatomic.h` include paths (GH-129320)
  6. (#130667)
  7. gh-129296: Fix `pyatomic.h` include paths (GH-129320)
  8. Use relative includes in Include/cpython/pyatomic.h for
  9. pyatomic_gcc.h, pyatomic_std.h and pyatomic_msc.h.
  10. Do a similar change in Include/cpython/pythread.h for
  11. pthread_stubs.h include.
  12. (cherry picked from commit 3a974e39d54902699f360bc4db2fd351a6baf3ef)
  13. Co-authored-by: Zanie Blue <contact@zanie.dev>
  14. Upstream: 125ca028664ce72556e3983b57f521a118c4e677
  15. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
  16. ---
  17. Include/cpython/pyatomic.h | 6 +++---
  18. Include/cpython/pythread.h | 2 +-
  19. 2 files changed, 4 insertions(+), 4 deletions(-)
  20. diff --git a/Include/cpython/pyatomic.h b/Include/cpython/pyatomic.h
  21. index 4ecef4f56ed..28029859d3d 100644
  22. --- a/Include/cpython/pyatomic.h
  23. +++ b/Include/cpython/pyatomic.h
  24. @@ -529,15 +529,15 @@ static inline void _Py_atomic_fence_release(void);
  25. #if _Py_USE_GCC_BUILTIN_ATOMICS
  26. # define Py_ATOMIC_GCC_H
  27. -# include "cpython/pyatomic_gcc.h"
  28. +# include "pyatomic_gcc.h"
  29. # undef Py_ATOMIC_GCC_H
  30. #elif __STDC_VERSION__ >= 201112L && !defined(__STDC_NO_ATOMICS__)
  31. # define Py_ATOMIC_STD_H
  32. -# include "cpython/pyatomic_std.h"
  33. +# include "pyatomic_std.h"
  34. # undef Py_ATOMIC_STD_H
  35. #elif defined(_MSC_VER)
  36. # define Py_ATOMIC_MSC_H
  37. -# include "cpython/pyatomic_msc.h"
  38. +# include "pyatomic_msc.h"
  39. # undef Py_ATOMIC_MSC_H
  40. #else
  41. # error "no available pyatomic implementation for this platform/compiler"
  42. diff --git a/Include/cpython/pythread.h b/Include/cpython/pythread.h
  43. index 03f710a9f7e..e658b35bd90 100644
  44. --- a/Include/cpython/pythread.h
  45. +++ b/Include/cpython/pythread.h
  46. @@ -22,7 +22,7 @@ PyAPI_DATA(const long long) PY_TIMEOUT_MAX;
  47. */
  48. # define NATIVE_TSS_KEY_T unsigned long
  49. #elif defined(HAVE_PTHREAD_STUBS)
  50. -# include "cpython/pthread_stubs.h"
  51. +# include "pthread_stubs.h"
  52. # define NATIVE_TSS_KEY_T pthread_key_t
  53. #else
  54. # error "Require native threads. See https://bugs.python.org/issue31370"
  55. --
  56. 2.48.1