-
Notifications
You must be signed in to change notification settings - Fork 18
dumb down our CPP so that it works in both traditional and ansi modes #22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I don't think that the CL is completely correct: We need another argument for the stringification of _entry, otherwise all error messages will be wrong. |
@mchakravarty I couldn't get the Briefly: If we use |
@dagit Why is it important to use the same CPP as GHC? Besides, GHC just uses configure's So, why not just use |
Matching up the CPP versions is not a big deal for our uses here. I imagine it could become unhygienic if you're doing something low-level with FFI details and Does cabal define If I could just disable Keep in mind, we would like to switch to autogenerating these files from the specification (and someone made a prototype). Once we do that, we could eliminate this part of CPP easily. |
Without autoconf, it is harder... |
Indeed all complicated parts of the CPP can be done by such a generator (and my prototype does so). Though we would still need CPP for the different calling conventions, which is, fortunately, far more simple that this. |
@mchakravarty I was wrong about the CPP version skew. It looks like ghc is using this flag:
I think that means it's not actually possible to depend on implementation details and existing |
@dagit Yes, it definitely uses |
dumb down our CPP so that it works in both traditional and ansi modes
Thank you! |
I've updated the OpenGLRaw, GLURaw and GLUT packages, they should build out of the box on Mac OS X, too. Could somebody please verify this? I've tested things on Linux and Windows, so it would be nice to hear from the Mac side. If everything is fine, I'll release new package versions and try to get these into the upcoming platform. |
I grabbed the current repos for all three packages and build them on OS X 10.9 (Mavericks) with GHC 7.8 using Cabal 1.18. Worked without a hitch. Thanks for the update. |
I also did a run with GHC 7.6.3 (using my version of the Xcode 5 fix http://justtesting.org/post/64947952690/the-glasgow-haskell-compiler-ghc-on-os-x-10-9). It's also fine. |
Worked for me on OS X 10.9, GHC 7.8.3 and Cabal 1.20 👍 |
This patch looks big and onerous but you really only need to understand the changes in HsOpenGLRaw.h. Everything else is just an automatic change that could be done with sed (I used vim macros) to add the two new parameters to
EXTENSION_ENTRY
everywhere it's used.I tested the changes on:
While this change is not optimal, I think it's a reasonable compromise that lets us fix #18 and #21.