diff options
author | John Emmas <johne53@tiscali.co.uk> | 2014-01-13 10:22:31 +0000 |
---|---|---|
committer | John Emmas <johne53@tiscali.co.uk> | 2014-01-13 10:22:31 +0000 |
commit | 8e51a6c84f255f936b797dcb490c4157e02c6c85 (patch) | |
tree | 69aec5b6c91b6fe75e4895fe5daa1f31c3c3a0d6 /msvc_extra_headers/ardourext/sys/time.h.input | |
parent | 61c692baa1a56b0f00d5d6e391072324e337b0ed (diff) |
Check in some minor modifications (to MSVC specific headers)
Diffstat (limited to 'msvc_extra_headers/ardourext/sys/time.h.input')
-rw-r--r-- | msvc_extra_headers/ardourext/sys/time.h.input | 36 |
1 files changed, 25 insertions, 11 deletions
diff --git a/msvc_extra_headers/ardourext/sys/time.h.input b/msvc_extra_headers/ardourext/sys/time.h.input index 67c0e7d456..a0e7ce95f2 100644 --- a/msvc_extra_headers/ardourext/sys/time.h.input +++ b/msvc_extra_headers/ardourext/sys/time.h.input @@ -7,7 +7,22 @@ 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 @@ -60,9 +75,18 @@ typedef void *__restrict __timezone_ptr_t; 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; @@ -90,16 +114,6 @@ extern int setntptimeofday (__const struct timespec *__tp, //#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. */ |