core: Kill the OS_* definitions and use in the source code

These symbols are no longer necessary for the source code since commit
cad7d0edd9 ("core: Kill usbi_os_backend structure definition madness").

Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
This commit is contained in:
Chris Dickens
2020-03-27 18:23:16 -07:00
parent 30b56baec5
commit 8b09dd490d
8 changed files with 4 additions and 21 deletions

View File

@@ -29,9 +29,6 @@
/* Define to 1 if you have the <sys/time.h> header file. */
#define HAVE_SYS_TIME_H 1
/* Darwin backend */
#define OS_DARWIN 1
/* Use POSIX poll() implementation */
#define POLL_POSIX 1

View File

@@ -41,9 +41,6 @@
/* Define to 1 if you have the <sys/time.h> header file. */
#define HAVE_SYS_TIME_H 1
/* Linux backend */
#define OS_LINUX 1
/* Use POSIX poll() implementation */
#define POLL_POSIX 1

View File

@@ -116,17 +116,14 @@ esac
case $backend in
darwin)
AC_DEFINE([OS_DARWIN], [1], [Darwin backend])
AC_CHECK_FUNCS([pthread_threadid_np])
LIBS="-lobjc -Wl,-framework,IOKit -Wl,-framework,CoreFoundation"
LTLDFLAGS="${LTLDFLAGS} -Wl,-prebind"
;;
haiku)
AC_DEFINE([OS_HAIKU], [1], [Haiku backend])
LIBS="-lbe"
;;
linux)
AC_DEFINE([OS_LINUX], [1], [Linux backend])
AC_SEARCH_LIBS([clock_gettime], [rt], [], [], [-pthread])
AC_ARG_ENABLE([udev],
[AC_HELP_STRING([--enable-udev], [use udev for device enumeration and hotplug support (recommended) [default=yes]])],
@@ -147,27 +144,22 @@ linux)
AC_CHECK_FUNCS([pthread_setname_np])
;;
netbsd)
AC_DEFINE([OS_NETBSD], [1], [NetBSD backend])
THREAD_CFLAGS="-pthread"
LIBS="-pthread"
;;
null)
AC_DEFINE([OS_NULL], [1], [Null backend])
THREAD_CFLAGS="-pthread"
LIBS="-pthread"
;;
openbsd)
AC_DEFINE([OS_OPENBSD], [1], [OpenBSD backend])
THREAD_CFLAGS="-pthread"
LIBS="-pthread"
;;
sunos)
AC_DEFINE([OS_SUNOS], [1], [SunOS backend])
THREAD_CFLAGS="-pthread"
LIBS="-pthread -ldevinfo"
;;
windows)
AC_DEFINE([OS_WINDOWS], [1], [Windows backend])
AC_CHECK_TYPES([struct timespec], [], [], [[#include <time.h>]])
LIBS=""
LTLDFLAGS="${LTLDFLAGS} -avoid-version -Wl,--add-stdcall-alias"

View File

@@ -2526,7 +2526,7 @@ int usbi_vsnprintf(char *str, size_t size, const char *format, va_list ap)
static void usbi_log_str(enum libusb_log_level level, const char *str)
{
#if defined(USE_SYSTEM_LOGGING_FACILITY)
#if defined(OS_WINDOWS)
#if defined(_WIN32)
#if !defined(UNICODE)
OutputDebugStringA(str);
#else

View File

@@ -2765,7 +2765,7 @@ DEFAULT_VISIBILITY
const struct libusb_pollfd ** LIBUSB_CALL libusb_get_pollfds(
libusb_context *ctx)
{
#ifndef OS_WINDOWS
#ifndef _WIN32
struct libusb_pollfd **ret = NULL;
struct usbi_pollfd *ipollfd;
size_t i = 0;

View File

@@ -222,7 +222,7 @@ static inline void *usbi_reallocf(void *ptr, size_t size)
} \
} while (0)
#if defined(OS_WINDOWS)
#if defined(_WIN32)
#define TIMEVAL_TV_SEC_TYPE long
#else
#define TIMEVAL_TV_SEC_TYPE time_t

View File

@@ -1 +1 @@
#define LIBUSB_NANO 11476
#define LIBUSB_NANO 11477

View File

@@ -42,9 +42,6 @@
/* Message logging */
#define ENABLE_LOGGING 1
/* Windows backend */
#define OS_WINDOWS 1
/* Use Windows poll() implementation */
#define POLL_WINDOWS 1