Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000026OLSRdCorepublic2012-04-05 20:092012-05-05 15:49
Reporterhans 
Assigned Toaaron 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSMac OS XOS Version
Product Version 
Target VersionFixed in Version 
Summary0000026: use standard __APPLE__ macro defined by Apple's gcc instead of custom __MacOSX__ macro
DescriptionCurrently in olsrd, the macro used to represent Mac OS X is __MacOSX__. Apple's gcc automatically provides __APPLE__ and this is the standard macro for detecting Mac OS X. Using the standard, compiler-defined macros means that the C files will build properly independently of the build system, making creating new build systems much easier.

olsrd is already using standard, compiler-defined macros like __FreeBSD__, __OpenBSD__, __FreeBSD_kernel__, and __GNUC__.

This patch applies on today's HEAD of the stable branch.
TagsNo tags attached.
Attached Filespatch file icon 0001-use-__APPLE__-macro-defined-by-Apple-s-gcc-instead-o.patch [^] (7,351 bytes) 2012-04-05 20:09 [Show Content]

- Relationships

-  Notes
(0000030)
hans (reporter)
2012-04-05 20:34

here are two references on the topic:
http://sourceforge.net/apps/mediawiki/predef/index.php?title=Operating_Systems [^]

http://stackoverflow.com/questions/1529031/what-c-preprocessor-conditional-should-i-use-for-os-x-specific-code [^]
(0000036)
Henning (administrator)
2012-05-05 11:58

Aaron, I applied the patch to stable, can you check that it still compiles with Mac OSX ?
(0000045)
hans (reporter)
2012-05-05 15:22

I just pulled the changes from git, and ran the build on Mac OS X 10.6.8/Intel and it built without any problem.

- Issue History
Date Modified Username Field Change
2012-04-05 20:09 hans New Issue
2012-04-05 20:09 hans File Added: 0001-use-__APPLE__-macro-defined-by-Apple-s-gcc-instead-o.patch
2012-04-05 20:34 hans Note Added: 0000030
2012-05-05 11:58 Henning Assigned To => Henning
2012-05-05 11:58 Henning Status new => assigned
2012-05-05 11:58 Henning Assigned To Henning => aaron
2012-05-05 11:58 Henning Note Added: 0000036
2012-05-05 11:58 Henning Status assigned => feedback
2012-05-05 15:22 hans Note Added: 0000045
2012-05-05 15:22 hans Status feedback => assigned
2012-05-05 15:49 Henning Status assigned => resolved
2012-05-05 15:49 Henning Resolution open => fixed


Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker