pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
ats2: Update to 0.3.13
Module Name: pkgsrc-wip
Committed By: Atsushi Toyokura <asteria.at%gmail.com@localhost>
Pushed By: steleto
Date: Tue Feb 19 01:55:59 2019 +0900
Changeset: f3123eacf4e6e4bb6ffba7dc2a14760bca30431a
Modified Files:
ats2/Makefile
ats2/distinfo
Added Files:
virtualbox/patches/patch-include_VBox_types.h
virtualbox/patches/patch-include_iprt_types.h
virtualbox/patches/patch-src_VBox_Devices_Audio_DrvHostOSSAudio.cpp
virtualbox/patches/patch-src_VBox_Devices_EFI_Firmware_AppPkg_Applications_Python_PyMod-2.7.2_Include_pyport.h
virtualbox/patches/patch-src_VBox_Devices_Network_lwip-new_vbox_include_arch_cc.h
virtualbox/patches/patch-src_VBox_Main_include_USBProxyBackend.h
virtualbox/patches/patch-src_VBox_Main_src-server_netbsd_USBProxyBackendNetBSD.cpp
virtualbox/patches/patch-src_libs_xpcom18a4_Config.kmk
virtualbox/patches/patch-src_libs_xpcom18a4_Makefile.kmk
virtualbox/patches/patch-src_libs_xpcom18a4_nsprpub_pr_include_md___netbsd.h
virtualbox/patches/patch-src_libs_xpcom18a4_nsprpub_pr_include_md___pth.h
virtualbox/patches/patch-src_libs_xpcom18a4_nsprpub_pr_src_linking_prlink.c
Log Message:
ats2: Update to 0.3.13
0.3.13
This is the 50th release of ATS2, the successor of the
ATS programming language. The compiler for ATS2 is given
the name ATS/Positats, ATS2/Postiats or simply Postiats.
The official website for ATS is:
http://www.ats-lang.org
ATS-Postiats is hosted at github:
https://github.com/githwxi/ATS-Postiats
Major releases of ATS2 are available at:
https://sourceforge.net/projects/ats2-lang/
Major releases of external packages for ATS2 are available at:
https://sourceforge.net/projects/ats2-lang-contrib/
Here is a list of major additions and changes since the last release:
1. Fixing the issue of escaping '$' in PHP string literals (atscc2php)
Kudos to M88!
2. Fixing very minor issues in libats/qlist and libats/linmap
3. Enforcing that no d2var can be leaked/exported from a namespace
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=f3123eacf4e6e4bb6ffba7dc2a14760bca30431a
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
ats2/Makefile | 8 +-
ats2/distinfo | 8 +-
virtualbox/patches/patch-include_VBox_types.h | 15 +
virtualbox/patches/patch-include_iprt_types.h | 13 +
...atch-src_VBox_Devices_Audio_DrvHostOSSAudio.cpp | 30 ++
...pplications_Python_PyMod-2.7.2_Include_pyport.h | 23 ++
...Devices_Network_lwip-new_vbox_include_arch_cc.h | 12 +
.../patch-src_VBox_Main_include_USBProxyBackend.h | 41 +++
...ain_src-server_netbsd_USBProxyBackendNetBSD.cpp | 356 +++++++++++++++++++++
.../patches/patch-src_libs_xpcom18a4_Config.kmk | 36 +++
.../patches/patch-src_libs_xpcom18a4_Makefile.kmk | 31 ++
...libs_xpcom18a4_nsprpub_pr_include_md___netbsd.h | 13 +
...rc_libs_xpcom18a4_nsprpub_pr_include_md___pth.h | 13 +
..._libs_xpcom18a4_nsprpub_pr_src_linking_prlink.c | 13 +
14 files changed, 602 insertions(+), 10 deletions(-)
diffs:
diff --git a/ats2/Makefile b/ats2/Makefile
index bb5510e34e..34087a42f0 100644
--- a/ats2/Makefile
+++ b/ats2/Makefile
@@ -1,6 +1,6 @@
# $NetBSD$
-DISTNAME= ATS2-Postiats-0.3.12
+DISTNAME= ATS2-Postiats-0.3.13
CATEGORIES= lang
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=ats2-lang/}
EXTRACT_SUFX= .tgz
@@ -17,11 +17,7 @@ USE_TOOLS+= gmake
MAKE_JOBS_SAFE= no
MAKE_FLAGS+= LDFLAGS+=
-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"
+WRKSRC= ${WRKDIR}/${PKGBASE}-gmp-${PKGVERSION_NOREV}
.include "../../devel/gmp/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/ats2/distinfo b/ats2/distinfo
index 27711a1753..b5374d9178 100644
--- a/ats2/distinfo
+++ b/ats2/distinfo
@@ -1,7 +1,7 @@
$NetBSD$
-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 (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 (patch-Makefile) = 6695c27284c2e5f765439f0d2b77c3bda3c2a5ed
diff --git a/virtualbox/patches/patch-include_VBox_types.h b/virtualbox/patches/patch-include_VBox_types.h
new file mode 100644
index 0000000000..2bf1550952
--- /dev/null
+++ b/virtualbox/patches/patch-include_VBox_types.h
@@ -0,0 +1,15 @@
+$NetBSD$
+
+--- include/VBox/types.h.orig 2018-12-18 12:51:31.000000000 +0000
++++ include/VBox/types.h
+@@ -29,6 +29,10 @@
+ #include <VBox/cdefs.h>
+ #include <iprt/types.h>
+
++#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
new file mode 100644
index 0000000000..a0a8f778a5
--- /dev/null
+++ b/virtualbox/patches/patch-include_iprt_types.h
@@ -0,0 +1,13 @@
+$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 <stdbool.h> is not available, but bool is
+ * provided by <sys/types.h> included above.
+ */
+-# include <stdbool.h>
+-
+ /*
+ * ... but the story doesn't end here. The C standard says that
+ * <stdbool.h> 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
new file mode 100644
index 0000000000..f1f5cdd7a2
--- /dev/null
+++ b/virtualbox/patches/patch-src_VBox_Devices_Audio_DrvHostOSSAudio.cpp
@@ -0,0 +1,30 @@
+$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 <sys/mman.h>
+ #include <sys/soundcard.h>
+ #include <unistd.h>
++#if defined(RT_OS_NETBSD)
++#include <strings.h>
++#endif
+
+ #include <iprt/alloc.h>
+ #include <iprt/uuid.h> /* 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
new file mode 100644
index 0000000000..957472c043
--- /dev/null
+++ b/virtualbox/patches/patch-src_VBox_Devices_EFI_Firmware_AppPkg_Applications_Python_PyMod-2.7.2_Include_pyport.h
@@ -0,0 +1,23 @@
+$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
new file mode 100644
index 0000000000..49d5eb90cd
--- /dev/null
+++ b/virtualbox/patches/patch-src_VBox_Devices_Network_lwip-new_vbox_include_arch_cc.h
@@ -0,0 +1,12 @@
+$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 <sys/time.h>
+ #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
new file mode 100644
index 0000000000..d656925f41
--- /dev/null
+++ b/virtualbox/patches/patch-src_VBox_Main_include_USBProxyBackend.h
@@ -0,0 +1,41 @@
+$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<HostUSBDevice> &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
new file mode 100644
index 0000000000..241dca8e0d
--- /dev/null
+++ b/virtualbox/patches/patch-src_VBox_Main_src-server_netbsd_USBProxyBackendNetBSD.cpp
@@ -0,0 +1,356 @@
+$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 <VBox/usb.h>
++#include <VBox/usblib.h>
++#include <VBox/err.h>
++
++#include <iprt/string.h>
++#include <iprt/alloc.h>
++#include <iprt/assert.h>
++#include <iprt/file.h>
++#include <iprt/err.h>
++#include <iprt/mem.h>
++#include <iprt/param.h>
++#include <iprt/path.h>
++#include <iprt/semaphore.h>
++
++#include <stdlib.h>
++#include <string.h>
++#include <stdio.h>
++#include <errno.h>
++#include <unistd.h>
++#include <fcntl.h>
++#include <sys/poll.h>
++#include <dev/usb/usb.h>
++#include <dev/usb/usb_ioctl.h>
++
++
++/*********************************************************************************************************************************
++* 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
new file mode 100644
index 0000000000..cc94f49cc5
--- /dev/null
+++ b/virtualbox/patches/patch-src_libs_xpcom18a4_Config.kmk
@@ -0,0 +1,36 @@
+$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
new file mode 100644
index 0000000000..b20b41efb0
--- /dev/null
+++ b/virtualbox/patches/patch-src_libs_xpcom18a4_Makefile.kmk
@@ -0,0 +1,31 @@
+$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
new file mode 100644
index 0000000000..61bd5722fd
--- /dev/null
+++ b/virtualbox/patches/patch-src_libs_xpcom18a4_nsprpub_pr_include_md___netbsd.h
@@ -0,0 +1,13 @@
+$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
new file mode 100644
index 0000000000..f5a637a915
--- /dev/null
+++ b/virtualbox/patches/patch-src_libs_xpcom18a4_nsprpub_pr_include_md___pth.h
@@ -0,0 +1,13 @@
+$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
new file mode 100644
index 0000000000..cc53822897
--- /dev/null
+++ b/virtualbox/patches/patch-src_libs_xpcom18a4_nsprpub_pr_src_linking_prlink.c
@@ -0,0 +1,13 @@
+$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;
+
Home |
Main Index |
Thread Index |
Old Index