Bug 18952 - GL/glut.h cannot be safely used from C++
GL/glut.h cannot be safely used from C++
Product: Red Hat Linux
Classification: Retired
Component: Mesa (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Bernhard Rosenkraenzer
Aaron Brown
Depends On:
  Show dependency treegraph
Reported: 2000-10-12 08:30 EDT by Daniel Thompson
Modified: 2007-04-18 12:29 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2000-10-12 08:31:02 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Daniel Thompson 2000-10-12 08:30:58 EDT
stdlib.h contains a prototype for the exit() function. If included from C++
this prototype defines exceptions that can be thrown by exit.

GL/glut.h also prototypes exit() (together with reams of comments
explaining why they had to do such a stupid thing). This is quite safe from
C as stdlib.h contains a normal prototype. Sadly for C++ the prototypes
conflict and gcc generates an error.

Compiling tuxracer (0.60.1) will demonstate this problem should
reproduction prove difficult. I worked around by removing the prototype
from glut.h but obviously this may impact other areas.
Comment 1 Bernhard Rosenkraenzer 2000-10-12 08:52:34 EDT
We've noticed (and fixed) this a couple of days ago; it's fixed in 3.3-7.
Until the package appears in Rawhide, you can download it at

Note You need to log in before you can comment on or make changes to this bug.