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

Commiteedeaef

Browse files
bpo-42692: fix __builtin_available check on older compilers (GH-23873) (GH-24090)
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(cherry picked from commitdf21f50)Co-authored-by: Joshua Root <jmr@macports.org>
1 parent76489dd commiteedeaef

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
@@ -56,7 +56,13 @@
5656
*/
5757
#if defined(__APPLE__)
5858

59-
#if defined(__has_builtin)&&__has_builtin(__builtin_available)
59+
#if defined(__has_builtin)
60+
#if__has_builtin(__builtin_available)
61+
#defineHAVE_BUILTIN_AVAILABLE 1
62+
#endif
63+
#endif
64+
65+
#ifdefHAVE_BUILTIN_AVAILABLE
6066
# defineHAVE_FSTATAT_RUNTIME __builtin_available(macOS 10.10, iOS 8.0, *)
6167
# defineHAVE_FACCESSAT_RUNTIME __builtin_available(macOS 10.10, iOS 8.0, *)
6268
# defineHAVE_FCHMODAT_RUNTIME __builtin_available(macOS 10.10, iOS 8.0, *)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp