I was browsing through Windows\'s Platform SDK header files (what a life, right?), and I noticed many places contained references to the preprocessor symbol _MAC
. F
As others have noted, Microsoft apps were ported to the Mac, and they probably found it easier to turn the underlying APIs/frameworks into a portable abstraction layer, rather than rewrite the apps themselves... just as the QuickTime team reportedly did when porting in the opposite direction (from Mac to Windows -- there are similar #if WIN32 conditionals in the Mac's Carbon headers). E.g., rather than riffle though your entire Win32 app's code base looking for CreateFile() and replacing or conditionalizing each reference with #ifdefs, just create a Mac version of CreateFile() and be done with it. Repeat for each Win32 API call.
The surprising bit of historical trivia is this: the end result of Microsoft's porting effort was available to third parties in the form of "Microsoft Visual C++ Cross-Development Edition for Macintosh". So anyone could take their Win32 app and port it to Mac using this abstraction layer.
Quote from my trusty MSDN October 1996 CD:
"Microsoft Visual C++ version 4.0 Cross-Development Edition for Macintosh facilitates the transfer of programs for the Microsoft Windows operating environment to the Apple 680x0 Macintosh or Power Macintosh environment. Designed to provide a complete program development environment, Visual C++ for Macintosh supports C, the standard C run-time library, C++, most of the Microsoft Win32 API including OLE and ODBC, and the Microsoft Foundation Class Library."
So it even included MFC. My guess is that any "#ifdef _MAC" is an artifact of the MSVC++ Cross-Development Edition for Macintosh (R.I.P.).