File n_Use-newly-introduced-GLAPIVAR-for-variables.patch of Package libGLw.21391

From: Egbert Eich <eich@suse.de>
Date: Fri Mar 11 14:04:00 2016 +0100
Subject: [PATCH]Use newly introduced GLAPIVAR for variables
Patch-mainline: never
Git-commit: 7fe20b98de84fad7330cb509cb50a39a390c7314

References: bsc#970725, boo#1082297
Signed-off-by: Egbert Eich <eich@suse.com>

GLAPI doesn't have an 'extern' in some circumstances.
This way, variable declarations become definitions.

Signed-off-by: Egbert Eich <eich@suse.de>
---
 GLwDrawA.h  | 4 ++--
 GLwDrawAP.h | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

Index: glw-8.0.0/GLwDrawA.h
===================================================================
--- glw-8.0.0.orig/GLwDrawA.h
+++ glw-8.0.0/GLwDrawA.h
@@ -131,12 +131,20 @@
 #define GLwNaccumAlphaSize	"accumAlphaSize"
 #define GLwCAccumAlphaSize	"AccumAlphaSize"
 
+#if (defined(__GNUC__) && __GNUC__ >= 4) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
+#  define GLAPIVAR extern __attribute__((visibility("default")))
+#endif
+
+#ifndef GLAPIVAR
+#define GLAPIVAR extern
+#endif
+
 #ifdef __GLX_MOTIF
 
 typedef struct _GLwMDrawingAreaClassRec	*GLwMDrawingAreaWidgetClass;
 typedef struct _GLwMDrawingAreaRec	*GLwMDrawingAreaWidget;
 
-GLAPI WidgetClass glwMDrawingAreaWidgetClass;
+GLAPIVAR WidgetClass glwMDrawingAreaWidgetClass;
 
 
 #else 
@@ -144,7 +152,7 @@ GLAPI WidgetClass glwMDrawingAreaWidgetC
 typedef struct _GLwDrawingAreaClassRec	*GLwDrawingAreaWidgetClass;
 typedef struct _GLwDrawingAreaRec	*GLwDrawingAreaWidget;
 
-GLAPI WidgetClass glwDrawingAreaWidgetClass;
+GLAPIVAR WidgetClass glwDrawingAreaWidgetClass;
 
 
 #endif
Index: glw-8.0.0/GLwDrawAP.h
===================================================================
--- glw-8.0.0.orig/GLwDrawAP.h
+++ glw-8.0.0/GLwDrawAP.h
@@ -59,7 +59,7 @@ typedef struct _GLwMDrawingAreaClassRec
   } GLwMDrawingAreaClassRec;
 
 
-GLAPI GLwMDrawingAreaClassRec glwMDrawingAreaClassRec;
+GLAPIVAR GLwMDrawingAreaClassRec glwMDrawingAreaClassRec;
 
 
 /* XT */
@@ -70,7 +70,7 @@ typedef struct _GLwDrawingAreaClassRec {
   GLwDrawingAreaClassPart     glwDrawingArea_class;
   } GLwDrawingAreaClassRec;
 
-GLAPI GLwDrawingAreaClassRec glwDrawingAreaClassRec;
+GLAPIVAR GLwDrawingAreaClassRec glwDrawingAreaClassRec;
 
 
 #endif 
openSUSE Build Service is sponsored by