pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

corefx-git: Misc. patches for native assemblies



Module Name:	pkgsrc-wip
Committed By:	jasonwilliams200ok <necmon%yahoo.com@localhost>
Pushed By:	danglingpointer
Date:		Mon Feb 8 00:21:35 2016 +0000
Changeset:	f538da1543493456004b962b1a0ace0ed1b2951a

Modified Files:
	corefx-git/distinfo
	corefx-git/patches/patch-src_Native_configure.cmake
Added Files:
	corefx-git/patches/patch-src_Native_Common_pal__config.h.in
	corefx-git/patches/patch-src_Native_System.Native_pal__errno.cpp
	corefx-git/patches/patch-src_Native_System.Native_pal__mount.cpp
	corefx-git/patches/patch-src_Native_System.Native_pal__networking.cpp

Log Message:
corefx-git: Misc. patches for native assemblies

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=f538da1543493456004b962b1a0ace0ed1b2951a

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 corefx-git/distinfo                                |  6 ++-
 .../patch-src_Native_Common_pal__config.h.in       | 27 +++++++++++
 .../patch-src_Native_System.Native_pal__errno.cpp  | 50 ++++++++++++++++++++
 .../patch-src_Native_System.Native_pal__mount.cpp  | 54 ++++++++++++++++++++++
 ...ch-src_Native_System.Native_pal__networking.cpp |  2 +
 .../patches/patch-src_Native_configure.cmake       | 36 ++++++++++++++-
 6 files changed, 172 insertions(+), 3 deletions(-)

diffs:
diff --git a/corefx-git/distinfo b/corefx-git/distinfo
index 29204d8..abfa8cd 100644
--- a/corefx-git/distinfo
+++ b/corefx-git/distinfo
@@ -1,5 +1,7 @@
 $NetBSD$
-SHA1 (patch-src_Native_Common_pal__config.h.in) = df846d4283b3faa55c6b629ed9772afd40ff5d3c
+SHA1 (patch-src_Native_Common_pal__config.h.in) = 723dd7903117965a2a08d53ea933190da1cb4a43
 SHA1 (patch-src_Native_System.Native_pal__errno.cpp) = 80c19049b465824ebd518c367e228231f12b5022
 SHA1 (patch-src_Native_System.Native_pal__interfaceaddresses.cpp) = 4f82e6f028fe2b9826ba6afb62869e42a0b6ee3d
-SHA1 (patch-src_Native_configure.cmake) = 383369775e46d22780ae7448cfb62b9dace09215
+SHA1 (patch-src_Native_System.Native_pal__mount.cpp) = 7858f5ff60fcb0d60452648aef1b1034698e2c85
+SHA1 (patch-src_Native_System.Native_pal__networking.cpp) = adc83b19e793491b1c6ea0fd8b46cd9f32e592fc
+SHA1 (patch-src_Native_configure.cmake) = 75b19df39006a76ccd60145fe98561675671fc11
diff --git a/corefx-git/patches/patch-src_Native_Common_pal__config.h.in b/corefx-git/patches/patch-src_Native_Common_pal__config.h.in
new file mode 100644
index 0000000..6f64ac2
--- /dev/null
+++ b/corefx-git/patches/patch-src_Native_Common_pal__config.h.in
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- src/Native/Common/pal_config.h.in.orig	2016-02-07 13:49:29.000000000 +0000
++++ src/Native/Common/pal_config.h.in
+@@ -7,6 +7,7 @@
+ #cmakedefine01 HAVE_DIRENT_NAME_LEN
+ #cmakedefine01 HAVE_MNTINFO
+ #cmakedefine01 HAVE_STATFS_FSTYPENAME
++#cmakedefine01 HAVE_VFS_NAMELEN
+ #cmakedefine01 HAVE_STRCPY_S
+ #cmakedefine01 HAVE_STRLCPY
+ #cmakedefine01 HAVE_SHM_OPEN_THAT_WORKS_WELL_ENOUGH_WITH_MMAP
+@@ -15,11 +16,14 @@
+ #cmakedefine01 HAVE_IN6_U
+ #cmakedefine01 HAVE_IOCTL
+ #cmakedefine01 HAVE_TIOCGWINSZ
++#cmakedefine01 HAVE_ENOTRECOVERABLE
++#cmakedefine01 HAVE_EOWNERDEAD
+ #cmakedefine01 HAVE_SCHED_GETAFFINITY
+ #cmakedefine01 HAVE_SCHED_SETAFFINITY
+ #cmakedefine01 HAVE_FDS_BITS
+ #cmakedefine01 HAVE_PRIVATE_FDS_BITS
+ #cmakedefine01 HAVE_ALLOCA_H
++#cmakedefine01 HAVE_SYS_STATVFS
+ #cmakedefine01 HAVE_EPOLL
+ #cmakedefine01 HAVE_KQUEUE
+ #cmakedefine01 HAVE_GETHOSTBYNAME_R
diff --git a/corefx-git/patches/patch-src_Native_System.Native_pal__errno.cpp b/corefx-git/patches/patch-src_Native_System.Native_pal__errno.cpp
new file mode 100644
index 0000000..1ce814c
--- /dev/null
+++ b/corefx-git/patches/patch-src_Native_System.Native_pal__errno.cpp
@@ -0,0 +1,50 @@
+$NetBSD$
+
+--- src/Native/System.Native/pal_errno.cpp.orig	2016-02-07 13:49:29.000000000 +0000
++++ src/Native/System.Native/pal_errno.cpp
+@@ -126,8 +126,10 @@ extern "C" Error SystemNative_ConvertErr
+             return PAL_ENOTDIR;
+         case ENOTEMPTY:
+             return PAL_ENOTEMPTY;
++#if HAVE_ENOTRECOVERABLE
+         case ENOTRECOVERABLE:
+             return PAL_ENOTRECOVERABLE;
++#endif
+         case ENOTSOCK:
+             return PAL_ENOTSOCK;
+         case ENOTSUP:
+@@ -138,8 +140,10 @@ extern "C" Error SystemNative_ConvertErr
+             return PAL_ENXIO;
+         case EOVERFLOW:
+             return PAL_EOVERFLOW;
++#if HAVE_EOWNERDEAD
+         case EOWNERDEAD:
+             return PAL_EOWNERDEAD;
++#endif
+         case EPERM:
+             return PAL_EPERM;
+         case EPIPE:
+@@ -299,7 +303,11 @@ extern "C" int32_t SystemNative_ConvertE
+         case PAL_ENOTEMPTY:
+             return ENOTEMPTY;
+         case PAL_ENOTRECOVERABLE:
++#if HAVE_ENOTRECOVERABLE
+             return ENOTRECOVERABLE;
++#else
++            return -1;
++#endif
+         case PAL_ENOTSOCK:
+             return ENOTSOCK;
+         case PAL_ENOTSUP:
+@@ -311,7 +319,11 @@ extern "C" int32_t SystemNative_ConvertE
+         case PAL_EOVERFLOW:
+             return EOVERFLOW;
+         case PAL_EOWNERDEAD:
++#if HAVE_EOWNERDEAD
+             return EOWNERDEAD;
++#else
++            return -1;
++#endif
+         case PAL_EPERM:
+             return EPERM;
+         case PAL_EPIPE:
diff --git a/corefx-git/patches/patch-src_Native_System.Native_pal__mount.cpp b/corefx-git/patches/patch-src_Native_System.Native_pal__mount.cpp
new file mode 100644
index 0000000..b617698
--- /dev/null
+++ b/corefx-git/patches/patch-src_Native_System.Native_pal__mount.cpp
@@ -0,0 +1,54 @@
+$NetBSD$
+
+--- src/Native/System.Native/pal_mount.cpp.orig	2016-02-07 13:49:29.000000000 +0000
++++ src/Native/System.Native/pal_mount.cpp
+@@ -22,7 +22,11 @@ static int32_t GetMountInfo(MountPointFo
+ {
+ #if HAVE_MNTINFO
+     // getmntinfo returns pointers to OS-internal structs, so we don't need to worry about free'ing the object
++#if HAVE_SYS_STATVFS
++    struct statvfs* mounts = nullptr;
++#else
+     struct statfs* mounts = nullptr;
++#endif
+     int count = getmntinfo(&mounts, 0);
+     for (int32_t i = 0; i < count; i++)
+     {
+@@ -68,8 +72,13 @@ extern "C" int32_t SystemNative_GetSpace
+     assert(name != nullptr);
+     assert(mpi != nullptr);
+ 
+-    struct statfs stats = {};
++#if HAVE_SYS_STATVFS
++    struct statvfs stats = {};
++    int result = statvfs(name, &stats);
++#else
++    struct statvfs stats = {};
+     int result = statfs(name, &stats);
++#endif
+     if (result == 0)
+     {
+         // Note that these have signed integer types on some platforms but musn't be negative.
+@@ -98,13 +107,22 @@ SystemNative_GetFormatInfoForMountPoint(
+     assert((formatNameBuffer != nullptr) && (formatType != nullptr));
+     assert(bufferLength > 0);
+ 
++#if HAVE_SYS_STATVFS
++    struct statvfs stats;
++    int result = statvfs(name, &stats);
++#else
+     struct statfs stats;
+     int result = statfs(name, &stats);
++#endif
+     if (result == 0)
+     {
+ 
+ #if HAVE_STATFS_FSTYPENAME
++#if HAVE_VFS_NAMELEN
++        if (bufferLength < VFS_NAMELEN)
++#else
+         if (bufferLength < MFSNAMELEN)
++#endif
+         {
+             result = ERANGE;
+             *formatType = 0;
diff --git a/corefx-git/patches/patch-src_Native_System.Native_pal__networking.cpp b/corefx-git/patches/patch-src_Native_System.Native_pal__networking.cpp
new file mode 100644
index 0000000..afc7651
--- /dev/null
+++ b/corefx-git/patches/patch-src_Native_System.Native_pal__networking.cpp
@@ -0,0 +1,2 @@
+$NetBSD$
+
diff --git a/corefx-git/patches/patch-src_Native_configure.cmake b/corefx-git/patches/patch-src_Native_configure.cmake
index 4bbe3e8..aa21d7e 100644
--- a/corefx-git/patches/patch-src_Native_configure.cmake
+++ b/corefx-git/patches/patch-src_Native_configure.cmake
@@ -10,7 +10,18 @@ $NetBSD$
  
  # in_pktinfo: Find whether this struct exists
  check_include_files(
-@@ -75,6 +76,16 @@ check_symbol_exists(
+@@ -34,6 +35,10 @@ check_include_files(
+     alloca.h
+     HAVE_ALLOCA_H)
+ 
++check_include_files(
++    sys/statvfs.h
++    HAVE_SYS_STATVFS)
++
+ check_function_exists(
+     stat64
+     HAVE_STAT64)
+@@ -75,6 +80,16 @@ check_symbol_exists(
      "sys/ioctl.h"
      HAVE_TIOCGWINSZ)
  
@@ -27,3 +38,26 @@ $NetBSD$
  check_function_exists(
      tcgetattr
      HAVE_TCGETATTR)
+@@ -117,6 +132,22 @@ check_struct_has_member(
+     HAVE_STATFS_FSTYPENAME)
+ 
+ check_struct_has_member(
++    "struct statvfs"
++    f_fstypename
++    "sys/mount.h"
++    HAVE_STATVFS_FSTYPENAME)
++
++if (HAVE_STATVFS_FSTYPENAME)
++    set(HAVE_STATFS_FSTYPENAME 1)
++endif ()
++
++check_symbol_exists(
++    VFS_NAMELEN
++    "sys/mount.h"
++    HAVE_VFS_NAMELEN
++)
++
++check_struct_has_member(
+     "struct in6_addr"
+     __in6_u
+     "netdb.h"


Home | Main Index | Thread Index | Old Index