jack2 codebase
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

86 lines
2.7KB

  1. /*
  2. Copyright (C) 2004-2009 Grame
  3. This program is free software; you can redistribute it and/or modify
  4. it under the terms of the GNU Lesser General Public License as published by
  5. the Free Software Foundation; either version 2.1 of the License, or
  6. (at your option) any later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with this program; if not, write to the Free Software
  13. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  14. */
  15. #ifndef __jack_systemdeps_h__
  16. #define __jack_systemdeps_h__
  17. #if defined(WIN32) && !defined(__CYGWIN__) && !defined(GNU_WIN32)
  18. #include <windows.h>
  19. #ifdef _MSC_VER /* Microsoft compiler */
  20. #define __inline__ inline
  21. #if (!defined(int8_t) && !defined(_STDINT_H))
  22. #define __int8_t_defined
  23. typedef char int8_t;
  24. typedef unsigned char uint8_t;
  25. typedef short int16_t;
  26. typedef unsigned short uint16_t;
  27. typedef long int32_t;
  28. typedef unsigned long uint32_t;
  29. typedef LONGLONG int64_t;
  30. typedef ULONGLONG uint64_t;
  31. #endif
  32. #elif __MINGW32__ /* MINGW */
  33. #include <stdint.h>
  34. #include <sys/types.h>
  35. #else /* other compilers ...*/
  36. #include <inttypes.h>
  37. #include <pthread.h>
  38. #include <sys/types.h>
  39. #endif
  40. #if !defined(_PTHREAD_H) && !defined(PTHREAD_WIN32)
  41. /**
  42. * to make jack API independent of different thread implementations,
  43. * we define jack_native_thread_t to HANDLE here.
  44. */
  45. typedef HANDLE jack_native_thread_t;
  46. #else
  47. #ifdef PTHREAD_WIN32 // Added by JE - 10-10-2011
  48. #include <ptw32/pthread.h> // Makes sure we #include the ptw32 version !
  49. #endif
  50. /**
  51. * to make jack API independent of different thread implementations,
  52. * we define jack_native_thread_t to pthread_t here.
  53. */
  54. typedef pthread_t jack_native_thread_t;
  55. #endif
  56. #endif // WIN32 && !__CYGWIN__ && !GNU_WIN32 */
  57. #if defined(__APPLE__) || defined(__linux__) || defined(__sun__) || defined(sun) || defined(__unix__) || defined(__CYGWIN__) || defined(GNU_WIN32)
  58. #if defined(__CYGWIN__) || defined(GNU_WIN32)
  59. #include <stdint.h>
  60. #endif
  61. #include <inttypes.h>
  62. #include <pthread.h>
  63. #include <sys/types.h>
  64. /**
  65. * to make jack API independent of different thread implementations,
  66. * we define jack_native_thread_t to pthread_t here.
  67. */
  68. typedef pthread_t jack_native_thread_t;
  69. #endif /* __APPLE__ || __linux__ || __sun__ || sun */
  70. #endif