#ifndef PATH_MAX
#define PATH_MAX _MAX_PATH
#endif
-#define DECLARE_DEFAULT_COMPARISONS(Type) \
- extern bool operator > (const Type& lhs, const Type& rhs); \
- extern bool operator < (const Type& lhs, const Type& rhs); \
- extern bool operator != (const Type& lhs, const Type& rhs); \
- extern bool operator == (const Type& lhs, const Type& rhs);
// Types missing from Win32 'stat.h' (hopefully Windows
// will either act sensibly or ignore most of them).
#endif
#endif
-// round().... Unlike Linux, Windows doesn't seem to support the
-// concept of a system-wide (or programmable) rounding direction.
-// Fortunately, 'round to nearest' seems to be the default action
-// under Linux, so let's copy that until we find out otherwise.
-#define rint(value) round(value)
-#if !defined(PBD_API) || defined(PBD_IS_IN_WIN_STATIC_LIB)
-extern double round(double x);
-#endif
-
// System V compatibility
typedef unsigned short ushort;
typedef unsigned int uint;
// #include the main headers for Ardour MSVC
#ifdef __cplusplus
-#if defined(BUILDING_PBD) || defined(PBD_IS_IN_WIN_STATIC_LIB)
+#if defined(LIBPBD_DLL) || defined(PBD_IS_IN_WIN_STATIC_LIB)
#include <pbd/msvc_pbd.h>
+
+#ifdef LIBPBD_DLL
+#define DEFAULT_COMPARISONS_DEFINED
+#define DECLARE_DEFAULT_COMPARISONS(Type) \
+ LIBPBD_API bool operator > (const Type& lhs, const Type& rhs); \
+ LIBPBD_API bool operator < (const Type& lhs, const Type& rhs); \
+ LIBPBD_API bool operator != (const Type& lhs, const Type& rhs); \
+ LIBPBD_API bool operator == (const Type& lhs, const Type& rhs);
+#endif
#endif
#if defined(BUILDING_LIBARDOUR) || defined(LIBARDOUR_IS_IN_WIN_STATIC_LIB)
#include <ardour/msvc_libardour.h>
#endif
#endif // __cplusplus
+#ifndef DEFAULT_COMPARISONS_DEFINED
+#define DEFAULT_COMPARISONS_DEFINED
+#define DECLARE_DEFAULT_COMPARISONS(Type) \
+ extern bool operator > (const Type& lhs, const Type& rhs); \
+ extern bool operator < (const Type& lhs, const Type& rhs); \
+ extern bool operator != (const Type& lhs, const Type& rhs); \
+ extern bool operator == (const Type& lhs, const Type& rhs);
+#endif
+
+// round().... Unlike Linux, Windows doesn't seem to support the
+// concept of a system-wide (or programmable) rounding direction.
+// Fortunately, 'round to nearest' seems to be the default action
+// under Linux, so let's copy that until we find out otherwise.
+#define rint(value) round(value)
+#if !defined(LIBPBD_API) || defined(PBD_IS_IN_WIN_STATIC_LIB)
+extern double round(double x);
+#endif
+
#endif /* __ardour_msvc_extensions_h__ */
typedef long __suseconds_t;
typedef __suseconds_t suseconds_t;
#endif
+#ifndef BUILDING_EVORAL
#include <WinSock2.h> /* gets 'struct timeval' - Changed by JE - 23-07-2013. Was formerly. . . #include <WinSock.h> */
+/* For whatever reason, Ardour's 'libevoral' refuses to build as a DLL if we include both 'rpc.h' */
+/* and 'WinSock2.h'. It doesn't seem to matter which order we #include them. Given that we can't */
+/* edit 'rpc.h' or 'WinSock2.h', just make sure we don't #include them when building libevoral. */
+
+/* Type of the second argument to `getitimer' and
+ the second and third arguments `setitimer'. */
+struct itimerval
+ {
+ /* Value to put into `it_value' when the timer expires. */
+ struct timeval it_interval;
+ /* Time to the next timer expiration. */
+ struct timeval it_value;
+ };
+#endif
#ifdef _TIMEVAL_DEFINED
# define _STRUCT_TIMEVAL 1
Returns 0 on success, -1 on errors.
NOTE: This form of timezone information is obsolete.
Use the functions and variables declared in <time.h> instead. */
+#ifdef LIBPBD_DLL /* JE - use the version that's available from libpbd */
+#ifdef LIBPBD_API
+LIBPBD_API int __cdecl gettimeofday (struct timeval *__restrict __tv,
+ __timezone_ptr_t __tz) __THROW;
+#else
+__declspec(dllimport) int __cdecl gettimeofday (struct timeval *__restrict __tv,
+ __timezone_ptr_t __tz) __THROW;
+#endif
+#else
extern int gettimeofday (struct timeval *__restrict __tv,
__timezone_ptr_t __tz) __THROW;
-
+#endif
extern int getntptimeofday (struct timespec *__restrict __tp,
__timezone_ptr_t __tz) __THROW;
//#define ITIMER_PROF ITIMER_PROF
// };
-/* Type of the second argument to `getitimer' and
- the second and third arguments `setitimer'. */
-struct itimerval
- {
- /* Value to put into `it_value' when the timer expires. */
- struct timeval it_interval;
- /* Time to the next timer expiration. */
- struct timeval it_value;
- };
-
#if defined __USE_GNU && !defined __cplusplus
/* Use the nicer parameter type only in GNU mode and not for C++ since the
strict C++ rules prevent the automatic promotion. */