changeset 5063:5680976fb37a

You can't have an empty union in the structure...
author Sam Lantinga <slouken@libsdl.org>
date Thu, 20 Jan 2011 18:09:55 -0800
parents e8916fe9cfc8
children eae20af0b983
files include/SDL_syswm.h
diffstat 1 files changed, 14 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/include/SDL_syswm.h	Thu Jan 20 18:04:05 2011 -0800
+++ b/include/SDL_syswm.h	Thu Jan 20 18:09:55 2011 -0800
@@ -125,28 +125,27 @@
             WPARAM wParam;              /**< WORD message parameter */
             LPARAM lParam;              /**< LONG message parameter */
         } win;
-#endif
-#if defined(SDL_VIDEO_DRIVER_X11)
+#elif defined(SDL_VIDEO_DRIVER_X11)
         struct {
             XEvent event;
         } x11;
-#endif
-#if defined(SDL_VIDEO_DRIVER_DIRECTFB)
+#elif defined(SDL_VIDEO_DRIVER_DIRECTFB)
         struct {
             DFBEvent event;
         } dfb;
-#endif
-#if defined(SDL_VIDEO_DRIVER_COCOA)
+#elif defined(SDL_VIDEO_DRIVER_COCOA)
         struct
         {
             /* No Cocoa window events yet */
         } cocoa;
-#endif
-#if defined(SDL_VIDEO_DRIVER_UIKIT)
+#elif defined(SDL_VIDEO_DRIVER_UIKIT)
         struct
         {
             /* No UIKit window events yet */
         } uikit;
+else
+        /* Can't have an empty union */
+        int dummy;
 #endif
     } msg;
 };
@@ -168,33 +167,32 @@
         {
             HWND window;                /**< The window handle */
         } win;
-#endif
-#if defined(SDL_VIDEO_DRIVER_X11)
+#elif defined(SDL_VIDEO_DRIVER_X11)
         struct
         {
             Display *display;           /**< The X11 display */
             Window window;              /**< The X11 window */
         } x11;
-#endif
-#if defined(SDL_VIDEO_DRIVER_DIRECTFB)
+#elif defined(SDL_VIDEO_DRIVER_DIRECTFB)
         struct
         {
             IDirectFB *dfb;             /**< The directfb main interface */
             IDirectFBWindow *window;    /**< The directfb window handle */
             IDirectFBSurface *surface;  /**< The directfb client surface */
         } dfb;
-#endif
-#if defined(SDL_VIDEO_DRIVER_COCOA)
+#elif defined(SDL_VIDEO_DRIVER_COCOA)
         struct
         {
             NSWindow *window;           /* The Cocoa window */
         } cocoa;
-#endif
-#if defined(SDL_VIDEO_DRIVER_UIKIT)
+#elif defined(SDL_VIDEO_DRIVER_UIKIT)
         struct
         {
             UIWindow *window;           /* The UIKit window */
         } uikit;
+#else
+        /* Can't have an empty union */
+        int dummy;
 #endif
     } info;
 };