Bug 18952

Summary: GL/glut.h cannot be safely used from C++
Product: [Retired] Red Hat Linux Reporter: Daniel Thompson <d.thompson>
Component: MesaAssignee: Bernhard Rosenkraenzer <bero>
Status: CLOSED RAWHIDE QA Contact: Aaron Brown <abrown>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-10-12 12:31:02 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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/