Summary: | MesaGLUT missing Fortran callbacks | ||
---|---|---|---|
Product: | Mesa | Reporter: | Bill Mitchell <william.mitchell> |
Component: | GLUT | Assignee: | mesa-dev |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Bill Mitchell
2007-09-12 08:48:46 UTC
Who calls __glutSetFCB and __glutGetFCB? The application? gcc issues a lot of warnings when compiling this file: glut_fbc.c: In function ‘__glutSetFCB’: glut_fbc.c:27: warning: ISO C forbids conversion of object pointer to function pointer type glut_fbc.c:30: warning: ISO C forbids conversion of object pointer to function pointer type etc. If we changed the parameter (and return type) of those functions to GLUTproc it would silence the errors, but I don't know that'd effect the Fortran ABI. Any ideas? __glutSetFCB and __glutGetFCB are called by f90gl. The use of the Set function is (for example): void APIENTRY fglutDisplayFunc(GLUTdisplayFCBUSR display) { __glutSetFCB(GLUT_TMP_DISPLAY,(void *)display); glutDisplayFunc(fortranDisplayWrapper); } and the use of the Get function is: void GLUTCALLBACK fortranDisplayWrapper(void) { ((GLUTdisplayFCBUSR)__glutGetFCB(GLUT_TMP_DISPLAY))(); } If that doesn't tell you enough about whether the change is safe, I can fill in more of the details, or you can look at the source in cwrapglt.c in the f90gl distribution at http://math.nist.gov/f90gl commit 39fc89a24e778f3ff6d92e8513b652a6c598370e Author: Brian <brian.paul@tungstengraphics.com> Date: Wed Sep 12 13:40:15 2007 -0600 Add glut_fcb.c to the build and update to fix warnings (see bug 12405) |
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.