5 ms·
The message for the PR (under the Conversation tab) justifies this as: > plugins/mac-capture/mac-display-capture.m:621 - The __MAC_10_15 define may not exist o
by jamessb 5y ago
The message for the PR (under the Conversation tab) justifies this as:
> plugins/mac-capture/mac-display-capture.m:621 - The __MAC_10_15 define may not exist on devices running < 10.15, resulting in this section not being appropriately avoided during compilation. Swapping to 101500 should work for all versions of macOS.
- masklinn 5y agoA conditional define might be a good alternative tho?
- jcelerier 5y agoyes, it's the whole macos compatibility / availability layer which is terrible. In contrast a good system like Qt looks like #if QT_VERSION > QT_VERSION_CHECK(5, 15, 0) ... #endif and works also for Qt 5.1 or Qt 4 or 3 (i think that's when this macro was introduced, pretty much at the same time than os x 10.1 ?)
- jakear 5y agoThat’s just adding another layer of abstraction over exactly what the Mac case does. I prefer code that is so simple it doesn’t need to be abstract, as every abstraction layer is a potential bug layer. Not even just “potential” in QT’s case, a quick search turned up https://forum.qt.io/topic/31071/moc-and-qt_version_check-bug https://forum.qt.io/topic/31071/moc-and-qt_version_check-bug and https://forum.qt.io/topic/37882/qt-4-8-qt_version_check-and-moc-workaround https://forum.qt.io/topic/37882/qt-4-8-qt_version_check-and-... as cases where folks have been bit by some tooling in a Qt4 environment not understanding the macro properly.
- cute_boi 5y agoWindows Version check would disagree with you why this abstraction is required. I forgot the api but there is kernel api that will contradict with your view points.
- jcelerier 5y ago> That’s just adding another layer of abstraction over exactly what the Mac case does. I prefer code that is so simple it doesn’t need to be abstract, as every abstraction layer is a potential bug layer. I'm happy for you if you never typed 10150 or 01150 instead of 101500 or whatever but that's definitely not my case and I need any tool that the programming language provides to help me with that ; version macros are unambiguous and I don't remember fucking one up.
- saagarjha 5y agoIn C23 you can type it as 10'15'00 if you’d like.
- jakear 5y agoSurely you see the contradiction in the system you describe as `terrible` being the exact same as the system you call `good`? In either case, macros are available in modern versions but attempting to use them in old versions causes problems (see the links above), so the practice is to not use them at all, if you may have to target older versions.
- jcelerier 5y ago> Surely you see the contradiction in the system you describe as `terrible` being the exact same as the system you call `good`? how is it the exact same ? Where is the generic MACOS_VERSION(sane, version, numbers) where MACOS_VERSION(11, 3, 0) also compiles on the macos 10.7 SDK ?
- jakear 5y agoJust… write the macro? I don’t see the problem.