glx: Don't enclose includes inside `extern "C" { }`.
authorJose Fonseca <jfonseca@vmware.com>
Tue, 26 Apr 2016 18:48:12 +0000 (19:48 +0100)
committerJose Fonseca <jfonseca@vmware.com>
Tue, 26 Apr 2016 20:28:34 +0000 (21:28 +0100)
Ran `make check` inside src/glx to verify everything compiles and links
correctly.

https://bugs.freedesktop.org/show_bug.cgi?id=95158

Reviewed-by: Brian Paul <brianp@vmware.com>
src/glx/dri2_priv.h
src/glx/glx_error.h
src/glx/glxclient.h
src/glx/glxextensions.h
src/glx/tests/clientinfo_unittest.cpp
src/glx/tests/create_context_unittest.cpp
src/glx/tests/fake_glx_screen.h
src/glx/tests/query_renderer_implementation_unittest.cpp
src/glx/tests/query_renderer_unittest.cpp

index e81b1bf416d933f213413779f383967168afd4b3..8a640728ec7316465d2d10e66aa83faded904d2f 100644 (file)
  *   Kristian Høgsberg (krh@redhat.com)
  */
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct dri2_screen {
    struct glx_screen base;
 
@@ -74,3 +78,7 @@ _X_HIDDEN int
 dri2_interop_export_object(struct glx_context *ctx,
                            const mesa_glinterop_export_in *in,
                            mesa_glinterop_export_out *out);
+
+#ifdef __cplusplus
+}
+#endif
index eaf6b814c5e46b4a198d1979c2ed3c1c2aea84ce..5d3992672e00c869cca01e0bf7db5a731073a211 100644 (file)
 #include <X11/Xlib.h>
 #include <xcb/xcb.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 void __glXSendError(Display * dpy, int_fast8_t errorCode,
                    uint_fast32_t resourceID, uint_fast16_t minorCode,
                    bool coreX11error);
 
 _X_HIDDEN void __glXSendErrorForXcb(Display * dpy,
                                    const xcb_generic_error_t *err);
+
+#ifdef __cplusplus
+}
+#endif
index 7a249281081d0319eb5242f47d52c44e4f25e2eb..141e46a31cda51d84cf5f65d879d081e70bcc749 100644 (file)
 #include "glxextensions.h"
 
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
 #define GLX_MAJOR_VERSION 1       /* current version numbers */
 #define GLX_MINOR_VERSION 4
 
@@ -824,4 +829,8 @@ indirect_create_context_attribs(struct glx_screen *base,
                                 const uint32_t *attribs,
                                 unsigned *error);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* !__GLX_client_h__ */
index 906b3fc16c04fa1932d86ffda9d088076fae0f09..743ed97fec3bb678836389dee50adec47412fa2d 100644 (file)
 #ifndef GLX_GLXEXTENSIONS_H
 #define GLX_GLXEXTENSIONS_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 enum
 {
    ARB_create_context_bit = 0,
@@ -303,4 +307,8 @@ typedef void (*PFNGLXDISABLEEXTENSIONPROC) (const char *name);
 # endif /* __GNUC__ */
 #endif /* GLX_NO_STATIC_EXTENSION_FUNCTIONS */
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* GLX_GLXEXTENSIONS_H */
index b56c94be42e864fbec52e4354f774cfd76f06f49..320e8fcc0ac0f6bfce0d69fd76e1d94ba17b1d90 100644 (file)
@@ -23,9 +23,7 @@
 #include <gtest/gtest.h>
 #include <string.h>
 
-extern "C" {
 #include "glxclient.h"
-}
 
 #include <xcb/glx.h>
 
index 819b0b27dc04add38670538240253afbf09808f4..a2590589db2d8087cb584e686daa17a4c45d7f07 100644 (file)
 #include <gtest/gtest.h>
 #include <string.h>
 
-extern "C" {
 #include "glxclient.h"
 #include "glx_error.h"
-}
 
 #include <xcb/glx.h>
 #include "mock_xdisplay.h"
index 0249e79bcfffded138cc60d175cdf515dbb7d0e9..39b250ffc8fadb52c402f6232a54290ae524adb0 100644 (file)
@@ -20,9 +20,7 @@
  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  * DEALINGS IN THE SOFTWARE.
  */
-extern "C" {
 #include "glxclient.h"
-};
 
 class fake_glx_screen : public glx_screen {
 public:
index 7f8f3018640fbea60723589bcc9033fe3c2c8b6a..c3f5cc7214ac037fe392242b460964d4b39abcd6 100644 (file)
 
 #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
 
-extern "C" {
 #include "glxclient.h"
 #include "glx_error.h"
 #include "dri2.h"
 #include "dri_interface.h"
 #include "dri2_priv.h"
-}
 
 struct attribute_test_vector {
    const char *glx_string;
index 2f3c4ef12eac30582f440a78016969c548c786c0..dc88cc94f49e7d673bf368826fde7f5394deb8dd 100644 (file)
 #include <signal.h>
 #include <setjmp.h>
 
-extern "C" {
 #include "glxclient.h"
 #include "glx_error.h"
-}
 
 extern bool GetGLXScreenConfigs_called;
 extern struct glx_screen *psc;