3 |
* LinuxSampler - modular, streaming capable sampler * |
* LinuxSampler - modular, streaming capable sampler * |
4 |
* * |
* * |
5 |
* Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck * |
* Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck * |
6 |
* Copyright (C) 2005 - 2007 Christian Schoenebeck * |
* Copyright (C) 2005 - 2019 Christian Schoenebeck * |
7 |
* * |
* * |
8 |
* This program is free software; you can redistribute it and/or modify * |
* This program is free software; you can redistribute it and/or modify * |
9 |
* it under the terms of the GNU General Public License as published by * |
* it under the terms of the GNU General Public License as published by * |
37 |
|
|
38 |
#if defined(WIN32) |
#if defined(WIN32) |
39 |
#include <windows.h> |
#include <windows.h> |
40 |
|
|
41 |
|
// modern MinGW has usleep |
42 |
|
#if (__MINGW32_MAJOR_VERSION < 3 || \ |
43 |
|
(__MINGW32_MAJOR_VERSION == 3 && __MINGW32_MINOR_VERSION < 15)) && \ |
44 |
|
!defined(__MINGW64) && !defined(__MINGW64_VERSION_MAJOR) |
45 |
#define usleep(a) Sleep(a/1000) |
#define usleep(a) Sleep(a/1000) |
46 |
|
#endif |
47 |
|
|
48 |
#define sleep(a) Sleep(a*1000) |
#define sleep(a) Sleep(a*1000) |
49 |
typedef unsigned int uint; |
typedef unsigned int uint; |
50 |
// FIXME: define proper functions which do proper alignement under Win32 |
// FIXME: define proper functions which do proper alignement under Win32 |
57 |
#include <sys/types.h> |
#include <sys/types.h> |
58 |
#endif |
#endif |
59 |
|
|
60 |
|
#ifdef __GNUC__ |
61 |
|
#define DEPRECATED_API __attribute__ ((deprecated)) |
62 |
|
#else |
63 |
|
#define DEPRECATED_API |
64 |
|
#endif |
65 |
|
|
66 |
|
// whether compiler is C++11 standard compliant |
67 |
|
#if defined(__cplusplus) && __cplusplus >= 201103L |
68 |
|
# define IS_CPP11 1 |
69 |
|
#endif |
70 |
|
|
71 |
|
// C++ "override" keyword introduced with C++11 standard |
72 |
|
#if IS_CPP11 |
73 |
|
# define OVERRIDE override |
74 |
|
# define FINAL final |
75 |
|
#else |
76 |
|
# define OVERRIDE |
77 |
|
# define FINAL |
78 |
|
#endif |
79 |
|
|
80 |
#endif // __LS_GLOBAL_H__ |
#endif // __LS_GLOBAL_H__ |