mirror of
https://github.com/RPCS3/libusb.git
synced 2026-01-31 01:25:19 +01:00
Prior to this commit, gettimeofday() was being used for timestamps in debug messages. This function has been marked as deprecated in the latest POSIX specification and furthermore is not supported on Windows, thus requiring our own implementation as usbi_gettimeofday(). This commit changes the logging code to obtain timestamps using the clock_gettime() function provided by the backend. The implementation of usbi_gettimeofday() for Windows was actually equivalent to that of the USBI_CLOCK_REALTIME implementation for clock_gettime(), so this eliminates code duplication. In addition, the USBI_CLOCK_REALTIME implementation has been updated for Windows to leverage the timespec_get() function available in VS 2015 and later. Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
26 lines
527 B
C
26 lines
527 B
C
/* config.h. Manually generated for Xcode. */
|
|
|
|
/* Default visibility */
|
|
#define DEFAULT_VISIBILITY /**/
|
|
|
|
/* Message logging */
|
|
#define ENABLE_LOGGING 1
|
|
|
|
/* Define to 1 if you have the <poll.h> header file. */
|
|
#define HAVE_POLL_H 1
|
|
|
|
/* Define to 1 if you have the <sys/time.h> header file. */
|
|
#define HAVE_SYS_TIME_H 1
|
|
|
|
/* Darwin backend */
|
|
#define OS_DARWIN 1
|
|
|
|
/* type of second poll() argument */
|
|
#define POLL_NFDS_TYPE nfds_t
|
|
|
|
/* Use POSIX Threads */
|
|
#define THREADS_POSIX 1
|
|
|
|
/* Use GNU extensions */
|
|
#define _GNU_SOURCE 1
|