SDL_internal.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*
  2. Simple DirectMedia Layer
  3. Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
  4. This software is provided 'as-is', without any express or implied
  5. warranty. In no event will the authors be held liable for any damages
  6. arising from the use of this software.
  7. Permission is granted to anyone to use this software for any purpose,
  8. including commercial applications, and to alter it and redistribute it
  9. freely, subject to the following restrictions:
  10. 1. The origin of this software must not be misrepresented; you must not
  11. claim that you wrote the original software. If you use this software
  12. in a product, an acknowledgment in the product documentation would be
  13. appreciated but is not required.
  14. 2. Altered source versions must be plainly marked as such, and must not be
  15. misrepresented as being the original software.
  16. 3. This notice may not be removed or altered from any source distribution.
  17. */
  18. #ifndef SDL_internal_h_
  19. #define SDL_internal_h_
  20. /* Many of SDL's features require _GNU_SOURCE on various platforms */
  21. #ifndef _GNU_SOURCE
  22. #define _GNU_SOURCE
  23. #endif
  24. /* This is for a variable-length array at the end of a struct:
  25. struct x { int y; char z[SDL_VARIABLE_LENGTH_ARRAY]; };
  26. Use this because GCC 2 needs different magic than other compilers. */
  27. #if (defined(__GNUC__) && (__GNUC__ <= 2)) || defined(__CC_ARM)
  28. #define SDL_VARIABLE_LENGTH_ARRAY 1
  29. #else
  30. #define SDL_VARIABLE_LENGTH_ARRAY
  31. #endif
  32. #include "dynapi/SDL_dynapi.h"
  33. #if SDL_DYNAMIC_API
  34. #include "dynapi/SDL_dynapi_overrides.h"
  35. /* force DECLSPEC and SDLCALL off...it's all internal symbols now.
  36. These will have actual #defines during SDL_dynapi.c only */
  37. #define DECLSPEC
  38. #define SDLCALL
  39. #endif
  40. #include "SDL_config.h"
  41. #endif /* SDL_internal_h_ */
  42. /* vi: set ts=4 sw=4 expandtab: */