You can't have an empty union in the structure...
authorSam Lantinga <slouken@libsdl.org>
Thu, 20 Jan 2011 18:09:55 -0800
changeset 50635680976fb37a
parent 5062 e8916fe9cfc8
child 5064 eae20af0b983
You can't have an empty union in the structure...
include/SDL_syswm.h
     1.1 --- a/include/SDL_syswm.h	Thu Jan 20 18:04:05 2011 -0800
     1.2 +++ b/include/SDL_syswm.h	Thu Jan 20 18:09:55 2011 -0800
     1.3 @@ -125,28 +125,27 @@
     1.4              WPARAM wParam;              /**< WORD message parameter */
     1.5              LPARAM lParam;              /**< LONG message parameter */
     1.6          } win;
     1.7 -#endif
     1.8 -#if defined(SDL_VIDEO_DRIVER_X11)
     1.9 +#elif defined(SDL_VIDEO_DRIVER_X11)
    1.10          struct {
    1.11              XEvent event;
    1.12          } x11;
    1.13 -#endif
    1.14 -#if defined(SDL_VIDEO_DRIVER_DIRECTFB)
    1.15 +#elif defined(SDL_VIDEO_DRIVER_DIRECTFB)
    1.16          struct {
    1.17              DFBEvent event;
    1.18          } dfb;
    1.19 -#endif
    1.20 -#if defined(SDL_VIDEO_DRIVER_COCOA)
    1.21 +#elif defined(SDL_VIDEO_DRIVER_COCOA)
    1.22          struct
    1.23          {
    1.24              /* No Cocoa window events yet */
    1.25          } cocoa;
    1.26 -#endif
    1.27 -#if defined(SDL_VIDEO_DRIVER_UIKIT)
    1.28 +#elif defined(SDL_VIDEO_DRIVER_UIKIT)
    1.29          struct
    1.30          {
    1.31              /* No UIKit window events yet */
    1.32          } uikit;
    1.33 +else
    1.34 +        /* Can't have an empty union */
    1.35 +        int dummy;
    1.36  #endif
    1.37      } msg;
    1.38  };
    1.39 @@ -168,33 +167,32 @@
    1.40          {
    1.41              HWND window;                /**< The window handle */
    1.42          } win;
    1.43 -#endif
    1.44 -#if defined(SDL_VIDEO_DRIVER_X11)
    1.45 +#elif defined(SDL_VIDEO_DRIVER_X11)
    1.46          struct
    1.47          {
    1.48              Display *display;           /**< The X11 display */
    1.49              Window window;              /**< The X11 window */
    1.50          } x11;
    1.51 -#endif
    1.52 -#if defined(SDL_VIDEO_DRIVER_DIRECTFB)
    1.53 +#elif defined(SDL_VIDEO_DRIVER_DIRECTFB)
    1.54          struct
    1.55          {
    1.56              IDirectFB *dfb;             /**< The directfb main interface */
    1.57              IDirectFBWindow *window;    /**< The directfb window handle */
    1.58              IDirectFBSurface *surface;  /**< The directfb client surface */
    1.59          } dfb;
    1.60 -#endif
    1.61 -#if defined(SDL_VIDEO_DRIVER_COCOA)
    1.62 +#elif defined(SDL_VIDEO_DRIVER_COCOA)
    1.63          struct
    1.64          {
    1.65              NSWindow *window;           /* The Cocoa window */
    1.66          } cocoa;
    1.67 -#endif
    1.68 -#if defined(SDL_VIDEO_DRIVER_UIKIT)
    1.69 +#elif defined(SDL_VIDEO_DRIVER_UIKIT)
    1.70          struct
    1.71          {
    1.72              UIWindow *window;           /* The UIKit window */
    1.73          } uikit;
    1.74 +#else
    1.75 +        /* Can't have an empty union */
    1.76 +        int dummy;
    1.77  #endif
    1.78      } info;
    1.79  };