Commit cc1a131
committed
playlist_manager: gate on HAVE_COCOATOUCH; don't pull into macOS build
GCC 4.0 (Xcode 3.1, PowerPC) reports:
RetroArchPlaylistManager.h:14: error: syntax error before
'AT_NAME' token
RetroArchPlaylistManager.h/.m uses three Xcode 7+ (2015) features:
NS_ASSUME_NONNULL_BEGIN/END nullability macros, the 'nullable' /
'_Nonnull' keywords, and Obj-C lightweight generics like
NSArray<NSString *>. On Xcode 3.1 / 10.5, NS_ASSUME_NONNULL_BEGIN
is an undefined identifier that expands to itself; GCC parses it
at file scope, then chokes on the following @interface (reported
as 'AT_NAME' in the diagnostic).
The file is iOS/tvOS-only by design — its header comment says so,
and its only consumer is cocoa_launch_game_by_filename() which is
only called from ui_cocoatouch.m. But the griffin build pulled it
in whenever HAVE_COCOA || HAVE_COCOATOUCH || HAVE_COCOA_METAL was
set, which is too broad: plain HAVE_COCOA (macOS) doesn't need it.
Narrow the gating to HAVE_COCOATOUCH, matching the idiom already
used elsewhere in cocoa_common.m:
- griffin/griffin_objc.m: wrap RetroArchPlaylistManager.m include
- ui/drivers/cocoa/cocoa_common.m: wrap the header include and
the entire cocoa_launch_game_by_filename() definition
- ui/drivers/cocoa/cocoa_common.h: wrap the forward declaration
iOS/tvOS builds are unaffected — they define HAVE_COCOATOUCH and
pull everything in as before. macOS builds (HAVE_COCOA without
HAVE_COCOATOUCH) lose cocoa_launch_game_by_filename(), which they
never called anyway.1 parent 6c37fb0 commit cc1a131
3 files changed
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
35 | 39 | | |
| 40 | + | |
36 | 41 | | |
37 | 42 | | |
38 | 43 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
| 131 | + | |
131 | 132 | | |
| 133 | + | |
132 | 134 | | |
133 | 135 | | |
134 | 136 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
| |||
1180 | 1182 | | |
1181 | 1183 | | |
1182 | 1184 | | |
| 1185 | + | |
1183 | 1186 | | |
1184 | 1187 | | |
1185 | 1188 | | |
| |||
1276 | 1279 | | |
1277 | 1280 | | |
1278 | 1281 | | |
| 1282 | + | |
0 commit comments