gl.h and osmesa.h define PRAGMA_EXPORT_SUPPORTED and then use "pragma export on", "pragma export off" if that is defined. #if (defined(__BEOS__) && defined(__POWERPC__)) || defined(__QUICKDRAW__) # define PRAGMA_EXPORT_SUPPORTED 1 #endif On my mac, this ends up being true somehow (I suppose something ends up defining __QUICKDRAW__), and then clang warns ../../third_party/mesa/src/include/GL/gl.h:124:9: warning: unknown pragma ignored [-Wunknown-pragmas] #pragma export on ^ It looks like this is only used for old platforms, so I'd suggest just removing the whole "pragma export" stuff.
Yup, Quickdraw.h defines __QUICKDRAW__. The header gets pulled in like this (with the 10.8 sdk): ..... /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h ...... /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers/QD.h ....... /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers/Quickdraw.h
(Clarification: gl.h defines PRAGMA_EXPORT_SUPPORTED; osmesa.h uses "pragma export" directly if __QUICKDRAW__ is defined)
Created attachment 97758 [details] [review] patch Here's how a patch to remove this might look. I removed "pragma import" too -- while this doesn't cause warnings, it looks like this was used only on very old versions on OS X.
The patch looks OK to me. I'm always happy to get rid of old system-specific crud. But I can't apply the patch here to test it: $ patch -p0 < ~/mesaport.diff patching file include/GL/gl.h patch: **** malformed patch at line 16: @@ -92,10 +87,6 @@ Do I need a special option for patch?
Created attachment 97921 [details] [review] patch Oh sorry. I had manually edited the patch as it was relative to our slightly forked mesa -- always a bad idea :-) Here's the same patch relative to an earlier revision of ours, which should hopefully apply cleanly (or at least enable patch to read it.) (Thanks for the quick turnaround!)
The new patch still doesn't apply to master. But I've posted a patch with the same intention to the mailing list for review.
Fixed in commit 50034c017125b9538cd1e88b7344574da5bf3c9a
Thank you!
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.