core: Kill the OS_* definitions and use in the source code
authorChris Dickens <christopher.a.dickens@gmail.com>
Sat, 28 Mar 2020 01:23:16 +0000 (18:23 -0700)
committerChris Dickens <christopher.a.dickens@gmail.com>
Sat, 28 Mar 2020 01:23:16 +0000 (18:23 -0700)
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>
Xcode/config.h
android/config.h
configure.ac
libusb/core.c
libusb/io.c
libusb/libusbi.h
libusb/version_nano.h
msvc/config.h

index 49aabfd..3aaeb7b 100644 (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
 
index 060940f..59c7544 100644 (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
 
index fb2369a..37c79c9 100644 (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"
index 5b87132..2097fea 100644 (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
index b2208e8..5457d0e 100644 (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;
index da8ec53..1a5528d 100644 (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
index ea2459a..9dc01fa 100644 (file)
@@ -1 +1 @@
-#define LIBUSB_NANO 11476
+#define LIBUSB_NANO 11477
index 2ca5fb2..b2ab24b 100644 (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