Linux compile fix for freeglut rev. 830

View: New views
2 Messages — Rating Filter:   Alert me  

Linux compile fix for freeglut rev. 830

by Florian Echtler-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello again,

I've just noticed that freeglut rev. 830 doesn't build on my system.
This is because the newly added __glutExitFunc stuff is wrapped with

#ifdef TARGET_HOST_MS_WINDOWS

instead of

#if TARGET_HOST_MS_WINDOWS

I've attached a patch to fix this.

Yours, Florian
--
0666 - Filemode of the Beast

[patch]

Index: src/freeglut_init.c
===================================================================
--- src/freeglut_init.c (Revision 830)
+++ src/freeglut_init.c (Arbeitskopie)
@@ -854,7 +854,7 @@
     }
 }
 
-#ifdef TARGET_HOST_MS_WINDOWS
+#if TARGET_HOST_MS_WINDOWS
 void (__cdecl *__glutExitFunc)( int return_value ) = NULL;
 
 void FGAPIENTRY __glutInitWithExit( int *pargc, char **argv, void (__cdecl *exit_function)(int) )
Index: src/freeglut_menu.c
===================================================================
--- src/freeglut_menu.c (Revision 830)
+++ src/freeglut_menu.c (Arbeitskopie)
@@ -779,7 +779,7 @@
     return fgCreateMenu( callback )->ID;
 }
 
-#ifdef TARGET_HOST_MS_WINDOWS
+#if TARGET_HOST_MS_WINDOWS
 int FGAPIENTRY __glutCreateMenuWithExit( void(* callback)( int ), void (__cdecl *exit_function)(int) )
 {
   __glutExitFunc = exit_function;
Index: src/freeglut_window.c
===================================================================
--- src/freeglut_window.c (Revision 830)
+++ src/freeglut_window.c (Arbeitskopie)
@@ -1093,7 +1096,7 @@
                            GL_FALSE, GL_FALSE )->ID;
 }
 
-#ifdef TARGET_HOST_MS_WINDOWS
+#if TARGET_HOST_MS_WINDOWS
 int FGAPIENTRY __glutCreateWindowWithExit( const char *title, void (__cdecl *exit_function)(int) )
 {
   __glutExitFunc = exit_function;
Index: src/freeglut_internal.h
===================================================================
--- src/freeglut_internal.h (Revision 830)
+++ src/freeglut_internal.h (Arbeitskopie)
@@ -953,7 +953,7 @@
 
 SFG_Proc fghGetProcAddress( const char *procName );
 
-#ifdef TARGET_HOST_MS_WINDOWS
+#if TARGET_HOST_MS_WINDOWS
 extern void (__cdecl *__glutExitFunc)( int return_value );
 #endif
 


------------------------------------------------------------------------------

_______________________________________________
Freeglut-developer mailing list
Freeglut-developer@...
https://lists.sourceforge.net/lists/listinfo/freeglut-developer

Parent Message unknown Re: Linux compile fix for freeglut rev. 830

by John F. Fay :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Florian,

        Sven Panne just fixed that yesterday.

        Are there any other things standing between us and Release Candidate 2?

                - John


-----Original Message-----
From: Florian Echtler
Sent: Friday, July 24, 2009 3:27 AM
To: freeglut-developer@...
Subject: [Freeglut-developer] Linux compile fix for freeglut rev. 830

Hello again,

I've just noticed that freeglut rev. 830 doesn't build on my system.
This is because the newly added __glutExitFunc stuff is wrapped with

#ifdef TARGET_HOST_MS_WINDOWS

instead of

#if TARGET_HOST_MS_WINDOWS

I've attached a patch to fix this.

Yours, Florian
--
0666 - Filemode of the Beast
 << File: patch; charset = UTF-8 >>  << File: ATT00212.txt >>  << File: ATT00213.txt >>


------------------------------------------------------------------------------
_______________________________________________
Freeglut-developer mailing list
Freeglut-developer@...
https://lists.sourceforge.net/lists/listinfo/freeglut-developer