From a170c957872875eb43756fb3a676a185802165bb Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Thu, 16 Jan 2014 15:38:06 +0000 Subject: Better way to force linking of Fl_Gl_Device_Plugin.o whenever Fl_Gl_Window.o is linked, that doesn't use the "volatile" attribute (suggested by Albrecht). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10063 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Gl_Window.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/Fl_Gl_Window.cxx b/src/Fl_Gl_Window.cxx index 8e179a6a3..f5b41a2a0 100644 --- a/src/Fl_Gl_Window.cxx +++ b/src/Fl_Gl_Window.cxx @@ -24,8 +24,6 @@ extern int fl_gl_load_plugin; extern void gl_texture_reset(); #endif -static volatile int temp = fl_gl_load_plugin; // don't remove me! I force linking of Fl_Gl_Device_Plugin.o - #include #include #ifdef __APPLE__ @@ -575,6 +573,11 @@ int Fl_Gl_Window::handle(int event) return Fl_Window::handle(event); } +// don't remove me! this serves only to force linking of Fl_Gl_Device_Plugin.o +int Fl_Gl_Window::gl_plugin_linkage() { + return fl_gl_load_plugin; +} + // // End of "$Id$". // -- cgit v1.2.3