Bug 36258 - There is no __MAC__ pre-processor directive
Summary: There is no __MAC__ pre-processor directive
Status: RESOLVED FIXED
Alias: None
Product: Xamarin.Mac
Classification: Desktop
Component: MSBuild ()
Version: Master
Hardware: Macintosh Mac OS
: Normal enhancement
Target Milestone: master
Assignee: Vincent Dondain [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2015-11-25 14:00 UTC by bryan costanich
Modified: 2017-05-04 04:48 UTC (History)
7 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description bryan costanich 2015-11-25 14:00:49 UTC
we do, however, have __IOS__, __ANDROID__, __MOBILE__, etc. So i suggest we create a __MAC__ one.

thanks!
Comment 1 Chris Hamons 2015-11-30 16:59:54 UTC
That is a reasonable idea. The only rub is how to do it in a reasonable manor, since all existing XM projects won't have the define.
Comment 2 Rolf Bjarne Kvinge [MSFT] 2015-11-30 17:23:12 UTC
If we put it in the MSBuild tasks, it'll be in all projects that use the MSBuild tasks (grep for __IOS__ in maccore/msbuild/ to see how it's done for XI).
Comment 3 Sebastien Pouliot 2017-01-03 14:43:48 UTC
@Vincent, double check if this was already done. If not then please add it to your todo. Thanks!
Comment 4 Colby Williams 2017-01-10 18:51:19 UTC
(In reply to Sebastien Pouliot from comment #3)

@Vincent, @Sebastien, @Chris at this point would it make more sense to do __MACOS__ opposed to just __MAC__ ?
Comment 5 Sebastien Pouliot 2017-01-10 18:52:46 UTC
+1 as we have __WATCHOS__ and __TVOS__ too
Comment 6 Chris Hamons 2017-01-10 18:53:32 UTC
I'm fine w\ that.
Comment 7 Rolf Bjarne Kvinge [MSFT] 2017-04-27 11:47:50 UTC
https://github.com/xamarin/xamarin-macios/pull/2048