Clean up map.c /map.h (mono/mono#16746)
authorSteffen Kieß <kiess@ki4.de>
Tue, 8 Oct 2019 10:04:45 +0000 (12:04 +0200)
committerAlexander Köplinger <alex.koeplinger@outlook.com>
Tue, 8 Oct 2019 10:04:45 +0000 (12:04 +0200)
* [Mono.Posix] Move Mono_Posix_{From,To}MremapFlags() to support/sys-mman.c

Since mono/mono@b522eab5ff5466debaacf9e971e26cfc464ebba5 Mono_Posix_FromMremapFlags()
and Mono_Posix_ToMremapFlags() contain manual changes for NetBSD. Move the
functions from support/map.c to support/sys-mman.c so that they won't be
overwritten when create-native-map is rerun.

* [Mono.Posix] Fix prototypes in support/stdio.c

In mono/mono@ed892ccf27849c082ce6ca46fa8b96d86ca7c329 wrapper functions for several
stdio functions were added, but the prototypes in map.h were manually
written, not using create-native-map. This commit changes the prototypes so
that they match the output of create-native-map.

* [Mono.Posix] Undefine HAVE_STRUCT_SOCKADDR_IN6 in support/map.c on MSVC

In mono/mono@22b6b9581418260397b701c17b16c3eb55136de7 a manual change to support/map.c
was added to prevent Mono_Posix_FromSockaddrIn6() and
Mono_Posix_ToSockaddrIn6() from being built for windows even if
HAVE_STRUCT_SOCKADDR_IN6 is defined. Instead undefine it in a header file
to avoid manual changes to map.c.

With this commit map.c, map.h and NativeConvert.generated.cs contain no
manual changes anymore.

Commit migrated from https://github.com/mono/mono/commit/8bb7b8645a2622462f065d53f252b922bb304134

src/mono/msvc/monoposixhelper.def

index 884a248..effba40 100644 (file)
@@ -12,7 +12,6 @@ Mono_Posix_FromMlockallFlags
 Mono_Posix_FromMmapFlags\r
 Mono_Posix_FromMmapProts\r
 Mono_Posix_FromMountFlags\r
-Mono_Posix_FromMremapFlags\r
 Mono_Posix_FromMsyncFlags\r
 Mono_Posix_FromOpenFlags\r
 Mono_Posix_FromPathconfName\r
@@ -97,7 +96,6 @@ Mono_Posix_ToMlockallFlags
 Mono_Posix_ToMmapFlags\r
 Mono_Posix_ToMmapProts\r
 Mono_Posix_ToMountFlags\r
-Mono_Posix_ToMremapFlags\r
 Mono_Posix_ToMsyncFlags\r
 Mono_Posix_ToOpenFlags\r
 Mono_Posix_ToPathconfName\r