From 9a9c7dcd72e74f2c7919d27da5e83ea2ff383192 Mon Sep 17 00:00:00 2001 From: Atsushi Toyokura Date: Tue, 19 Feb 2019 02:14:12 +0900 Subject: [PATCH] Revert "ats2: Update to 0.3.13" This reverts commit f3123eacf4e6e4bb6ffba7dc2a14760bca30431a. --- ats2/Makefile | 8 +- ats2/distinfo | 8 +- virtualbox/patches/patch-include_VBox_types.h | 15 - virtualbox/patches/patch-include_iprt_types.h | 13 - ...src_VBox_Devices_Audio_DrvHostOSSAudio.cpp | 30 -- ...ations_Python_PyMod-2.7.2_Include_pyport.h | 23 -- ...es_Network_lwip-new_vbox_include_arch_cc.h | 12 - ...ch-src_VBox_Main_include_USBProxyBackend.h | 41 -- ...rc-server_netbsd_USBProxyBackendNetBSD.cpp | 356 ------------------ .../patch-src_libs_xpcom18a4_Config.kmk | 36 -- .../patch-src_libs_xpcom18a4_Makefile.kmk | 31 -- ...xpcom18a4_nsprpub_pr_include_md___netbsd.h | 13 - ...bs_xpcom18a4_nsprpub_pr_include_md___pth.h | 13 - ..._xpcom18a4_nsprpub_pr_src_linking_prlink.c | 13 - 14 files changed, 10 insertions(+), 602 deletions(-) delete mode 100644 virtualbox/patches/patch-include_VBox_types.h delete mode 100644 virtualbox/patches/patch-include_iprt_types.h delete mode 100644 virtualbox/patches/patch-src_VBox_Devices_Audio_DrvHostOSSAudio.cpp delete mode 100644 virtualbox/patches/patch-src_VBox_Devices_EFI_Firmware_AppPkg_Applications_Python_PyMod-2.7.2_Include_pyport.h delete mode 100644 virtualbox/patches/patch-src_VBox_Devices_Network_lwip-new_vbox_include_arch_cc.h delete mode 100644 virtualbox/patches/patch-src_VBox_Main_include_USBProxyBackend.h delete mode 100644 virtualbox/patches/patch-src_VBox_Main_src-server_netbsd_USBProxyBackendNetBSD.cpp delete mode 100644 virtualbox/patches/patch-src_libs_xpcom18a4_Config.kmk delete mode 100644 virtualbox/patches/patch-src_libs_xpcom18a4_Makefile.kmk delete mode 100644 virtualbox/patches/patch-src_libs_xpcom18a4_nsprpub_pr_include_md___netbsd.h delete mode 100644 virtualbox/patches/patch-src_libs_xpcom18a4_nsprpub_pr_include_md___pth.h delete mode 100644 virtualbox/patches/patch-src_libs_xpcom18a4_nsprpub_pr_src_linking_prlink.c diff --git a/ats2/Makefile b/ats2/Makefile index 34087a42f0..bb5510e34e 100644 --- a/ats2/Makefile +++ b/ats2/Makefile @@ -1,6 +1,6 @@ # $NetBSD$ -DISTNAME= ATS2-Postiats-0.3.13 +DISTNAME= ATS2-Postiats-0.3.12 CATEGORIES= lang MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=ats2-lang/} EXTRACT_SUFX= .tgz @@ -17,7 +17,11 @@ USE_TOOLS+= gmake MAKE_JOBS_SAFE= no MAKE_FLAGS+= LDFLAGS+= -WRKSRC= ${WRKDIR}/${PKGBASE}-gmp-${PKGVERSION_NOREV} +SUBST_CLASSES+= version +SUBST_STAGE.version= pre-configure +SUBST_MESSAGE.version= Fixing version. +SUBST_FILES.version= configure +SUBST_SED.version= -e "s/0\.3\.11/0.3.12/g" .include "../../devel/gmp/buildlink3.mk" .include "../../mk/bsd.pkg.mk" diff --git a/ats2/distinfo b/ats2/distinfo index b5374d9178..27711a1753 100644 --- a/ats2/distinfo +++ b/ats2/distinfo @@ -1,7 +1,7 @@ $NetBSD$ -SHA1 (ATS2-Postiats-0.3.13.tgz) = 969fcaf9e2c11ca3b89d5b21aaff70f7b126a960 -RMD160 (ATS2-Postiats-0.3.13.tgz) = a2a7d19cafa0f2b949026d41c900671d3bfb6112 -SHA512 (ATS2-Postiats-0.3.13.tgz) = 40e0fc40e4295ca6c5c21d9aeb97a6729fc74f7fc9bf165b3328b5b57a4e1480f9e0a792573aad60df0df2a445472a1aa4ef4a707ebbbae2d4ceb5f9b59a8269 -Size (ATS2-Postiats-0.3.13.tgz) = 4532102 bytes +SHA1 (ATS2-Postiats-0.3.12.tgz) = da6e20815351c6a59635ca61da9474c68fc06b34 +RMD160 (ATS2-Postiats-0.3.12.tgz) = ca709266b8f27f4637f888a475f651fb35c9f2c1 +SHA512 (ATS2-Postiats-0.3.12.tgz) = d8619488356e0d1ec98230a0810b5850f7cc274151b1911545420be8e364080a269c7776ef337205ad7561a1d2463cb18a0a0a374376e81dba4c54eeff521933 +Size (ATS2-Postiats-0.3.12.tgz) = 4440614 bytes SHA1 (patch-Makefile) = 6695c27284c2e5f765439f0d2b77c3bda3c2a5ed diff --git a/virtualbox/patches/patch-include_VBox_types.h b/virtualbox/patches/patch-include_VBox_types.h deleted file mode 100644 index 2bf1550952..0000000000 --- a/virtualbox/patches/patch-include_VBox_types.h +++ /dev/null @@ -1,15 +0,0 @@ -$NetBSD$ - ---- include/VBox/types.h.orig 2018-12-18 12:51:31.000000000 +0000 -+++ include/VBox/types.h -@@ -29,6 +29,10 @@ - #include - #include - -+#if defined(RT_OS_NETBSD) -+/* PVM is defined by 'sys/param.h' */ -+#undef PVM -+#endif - - /** @defgroup grp_types VBox Basic Types - * @{ diff --git a/virtualbox/patches/patch-include_iprt_types.h b/virtualbox/patches/patch-include_iprt_types.h deleted file mode 100644 index a0a8f778a5..0000000000 --- a/virtualbox/patches/patch-include_iprt_types.h +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD$ - ---- include/iprt/types.h.orig 2018-12-18 12:51:38.000000000 +0000 -+++ include/iprt/types.h -@@ -237,8 +237,6 @@ typedef _Bool bool; - * For the kernel code is not available, but bool is - * provided by included above. - */ --# include -- - /* - * ... but the story doesn't end here. The C standard says that - * defines preprocessor macro "bool" that expands to diff --git a/virtualbox/patches/patch-src_VBox_Devices_Audio_DrvHostOSSAudio.cpp b/virtualbox/patches/patch-src_VBox_Devices_Audio_DrvHostOSSAudio.cpp deleted file mode 100644 index f1f5cdd7a2..0000000000 --- a/virtualbox/patches/patch-src_VBox_Devices_Audio_DrvHostOSSAudio.cpp +++ /dev/null @@ -1,30 +0,0 @@ -$NetBSD$ - ---- src/VBox/Devices/Audio/DrvHostOSSAudio.cpp.orig 2018-12-18 12:55:50.000000000 +0000 -+++ src/VBox/Devices/Audio/DrvHostOSSAudio.cpp -@@ -21,6 +21,9 @@ - #include - #include - #include -+#if defined(RT_OS_NETBSD) -+#include -+#endif - - #include - #include /* For PDMIBASE_2_PDMDRV. */ -@@ -132,6 +135,7 @@ static OSSAUDIOCFG s_OSSConf = - }; - - -+#if !defined(RT_OS_NETBSD) - /* http://www.df.lth.se/~john_e/gems/gem002d.html */ - static uint32_t popcount(uint32_t u) - { -@@ -142,6 +146,7 @@ static uint32_t popcount(uint32_t u) - u = ( u&0x0000ffff) + (u>>16); - return u; - } -+#endif - - - static uint32_t lsbindex(uint32_t u) diff --git a/virtualbox/patches/patch-src_VBox_Devices_EFI_Firmware_AppPkg_Applications_Python_PyMod-2.7.2_Include_pyport.h b/virtualbox/patches/patch-src_VBox_Devices_EFI_Firmware_AppPkg_Applications_Python_PyMod-2.7.2_Include_pyport.h deleted file mode 100644 index 957472c043..0000000000 --- a/virtualbox/patches/patch-src_VBox_Devices_EFI_Firmware_AppPkg_Applications_Python_PyMod-2.7.2_Include_pyport.h +++ /dev/null @@ -1,23 +0,0 @@ -$NetBSD$ - ---- src/VBox/Devices/EFI/Firmware/AppPkg/Applications/Python/PyMod-2.7.2/Include/pyport.h.orig 2018-12-18 12:55:52.000000000 +0000 -+++ src/VBox/Devices/EFI/Firmware/AppPkg/Applications/Python/PyMod-2.7.2/Include/pyport.h -@@ -468,7 +468,7 @@ extern "C" { - * This isn't reliable. See Py_OVERFLOWED comments. - * X is evaluated more than once. - */ --#if defined(__FreeBSD__) || defined(__OpenBSD__) || (defined(__hpux) && defined(__ia64)) -+#if defined(__FreeBSD__) || defined(__OpenBSD__) || (defined(__hpux) && defined(__ia64)) || defined(__NetBSD__) - #define _Py_SET_EDOM_FOR_NAN(X) if (isnan(X)) errno = EDOM; - #else - #define _Py_SET_EDOM_FOR_NAN(X) ; -@@ -684,6 +684,9 @@ extern int fdatasync(int); - #endif - #endif - -+#if defined(__NetBSD__) -+# define _PY_PORT_CTYPE_UTF8_ISSUE -+#endif - - #if defined(__APPLE__) - # define _PY_PORT_CTYPE_UTF8_ISSUE diff --git a/virtualbox/patches/patch-src_VBox_Devices_Network_lwip-new_vbox_include_arch_cc.h b/virtualbox/patches/patch-src_VBox_Devices_Network_lwip-new_vbox_include_arch_cc.h deleted file mode 100644 index 49d5eb90cd..0000000000 --- a/virtualbox/patches/patch-src_VBox_Devices_Network_lwip-new_vbox_include_arch_cc.h +++ /dev/null @@ -1,12 +0,0 @@ -$NetBSD$ - ---- src/VBox/Devices/Network/lwip-new/vbox/include/arch/cc.h.orig 2018-12-18 12:58:36.000000000 +0000 -+++ src/VBox/Devices/Network/lwip-new/vbox/include/arch/cc.h -@@ -12,6 +12,7 @@ - - #ifndef RT_OS_WINDOWS - # define LWIP_TIMEVAL_PRIVATE 0 -+# include - #endif - - typedef uint8_t u8_t; diff --git a/virtualbox/patches/patch-src_VBox_Main_include_USBProxyBackend.h b/virtualbox/patches/patch-src_VBox_Main_include_USBProxyBackend.h deleted file mode 100644 index d656925f41..0000000000 --- a/virtualbox/patches/patch-src_VBox_Main_include_USBProxyBackend.h +++ /dev/null @@ -1,41 +0,0 @@ -$NetBSD$ - ---- src/VBox/Main/include/USBProxyBackend.h.orig 2018-12-18 13:00:06.000000000 +0000 -+++ src/VBox/Main/include/USBProxyBackend.h -@@ -378,6 +378,36 @@ private: - }; - # endif /* RT_OS_FREEBSD */ - -+# if defined(RT_OS_NETBSD) || defined(DOXYGEN_RUNNING) -+/** -+ * The FreeBSD hosted USB Proxy Backend. -+ */ -+class USBProxyBackendNetBSD : public USBProxyBackend -+{ -+public: -+ DECLARE_EMPTY_CTOR_DTOR(USBProxyBackendNetBSD) -+ -+ int init(USBProxyService *pUsbProxyService, const com::Utf8Str &strId, -+ const com::Utf8Str &strAddress, bool fLoadingSettings); -+ void uninit(); -+ -+ virtual int captureDevice(HostUSBDevice *aDevice); -+ virtual int releaseDevice(HostUSBDevice *aDevice); -+ -+protected: -+ int initUsbfs(void); -+ int initSysfs(void); -+ virtual int wait(RTMSINTERVAL aMillies); -+ virtual int interruptWait(void); -+ virtual PUSBDEVICE getDevices(void); -+ int addDeviceToChain(PUSBDEVICE pDev, PUSBDEVICE *ppFirst, PUSBDEVICE **pppNext, int rc); -+ virtual void deviceAdded(ComObjPtr &aDevice, SessionMachinesList &llOpenedMachines, PUSBDEVICE aUSBDevice); -+ -+private: -+ RTSEMEVENT mNotifyEventSem; -+}; -+# endif /* RT_OS_NETBSD */ -+ - /** - * USB/IP Proxy receive state. - */ diff --git a/virtualbox/patches/patch-src_VBox_Main_src-server_netbsd_USBProxyBackendNetBSD.cpp b/virtualbox/patches/patch-src_VBox_Main_src-server_netbsd_USBProxyBackendNetBSD.cpp deleted file mode 100644 index 241dca8e0d..0000000000 --- a/virtualbox/patches/patch-src_VBox_Main_src-server_netbsd_USBProxyBackendNetBSD.cpp +++ /dev/null @@ -1,356 +0,0 @@ -$NetBSD$ - ---- src/VBox/Main/src-server/netbsd/USBProxyBackendNetBSD.cpp.orig 1970-01-01 00:00:00.000000000 +0000 -+++ src/VBox/Main/src-server/netbsd/USBProxyBackendNetBSD.cpp -@@ -0,0 +1,351 @@ -+/* USBProxyBackendNetBSD.cpp $ */ -+/** @file -+ * VirtualBox USB Proxy Service, NetBSD Specialization. -+ */ -+ -+/* -+ * Copyright (C) 2005-2017 Oracle Corporation -+ * -+ * This file is part of VirtualBox Open Source Edition (OSE), as -+ * available from http://www.virtualbox.org. This file is free software; -+ * you can redistribute it and/or modify it under the terms of the GNU -+ * General Public License (GPL) as published by the Free Software -+ * Foundation, in version 2 as it comes in the "COPYING" file of the -+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the -+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. -+ */ -+ -+ -+/********************************************************************************************************************************* -+* Header Files * -+*********************************************************************************************************************************/ -+#include "USBProxyBackend.h" -+#include "Logging.h" -+ -+#include -+#include -+#include -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+ -+/********************************************************************************************************************************* -+* Structures and Typedefs * -+*********************************************************************************************************************************/ -+ -+ -+/********************************************************************************************************************************* -+* Global Variables * -+*********************************************************************************************************************************/ -+ -+/** -+ * Initialize data members. -+ */ -+USBProxyBackendNetBSD::USBProxyBackendNetBSD() -+ : USBProxyBackend(), mNotifyEventSem(NIL_RTSEMEVENT) -+{ -+ LogFlowThisFunc(("\n")); -+} -+ -+USBProxyBackendNetBSD::~USBProxyBackendNetBSD() -+{ -+ LogFlowThisFunc(("\n")); -+} -+ -+/** -+ * Initializes the object (called right after construction). -+ * -+ * @returns S_OK on success and non-fatal failures, some COM error otherwise. -+ */ -+int USBProxyBackendNetBSD::init(USBProxyService *pUsbProxyService, const com::Utf8Str &strId, -+ const com::Utf8Str &strAddress, bool fLoadingSettings) -+{ -+ USBProxyBackend::init(pUsbProxyService, strId, strAddress, fLoadingSettings); -+ -+ unconst(m_strBackend) = Utf8Str("host"); -+ -+ /* -+ * Create semaphore. -+ */ -+ int rc = RTSemEventCreate(&mNotifyEventSem); -+ if (RT_FAILURE(rc)) -+ return rc; -+ -+ /* -+ * Start the poller thread. -+ */ -+ start(); -+ return VINF_SUCCESS; -+} -+ -+ -+/** -+ * Stop all service threads and free the device chain. -+ */ -+void USBProxyBackendNetBSD::uninit() -+{ -+ LogFlowThisFunc(("\n")); -+ -+ /* -+ * Stop the service. -+ */ -+ if (isActive()) -+ stop(); -+ -+ RTSemEventDestroy(mNotifyEventSem); -+ mNotifyEventSem = NULL; -+ USBProxyBackend::uninit(); -+} -+ -+ -+int USBProxyBackendNetBSD::captureDevice(HostUSBDevice *aDevice) -+{ -+ AssertReturn(aDevice, VERR_GENERAL_FAILURE); -+ AssertReturn(!aDevice->isWriteLockOnCurrentThread(), VERR_GENERAL_FAILURE); -+ -+ AutoReadLock devLock(aDevice COMMA_LOCKVAL_SRC_POS); -+ LogFlowThisFunc(("aDevice=%s\n", aDevice->i_getName().c_str())); -+ -+ /* -+ * Don't think we need to do anything when the device is held... fake it. -+ */ -+ Assert(aDevice->i_getUnistate() == kHostUSBDeviceState_Capturing); -+ devLock.release(); -+ interruptWait(); -+ -+ return VINF_SUCCESS; -+} -+ -+ -+int USBProxyBackendNetBSD::releaseDevice(HostUSBDevice *aDevice) -+{ -+ AssertReturn(aDevice, VERR_GENERAL_FAILURE); -+ AssertReturn(!aDevice->isWriteLockOnCurrentThread(), VERR_GENERAL_FAILURE); -+ -+ AutoReadLock devLock(aDevice COMMA_LOCKVAL_SRC_POS); -+ LogFlowThisFunc(("aDevice=%s\n", aDevice->i_getName().c_str())); -+ -+ /* -+ * We're not really holding it atm., just fake it. -+ */ -+ Assert(aDevice->i_getUnistate() == kHostUSBDeviceState_ReleasingToHost); -+ devLock.release(); -+ interruptWait(); -+ -+ return VINF_SUCCESS; -+} -+ -+ -+bool USBProxyBackendNetBSD::isFakeUpdateRequired() -+{ -+ return true; -+} -+ -+ -+int USBProxyBackendNetBSD::wait(RTMSINTERVAL aMillies) -+{ -+ return RTSemEventWait(mNotifyEventSem, aMillies < 1000 ? 1000 : 5000); -+} -+ -+ -+int USBProxyBackendNetBSD::interruptWait(void) -+{ -+ return RTSemEventSignal(mNotifyEventSem); -+} -+ -+ -+/** -+ * Dumps a USBDEVICE structure to the log using LogLevel 3. -+ * @param pDev The structure to log. -+ * @todo This is really common code. -+ */ -+DECLINLINE(void) usbLogDevice(PUSBDEVICE pDev) -+{ -+ NOREF(pDev); -+ -+ Log3(("USB device:\n")); -+ Log3(("Product: %s (%x)\n", pDev->pszProduct, pDev->idProduct)); -+ Log3(("Manufacturer: %s (Vendor ID %x)\n", pDev->pszManufacturer, pDev->idVendor)); -+ Log3(("Serial number: %s (%llx)\n", pDev->pszSerialNumber, pDev->u64SerialHash)); -+ Log3(("Device revision: %d\n", pDev->bcdDevice)); -+ Log3(("Device class: %x\n", pDev->bDeviceClass)); -+ Log3(("Device subclass: %x\n", pDev->bDeviceSubClass)); -+ Log3(("Device protocol: %x\n", pDev->bDeviceProtocol)); -+ Log3(("USB version number: %d\n", pDev->bcdUSB)); -+ Log3(("Device speed: %s\n", -+ pDev->enmSpeed == USBDEVICESPEED_UNKNOWN ? "unknown" -+ : pDev->enmSpeed == USBDEVICESPEED_LOW ? "1.5 MBit/s" -+ : pDev->enmSpeed == USBDEVICESPEED_FULL ? "12 MBit/s" -+ : pDev->enmSpeed == USBDEVICESPEED_HIGH ? "480 MBit/s" -+ : pDev->enmSpeed == USBDEVICESPEED_VARIABLE ? "variable" -+ : "invalid")); -+ Log3(("Number of configurations: %d\n", pDev->bNumConfigurations)); -+ Log3(("Bus number: %d\n", pDev->bBus)); -+ Log3(("Port number: %d\n", pDev->bPort)); -+ Log3(("Device number: %d\n", pDev->bDevNum)); -+ Log3(("Device state: %s\n", -+ pDev->enmState == USBDEVICESTATE_UNSUPPORTED ? "unsupported" -+ : pDev->enmState == USBDEVICESTATE_USED_BY_HOST ? "in use by host" -+ : pDev->enmState == USBDEVICESTATE_USED_BY_HOST_CAPTURABLE ? "in use by host, possibly capturable" -+ : pDev->enmState == USBDEVICESTATE_UNUSED ? "not in use" -+ : pDev->enmState == USBDEVICESTATE_HELD_BY_PROXY ? "held by proxy" -+ : pDev->enmState == USBDEVICESTATE_USED_BY_GUEST ? "used by guest" -+ : "invalid")); -+ Log3(("OS device address: %s\n", pDev->pszAddress)); -+} -+ -+ -+PUSBDEVICE USBProxyBackendNetBSD::getDevices(void) -+{ -+ PUSBDEVICE pDevices = NULL; -+ int FileUsb = 0; -+ int iBus = 0; -+ int iAddr = 1; -+ int rc = VINF_SUCCESS; -+ char *pszDevicePath = NULL; -+ uint32_t PlugTime = 0; -+ -+ for (;;) -+ { -+ rc = RTStrAPrintf(&pszDevicePath, "/dev/%s%d.%d", USB_GENERIC_NAME, iBus, iAddr); -+ if (RT_FAILURE(rc)) -+ break; -+ -+ LogFlowFunc((": Opening %s\n", pszDevicePath)); -+ -+ FileUsb = open(pszDevicePath, O_RDONLY); -+ if (FileUsb < 0) -+ { -+ RTStrFree(pszDevicePath); -+ -+ if ((errno == ENOENT) && (iAddr > 1)) -+ { -+ iAddr = 1; -+ iBus++; -+ continue; -+ } -+ else if (errno == EACCES) -+ { -+ /* Skip devices without the right permission. */ -+ iAddr++; -+ continue; -+ } -+ else -+ break; -+ } -+ -+ LogFlowFunc((": %s opened successfully\n", pszDevicePath)); -+ -+ struct usb_device_info UsbDevInfo; -+ RT_ZERO(UsbDevInfo); -+ -+ rc = ioctl(FileUsb, USB_GET_DEVICEINFO, &UsbDevInfo); -+ if (rc < 0) -+ { -+ LogFlowFunc((": Error querying device info rc=%Rrc\n", RTErrConvertFromErrno(errno))); -+ close(FileUsb); -+ RTStrFree(pszDevicePath); -+ break; -+ } -+ -+ /* Filter out hubs */ -+ if (UsbDevInfo.udi_class != 0x09) -+ { -+ PUSBDEVICE pDevice = (PUSBDEVICE)RTMemAllocZ(sizeof(USBDEVICE)); -+ if (!pDevice) -+ { -+ close(FileUsb); -+ RTStrFree(pszDevicePath); -+ break; -+ } -+ -+ pDevice->enmState = USBDEVICESTATE_USED_BY_HOST_CAPTURABLE; -+ pDevice->bBus = UsbDevInfo.udi_bus; -+ pDevice->bPort = UsbDevInfo.udi_hubport; -+ pDevice->bDeviceClass = UsbDevInfo.udi_class; -+ pDevice->bDeviceSubClass = UsbDevInfo.udi_subclass; -+ pDevice->bDeviceProtocol = UsbDevInfo.udi_protocol; -+ pDevice->bNumConfigurations = UsbDevInfo.udi_config_no; -+ pDevice->idVendor = UsbDevInfo.udi_vendorNo; -+ pDevice->idProduct = UsbDevInfo.udi_productNo; -+ pDevice->bDevNum = UsbDevInfo.udi_index; -+ -+ switch (UsbDevInfo.udi_speed) -+ { -+ case USB_SPEED_LOW: -+ pDevice->enmSpeed = USBDEVICESPEED_LOW; -+ break; -+ case USB_SPEED_FULL: -+ pDevice->enmSpeed = USBDEVICESPEED_FULL; -+ break; -+ case USB_SPEED_HIGH: -+ pDevice->enmSpeed = USBDEVICESPEED_HIGH; -+ break; -+ case USB_SPEED_SUPER: -+ pDevice->enmSpeed = USBDEVICESPEED_SUPER; -+ break; -+ case USB_SPEED_VARIABLE: -+ pDevice->enmSpeed = USBDEVICESPEED_VARIABLE; -+ break; -+ default: -+ pDevice->enmSpeed = USBDEVICESPEED_UNKNOWN; -+ break; -+ } -+ -+ if (UsbDevInfo.udi_vendor[0] != '\0') -+ { -+ USBLibPurgeEncoding(UsbDevInfo.udi_vendor); -+ pDevice->pszManufacturer = RTStrDupN(UsbDevInfo.udi_vendor, sizeof(UsbDevInfo.udi_vendor)); -+ } -+ -+ if (UsbDevInfo.udi_product[0] != '\0') -+ { -+ USBLibPurgeEncoding(UsbDevInfo.udi_product); -+ pDevice->pszProduct = RTStrDupN(UsbDevInfo.udi_product, sizeof(UsbDevInfo.udi_product)); -+ } -+ -+ if (UsbDevInfo.udi_serial[0] != '\0') -+ { -+ USBLibPurgeEncoding(UsbDevInfo.udi_serial); -+ pDevice->pszSerialNumber = RTStrDupN(UsbDevInfo.udi_serial, sizeof(UsbDevInfo.udi_serial)); -+ pDevice->u64SerialHash = USBLibHashSerial(UsbDevInfo.udi_serial); -+ } -+ rc = ioctl(FileUsb, USB_GET_PLUGTIME, &PlugTime); -+ if (rc == 0) -+ pDevice->u64SerialHash += PlugTime; -+ -+ pDevice->pszAddress = RTStrDup(pszDevicePath); -+ pDevice->pszBackend = RTStrDup("host"); -+ -+ usbLogDevice(pDevice); -+ -+ pDevice->pNext = pDevices; -+ if (pDevices) -+ pDevices->pPrev = pDevice; -+ pDevices = pDevice; -+ } -+ close(FileUsb); -+ RTStrFree(pszDevicePath); -+ iAddr++; -+ } -+ -+ return pDevices; -+} diff --git a/virtualbox/patches/patch-src_libs_xpcom18a4_Config.kmk b/virtualbox/patches/patch-src_libs_xpcom18a4_Config.kmk deleted file mode 100644 index cc94f49cc5..0000000000 --- a/virtualbox/patches/patch-src_libs_xpcom18a4_Config.kmk +++ /dev/null @@ -1,36 +0,0 @@ -$NetBSD$ - ---- src/libs/xpcom18a4/Config.kmk.orig 2018-12-18 13:01:16.000000000 +0000 -+++ src/libs/xpcom18a4/Config.kmk -@@ -53,6 +53,7 @@ TEMPLATE_XPCOM_CXXFLAGS.release = -O - TEMPLATE_XPCOM_CXXFLAGS.profile = -O - TEMPLATE_XPCOM_CXXFLAGS.darwin = -fpascal-strings -fshort-wchar -fno-common -fno-rtti $(VBOX_DARWIN_DEF_SDK_CXXFLAGS) - TEMPLATE_XPCOM_CXXFLAGS.freebsd = -pthread -+TEMPLATE_XPCOM_CXXFLAGS.netbsd = -pthread - TEMPLATE_XPCOM_CXXFLAGS.linux = -pthread - TEMPLATE_XPCOM_CXXFLAGS.solaris = -fno-omit-frame-pointer # for now anyway. - TEMPLATE_XPCOM_CFLAGS = -g -pipe -Wall -Wno-unused -Wno-parentheses -Wno-uninitialized $(VBOX_GCC_fvisibility-hidden) \ -@@ -62,6 +63,7 @@ TEMPLATE_XPCOM_CFLAGS.amd64 = -m6 - TEMPLATE_XPCOM_CFLAGS.release = -O - TEMPLATE_XPCOM_CFLAGS.profile = -O - TEMPLATE_XPCOM_CFLAGS.freebsd = -pthread -+TEMPLATE_XPCOM_CFLAGS.netbsd = -pthread - TEMPLATE_XPCOM_CFLAGS.linux = -pthread -ansi - TEMPLATE_XPCOM_CFLAGS.solaris = -fno-omit-frame-pointer # for now anyway. - TEMPLATE_XPCOM_DEFS = \ -@@ -80,6 +82,7 @@ TEMPLATE_XPCOM_DEFS.amd64 = HAV - TEMPLATE_XPCOM_DEFS.darwin = OSTYPE=\"Darwin8.8.1\" OSARCH=\"Darwin\" XP_UNIX=1 XP_MACOSX=1 TARGET_CARBON=1 HAVE_VISIBILITY_ATTRIBUTE=1 DARWIN=1 $(TEMPLATE_VBOXR3NP_DEFS.darwin) - TEMPLATE_XPCOM_DEFS.darwin.amd64 = VBOX_MACOSX_FOLLOWS_UNIX_IO - TEMPLATE_XPCOM_DEFS.freebsd = OSTYPE=\"FreeBSD5+\" OSARCH=\"FreeBSD\" XP_UNIX=1 FREEBSD=1 HAVE_VISIBILITY_ATTRIBUTE=1 -+TEMPLATE_XPCOM_DEFS.netbsd = OSTYPE=\"NetBSD8\" OSARCH=\"NetBSD\" XP_UNIX=1 NETBSD=1 HAVE_VISIBILITY_ATTRIBUTE=1 - TEMPLATE_XPCOM_DEFS.linux = OSTYPE=\"Linux2.6\" OSARCH=\"Linux\" XP_UNIX=1 _GNU_SOURCE HAVE_VISIBILITY_ATTRIBUTE=1 ## @todo LINUX=1 - # Don't define BSD_SELECT because bsdselect() from kLIBC <= 0.6.3 has problems on SMP - TEMPLATE_XPCOM_DEFS.os2 = OSTYPE=\"OS/2_4.5\" OSARCH=\"OS/2\" XP_OS2 XP_PC OS2=4 -@@ -173,6 +176,7 @@ TEMPLATE_XPCOMEXE_LIBS = \ - $(VBoxXPCOM_1_TARGET) \ - $(TEMPLATE_XPCOM_LIBS) - TEMPLATE_XPCOMEXE_LIBS.freebsd = $(LIB_PTHREAD) -+TEMPLATE_XPCOMEXE_LIBS.netbsd = $(LIB_PTHREAD) - TEMPLATE_XPCOMEXE_LIBS.linux = dl $(LIB_PTHREAD) - TEMPLATE_XPCOMEXE_LDFLAGS.darwin = -bind_at_load $(filter-out -current_version -compatibility_version $(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD),$(TEMPLATE_XPCOM_LDFLAGS.darwin)) - diff --git a/virtualbox/patches/patch-src_libs_xpcom18a4_Makefile.kmk b/virtualbox/patches/patch-src_libs_xpcom18a4_Makefile.kmk deleted file mode 100644 index b20b41efb0..0000000000 --- a/virtualbox/patches/patch-src_libs_xpcom18a4_Makefile.kmk +++ /dev/null @@ -1,31 +0,0 @@ -$NetBSD$ - ---- src/libs/xpcom18a4/Makefile.kmk.orig 2018-12-18 13:01:16.000000000 +0000 -+++ src/libs/xpcom18a4/Makefile.kmk -@@ -537,6 +537,7 @@ VBox-xpcom-nspr_DEFS.linux = \ - _PR_PTHREADS - # _BSD_SOURCE is here to keep the Glibc header files happy and make them include the right things - VBox-xpcom-nspr_DEFS.netbsd = \ -+ NETBSD=1 \ - _PR_PTHREADS - VBox-xpcom-nspr_DEFS.openbsd = \ - _PR_PTHREADS -@@ -629,6 +630,7 @@ VBox-xpcom-nspr_SOURCES.darwin = nsprpub - VBox-xpcom-nspr_SOURCES.darwin.x86 = nsprpub/pr/src/md/unix/os_Darwin_x86.s - - VBox-xpcom-nspr_SOURCES.freebsd = nsprpub/pr/src/md/unix/freebsd.c -+VBox-xpcom-nspr_SOURCES.netbsd = nsprpub/pr/src/md/unix/netbsd.c - - VBox-xpcom-nspr_SOURCES.linux = nsprpub/pr/src/md/unix/linux.c - VBox-xpcom-nspr_SOURCES.linux.x86 = nsprpub/pr/src/md/unix/os_Linux_x86.s -@@ -870,6 +872,10 @@ VBox-xpcom-xptcall_SOURCES.freebsd.x86 = - xpcom/reflect/xptcall/src/md/unix/xptcstubs_gcc_x86_unix.cpp - VBox-xpcom-xptcall_SOURCES.freebsd.amd64=xpcom/reflect/xptcall/src/md/unix/xptcinvoke_x86_64_linux.cpp \ - xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_64_linux.cpp -+VBox-xpcom-xptcall_SOURCES.netbsd.x86 = xpcom/reflect/xptcall/src/md/unix/xptcinvoke_gcc_x86_unix.cpp \ -+ xpcom/reflect/xptcall/src/md/unix/xptcstubs_gcc_x86_unix.cpp -+VBox-xpcom-xptcall_SOURCES.netbsd.amd64= xpcom/reflect/xptcall/src/md/unix/xptcinvoke_x86_64_linux.cpp \ -+ xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_64_linux.cpp - VBox-xpcom-xptcall_SOURCES.linux.x86 = xpcom/reflect/xptcall/src/md/unix/xptcinvoke_gcc_x86_unix.cpp \ - xpcom/reflect/xptcall/src/md/unix/xptcstubs_gcc_x86_unix.cpp - VBox-xpcom-xptcall_SOURCES.linux.amd64 = xpcom/reflect/xptcall/src/md/unix/xptcinvoke_x86_64_linux.cpp \ diff --git a/virtualbox/patches/patch-src_libs_xpcom18a4_nsprpub_pr_include_md___netbsd.h b/virtualbox/patches/patch-src_libs_xpcom18a4_nsprpub_pr_include_md___netbsd.h deleted file mode 100644 index 61bd5722fd..0000000000 --- a/virtualbox/patches/patch-src_libs_xpcom18a4_nsprpub_pr_include_md___netbsd.h +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD$ - ---- src/libs/xpcom18a4/nsprpub/pr/include/md/_netbsd.h.orig 2018-12-18 13:01:23.000000000 +0000 -+++ src/libs/xpcom18a4/nsprpub/pr/include/md/_netbsd.h -@@ -57,6 +57,8 @@ - #elif defined(__arm32__) || defined(__arm__) || defined(__armel__) \ - || defined(__armeb__) - #define _PR_SI_ARCHITECTURE "arm" -+#elif defined(__amd64__) -+#define _PR_SI_ARCHITECTURE "amd64" - #endif - - #if defined(__ELF__) diff --git a/virtualbox/patches/patch-src_libs_xpcom18a4_nsprpub_pr_include_md___pth.h b/virtualbox/patches/patch-src_libs_xpcom18a4_nsprpub_pr_include_md___pth.h deleted file mode 100644 index f5a637a915..0000000000 --- a/virtualbox/patches/patch-src_libs_xpcom18a4_nsprpub_pr_include_md___pth.h +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD$ - ---- src/libs/xpcom18a4/nsprpub/pr/include/md/_pth.h.orig 2018-12-18 13:01:23.000000000 +0000 -+++ src/libs/xpcom18a4/nsprpub/pr/include/md/_pth.h -@@ -231,7 +231,7 @@ - #define PT_PRIO_MAX sched_get_priority_max(SCHED_OTHER) - #endif /* defined(_PR_DCETHREADS) */ - --#elif defined(LINUX) || defined(FREEBSD) -+#elif defined(LINUX) || defined(FREEBSD) || defined(NETBSD) - #define PT_PRIO_MIN sched_get_priority_min(SCHED_OTHER) - #define PT_PRIO_MAX sched_get_priority_max(SCHED_OTHER) - #elif defined(NTO) diff --git a/virtualbox/patches/patch-src_libs_xpcom18a4_nsprpub_pr_src_linking_prlink.c b/virtualbox/patches/patch-src_libs_xpcom18a4_nsprpub_pr_src_linking_prlink.c deleted file mode 100644 index cc53822897..0000000000 --- a/virtualbox/patches/patch-src_libs_xpcom18a4_nsprpub_pr_src_linking_prlink.c +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD$ - ---- src/libs/xpcom18a4/nsprpub/pr/src/linking/prlink.c.orig 2018-12-18 13:01:26.000000000 +0000 -+++ src/libs/xpcom18a4/nsprpub/pr/src/linking/prlink.c -@@ -1810,7 +1810,7 @@ PR_LoadStaticLibrary(const char *name, c - PR_IMPLEMENT(char *) - PR_GetLibraryFilePathname(const char *name, PRFuncPtr addr) - { --#if defined(SOLARIS) || defined(LINUX) || defined(FREEBSD) -+#if defined(SOLARIS) || defined(LINUX) || defined(FREEBSD) || defined(NETBSD) - Dl_info dli; - char *result; -