Bug 18952 - GL/glut.h cannot be safely used from C++
Summary: GL/glut.h cannot be safely used from C++
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: Mesa
Version: 7.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bernhard Rosenkraenzer
QA Contact: Aaron Brown
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-10-12 12:30 UTC by Daniel Thompson
Modified: 2007-04-18 16:29 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2000-10-12 12:31:02 UTC
Embargoed:


Attachments (Terms of Use)

Description Daniel Thompson 2000-10-12 12:30:58 UTC
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 12:52:34 UTC
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
http://www.linux-easy.com/rh-updates/


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