Skip to content

Commit

Permalink
Fixed bug 3752 - minor os2 defines
Browse files Browse the repository at this point in the history
Ozkan Sezer

Attached three patches, so these minor os/2 bits get registered mainstream:

1. SDL_syswm.h: add SDL_SYSWM_OS2 to SDL_SYSWM_TYPE enum
2. SDL_platform.h: recognize __EMX__ too as __OS2__
3. begin_code.h: set SDLCALL as _System for OS/2.
  • Loading branch information
slouken committed Aug 14, 2017
1 parent 2bf7bf2 commit c350d91
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/SDL_platform.h
Expand Up @@ -97,7 +97,7 @@
#undef __OPENBSD__
#define __OPENBSD__ 1
#endif
#if defined(__OS2__)
#if defined(__OS2__) || defined(__EMX__)
#undef __OS2__
#define __OS2__ 1
#endif
Expand Down
3 changes: 2 additions & 1 deletion include/SDL_syswm.h
Expand Up @@ -125,7 +125,8 @@ typedef enum
SDL_SYSWM_MIR,
SDL_SYSWM_WINRT,
SDL_SYSWM_ANDROID,
SDL_SYSWM_VIVANTE
SDL_SYSWM_VIVANTE,
SDL_SYSWM_OS2
} SDL_SYSWM_TYPE;

/**
Expand Down
11 changes: 11 additions & 0 deletions include/begin_code.h
Expand Up @@ -61,6 +61,12 @@
# else
# define DECLSPEC __declspec(dllexport)
# endif
# elif defined(__OS2__) && defined(__WATCOMC__)
# ifdef BUILD_SDL
# define DECLSPEC __declspec(dllexport)
# else
# define DECLSPEC
# endif
# else
# if defined(__GNUC__) && __GNUC__ >= 4
# define DECLSPEC __attribute__ ((visibility("default")))
Expand All @@ -74,6 +80,11 @@
#ifndef SDLCALL
#if (defined(__WIN32__) || defined(__WINRT__)) && !defined(__GNUC__)
#define SDLCALL __cdecl
#elif defined(__OS2__) || defined(__EMX__)
#define SDLCALL _System
# if defined (__GNUC__) && !defined(_System)
# define _System /* for old EMX/GCC compat. */
# endif
#else
#define SDLCALL
#endif
Expand Down

0 comments on commit c350d91

Please sign in to comment.