diff options
| author | Manolo Gouy <Manolo> | 2014-01-16 15:38:06 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2014-01-16 15:38:06 +0000 |
| commit | a170c957872875eb43756fb3a676a185802165bb (patch) | |
| tree | e0459acabfb451518f6940440c7bcd02d10de020 | |
| parent | b849a1d2d9c5eb76bccebe4f48716db15933e135 (diff) | |
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
| -rw-r--r-- | FL/Fl_Gl_Window.H | 1 | ||||
| -rw-r--r-- | src/Fl_Gl_Window.cxx | 7 |
2 files changed, 6 insertions, 2 deletions
diff --git a/FL/Fl_Gl_Window.H b/FL/Fl_Gl_Window.H index d92dc04f2..47fe04939 100644 --- a/FL/Fl_Gl_Window.H +++ b/FL/Fl_Gl_Window.H @@ -70,6 +70,7 @@ class FL_EXPORT Fl_Gl_Window : public Fl_Window { static int can_do(int, const int *); int mode(int, const int *); + static int gl_plugin_linkage(); public: 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 <FL/Fl.H> #include <FL/x.H> #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$". // |
