From 8b09dd490de9d23e47dbae4c0f1504e2afc1a8e9 Mon Sep 17 00:00:00 2001 From: Chris Dickens Date: Fri, 27 Mar 2020 18:23:16 -0700 Subject: 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 --- Xcode/config.h | 3 --- android/config.h | 3 --- configure.ac | 8 -------- libusb/core.c | 2 +- libusb/io.c | 2 +- libusb/libusbi.h | 2 +- libusb/version_nano.h | 2 +- msvc/config.h | 3 --- 8 files changed, 4 insertions(+), 21 deletions(-) diff --git a/Xcode/config.h b/Xcode/config.h index 49aabfd..3aaeb7b 100644 --- a/Xcode/config.h +++ b/Xcode/config.h @@ -29,9 +29,6 @@ /* Define to 1 if you have the header file. */ #define HAVE_SYS_TIME_H 1 -/* Darwin backend */ -#define OS_DARWIN 1 - /* Use POSIX poll() implementation */ #define POLL_POSIX 1 diff --git a/android/config.h b/android/config.h index 060940f..59c7544 100644 --- a/android/config.h +++ b/android/config.h @@ -41,9 +41,6 @@ /* Define to 1 if you have the header file. */ #define HAVE_SYS_TIME_H 1 -/* Linux backend */ -#define OS_LINUX 1 - /* Use POSIX poll() implementation */ #define POLL_POSIX 1 diff --git a/configure.ac b/configure.ac index fb2369a..37c79c9 100644 --- a/configure.ac +++ b/configure.ac @@ -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 ]]) LIBS="" LTLDFLAGS="${LTLDFLAGS} -avoid-version -Wl,--add-stdcall-alias" diff --git a/libusb/core.c b/libusb/core.c index 5b87132..2097fea 100644 --- a/libusb/core.c +++ b/libusb/core.c @@ -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 diff --git a/libusb/io.c b/libusb/io.c index b2208e8..5457d0e 100644 --- a/libusb/io.c +++ b/libusb/io.c @@ -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; diff --git a/libusb/libusbi.h b/libusb/libusbi.h index da8ec53..1a5528d 100644 --- a/libusb/libusbi.h +++ b/libusb/libusbi.h @@ -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 diff --git a/libusb/version_nano.h b/libusb/version_nano.h index ea2459a..9dc01fa 100644 --- a/libusb/version_nano.h +++ b/libusb/version_nano.h @@ -1 +1 @@ -#define LIBUSB_NANO 11476 +#define LIBUSB_NANO 11477 diff --git a/msvc/config.h b/msvc/config.h index 2ca5fb2..b2ab24b 100644 --- a/msvc/config.h +++ b/msvc/config.h @@ -42,9 +42,6 @@ /* Message logging */ #define ENABLE_LOGGING 1 -/* Windows backend */ -#define OS_WINDOWS 1 - /* Use Windows poll() implementation */ #define POLL_WINDOWS 1 -- cgit v1.2.1