game-music-emu: Merged in visibility_cxx (pull request #44)

From a53553adef6b9d54d302273f239d52286ef2adc0 Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Wed, 4 Oct 2023 15:51:56 +0300
Subject: [PATCH 1/2] remove __cplusplus condition from BLARGG_EXPORT
 visibility defininion.

This cannot lead to problems, because:
(1) blargg_source.h is not a public header anymore, and
(2) the definition is additionally guarded by `LIBGME_VISIBILITY`, which
is a private libgme symbol only defined during build of libgme itself.
---
 gme/blargg_source.h | 2 +-
 gme/gme.h           | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/gme/blargg_source.h b/gme/blargg_source.h
index deea918..acf9204 100644
--- a/gme/blargg_source.h
+++ b/gme/blargg_source.h
@@ -70,7 +70,7 @@ typedef unsigned char byte;
         #else
             #define BLARGG_EXPORT /* Leave blank: friendly with both static and shared linking */
         #endif
-    #elif defined (LIBGME_VISIBILITY) && defined(__cplusplus)
+    #elif defined (LIBGME_VISIBILITY)
         #define BLARGG_EXPORT __attribute__((visibility ("default")))
     #else
         #define BLARGG_EXPORT
diff --git a/gme/gme.h b/gme/gme.h
index 6920c73..25ffa54 100644
--- a/gme/gme.h
+++ b/gme/gme.h
@@ -23,9 +23,9 @@ typedef struct Music_Emu Music_Emu;
         #if defined(BLARGG_BUILD_DLL)
             #define BLARGG_EXPORT __declspec(dllexport)
         #else
-            #define BLARGG_EXPORT /* Leave blank: friendly with both static and shared linking */
+            #define BLARGG_EXPORT /* Leave blank: friendly with both static and shared linking. */
         #endif
-    #elif defined (LIBGME_VISIBILITY) && defined(__cplusplus)
+    #elif defined (LIBGME_VISIBILITY)
         #define BLARGG_EXPORT __attribute__((visibility ("default")))
     #else
         #define BLARGG_EXPORT

From 635661b6a51eea3bfd7e49c4cbfabbfee61b162a Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <sezeroz@gmail.com>
Date: Wed, 4 Oct 2023 15:56:50 +0300
Subject: [PATCH 2/2] blargg_source.h: remove duplicated BLARGG_EXPORT defines

they are only needed in gme.cpp/gme.h, and aren't needed
here anymore.
---
 gme/blargg_source.h | 15 ---------------
 1 file changed, 15 deletions(-)

diff --git a/gme/blargg_source.h b/gme/blargg_source.h
index acf9204..d03b094 100644
--- a/gme/blargg_source.h
+++ b/gme/blargg_source.h
@@ -62,21 +62,6 @@
 #define byte byte_
 typedef unsigned char byte;
 
-/* Setup compiler defines useful for exporting required public API symbols in gme.cpp */
-#ifndef BLARGG_EXPORT
-    #if defined (_WIN32)
-        #if defined(BLARGG_BUILD_DLL)
-            #define BLARGG_EXPORT __declspec(dllexport)
-        #else
-            #define BLARGG_EXPORT /* Leave blank: friendly with both static and shared linking */
-        #endif
-    #elif defined (LIBGME_VISIBILITY)
-        #define BLARGG_EXPORT __attribute__((visibility ("default")))
-    #else
-        #define BLARGG_EXPORT
-    #endif
-#endif
-
 /* deprecated */
 #define BLARGG_CHECK_ALLOC CHECK_ALLOC
 #define BLARGG_RETURN_ERR RETURN_ERR