Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitdf21f50

Browse files
authored
bpo-42692: fix __builtin_available check on older compilers (GH-23873)
A compiler that doesn't define `__has_builtin` will error out when it isused on the same line as the check for it.Automerge-Triggered-By: GH:ronaldoussoren
1 parentb6fc0c4 commitdf21f50

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix __builtin_available check on older compilers. Patch by Joshua Root.

‎Modules/posixmodule.c‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,13 @@
6161
*/
6262
#if defined(__APPLE__)
6363

64-
#if defined(__has_builtin)&&__has_builtin(__builtin_available)
64+
#if defined(__has_builtin)
65+
#if__has_builtin(__builtin_available)
66+
#defineHAVE_BUILTIN_AVAILABLE 1
67+
#endif
68+
#endif
69+
70+
#ifdefHAVE_BUILTIN_AVAILABLE
6571
# defineHAVE_FSTATAT_RUNTIME __builtin_available(macOS 10.10, iOS 8.0, *)
6672
# defineHAVE_FACCESSAT_RUNTIME __builtin_available(macOS 10.10, iOS 8.0, *)
6773
# defineHAVE_FCHMODAT_RUNTIME __builtin_available(macOS 10.10, iOS 8.0, *)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp