Age | Commit message (Collapse) | Author |
|
Both 'ptv' and 'tv' are unused since select() was replaced with poll() in 57b521e.
|
|
This has the following benefits:
* Clearer structure for mirroring
* Slight build time improvement on bundled zlib use (as it only builds once)
* Removes pages of subdir-objects spew from autogen
|
|
* [Mono.Posix] Add support for memfd_create() and file sealing
Add the linux syscall memfd_create() and add support for file sealing with
fcntl().
* Bump API snapshot submodule
|
|
|
|
* [Mono.Posix] Move Mono_Posix_{From,To}MremapFlags() to support/sys-mman.c
Since 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 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 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.
|
|
* Build MSVC only runtime using make file system.
Add a new option to only build MSVC version of mono runtime and native
tools, --enable-msvc-only. In the past, --enable-msvc build both
mingw as well as MSVC runtime, this commit adds an option to only build
MSVC version of runtime and native tools using make file system.
Commit updates all native make file making sure mingw/gcc builds are
not done if --enable-msvc-only has been used. It also makes sure we
build and use MSVC based tools as part of build and tests.
Result will be a build without any mingw/gcc artifacts, but where all
existing make files still works with the MSVC build artifacts.
This commits is also preparing to switch the .NETCore build over to use
MSVC build runtime in order to get LLVM support, something that is
currently only supported on Windows MSVC build.
* Add link to mono-sgen.exe and clean windows binaries.
* Fix failures in mono/tests test-aot on Windows.
* Add fullaot-mixed tests on Windows x64.
* Run msbuild in parallel.
* Default to x64 mingw host on cygwin build.
|
|
.c. (#15502)
inlining is up to the compiler to decide.
It is used in .h files for linkage/dedup, not to affect codegen.
|
|
Add F_OFD_GETLK, F_OFD_SETLK and F_OFD_SETLKW to FcntlCommand. These
commmands are similar to F_GETLK, F_SETLK and F_SETLKW but operate on a
per-open-file-description lock instead of a per-process lock and avoid the
problem that the locks are released when close(dup(fd)) is called. See
https://lwn.net/Articles/586904/ for more information.
This commit also reruns create-native-map but keeps manual changes from
ed892ccf27849c082ce6ca46fa8b96d86ca7c329,
b522eab5ff5466debaacf9e971e26cfc464ebba5 and
22b6b9581418260397b701c17b16c3eb55136de7.
In [create-native-map.diff.txt](https://github.com/mono/mono/files/3557077/create-native-map.diff.txt) you can see the difference between the commited `map.[ch]` and the one `create-native-map.exe` wants to create:
- Manually inserted changes for NetBSD (`MAYMOVE` is turned into a negated `FIXED`)
- `Mono_Posix_ToSockaddrIn6()` and friends get skipped for `HOST_WIN32` (not sure why, when `sockaddr_in6` exists then `Mono_Posix_ToSockaddrIn6()` should work)
- At the bottom of `map.h` some functions are reordered and the parameters change (`const char*` vs. `char*`)
Running create-native-map.exe also moved some O_NOATIME-related stuff (from 8b9033e4d24115190c06f775d18ef3a40cbca876) to the correct position and added it to Mono_Posix_ToOpenFlags(), which I kept in the commit.
|
|
it doesn't have f*64 funcs, it seems
|
|
* Fix linking of OS-provided zlib
This is a reduced version of https://github.com/mono/mono/pull/16091
without the Z_PREFIX stuff
* Get rid of HAVE_ZLIB, be explicit about HAVE_SYS_ZLIB vs HAVE_STATIC_ZLIB
* Proposed fixes from Alex
|
|
|
|
Circa 2010 to circa 2017.
Retrieved with apt-get source zlib on WSL Ubuntu 18.04.2 LTS.
This matches Debian or Ubuntu (they differ by one commit, and one of them restores a dummy function for compat).
---
* [minizip] Ensure we don't ever accidentally change calling convention
Make sure we always #define ZCALLBACK to empty so we don't change
the calling convention on windows by including a header which defines
'CALLBACK'. This will keep things as cdecl as required by the c#
pinvokes.
* Update zlib readme.
* Update zlib from 1.2.5 to 1.2.11.
* [zlib] Small fix for Visual C++.
see https://github.com/madler/zlib/pull/435/files#diff-0558e84b0c24a83ca790dcb05cd26212R1087
and https://github.com/madler/zlib/pull/435/files#diff-0558e84b0c24a83ca790dcb05cd26212R1104
* Add gzguts.h to Makefiles.
* Add .h files to Visual Studio project files just for GUI purposes.
|
|
O_NOATIME (Linux > 2.6.8): Do not update the file last access time (st_atime in the inode) when the file is read(2). Programs that merely index the existence of a file (backup programs e.g.) can reduce disk load using this flag.
|
|
|
|
calloc. (#15505)
|
|
In managed, these functions are used as `static external IntPtr`. This means that previously on arm64 the top bits of the return value were garbage. A comparison with 64-bit -1 like in LinuxNetworkChange.EnsureSocket would never be true, which was causing us to hit other assertions in the runtime.
Co-authored-by: Aleksey Kliger <alklig@microsoft.com>
|
|
rename. (#13663)
Also make cimag/creal macros for guaranteed inlining -- instead of passing structs by value.
And add spaces before parens to follow coding convention (which is designed
to ease low tech searches for entire words).
This was agreed to when the code was first ported to C++ but got dropped.
The compromise though was to put the defines relatively late to limit their impact.
|
|
It turns out that homebrew now has a package for the MinGW gcc-based windows
cross compiler which is awesome as it allows us to skip building MXE and use the
latest version of the GCC suite pre-packaged for Mac. This commit removes almost
all traces of MXE (except for `mxe.mk` itself, because I don't know if any bot
or external tool, whatever, use targets in it) and adds the following brew
packages to SDK bot provisioning as well as to the `provision-mxe` target of
Mono SDKs:
* mingw-w64
* xamarin/xamarin-android-windeps/mingw-zlib
The latter package builds a Windows version of zlib using MinGW and it comes
from Xamarin's own homebrew tap at https://github.com/xamarin/homebrew-xamarin-android-windeps/blob/f4cc90845ff1953800d8d71035566a12d9b7aa24/mingw-zlib.rb
Additionally, this commit adds a new `configure` flag: `--with-static-zlib=PATH`
which allows one to specify the static zlib archive to use when linking Mono.
The static archive supersedes the otherwise indicated or detected zlib. This is
the recommended mode of operation for MinGW builds as it avoids problems with
`zlib.dll` versions on the target machine.
|
|
Fixes https://github.com/mono/mono/issues/11697
|
|
DeflateStream now correctly handles exceptions thrown by it's inner stream and
rethrows them after returning from native code.
|
|
The test-bundle target copies all assets needed for test execution
to a specified directory. We upload this directory to Helix and use it
to run our mainline tests.
|
|
Remove unused mono_pages_not_faulted, autoconf for mlock instead of mincore.
|
|
|
|
|
|
|
|
[runtime] Use AC_FUNC_STRERROR_R() in Mono.Posix
Hopefully this is less of a disaster than #9691
Inspired by https://github.com/mono/mono/commit/3b3b48dbb4cdbda44ffa2f10e74f819acb78bd96
Fixes https://github.com/mono/mono/issues/9532
Signed-off-by: Joe Groocock <me@frebib.net>
<!--
Thank you for your Pull Request!
If you are new to contributing to Mono, please try to do your best at conforming to our coding guidelines http://www.mono-project.com/community/contributing/coding-guidelines/ but don't worry if you get something wrong. One of the project members will help you to get things landed.
Does your pull request fix any of the existing issues? Please use the following format: Fixes #issue-number
-->
|
|
Inspired by https://github.com/mono/mono/commit/3b3b48dbb4cdbda44ffa2f10e74f819acb78bd96
Fixes https://github.com/mono/mono/issues/9532
Signed-off-by: Joe Groocock <me@frebib.net>
|
|
* [cxx] Port complex math to small portable C and C++ with the only dependency being hypot and non-complex math, and small preexisting code we already had for msvc.
I.e. we already had two versions, with varying portability.
Use one of them, adding about three lines to it.
There was some debate back and forth about macros/renames here.
This version significantly reduces line damage and is much easier to read.
Doing the rename as a separate step may still be advisable, to erase any doubt as to portable semantics, i.e. namespace isolation.
Mono style divergence is also left unfixed to avoid further line damage.
i.e. consider `double_complex` => `MonoComplex`.
`mono_double_complex_` => `mono_complex_`.
|
|
Not sure what is happening here. Is the type incorrect throughout, or being passed to wrong function?
|
|
from detecting the dependency on libeglib.la. (#8184)
* [runtime] Get rid of the GLIB_LIBS autoconf define, it prevents automake from detecting the dependency on libeglib.la. Fixes #8175.
* [runtime] Link eglib against -lm to avoid duplication.
* [runtime] Remove a few extra -lm options.
* [runtime] More GLIB_LIBS fixes.
|
|
add some OpenBSD patches
Hi,
A few trivial additions of OpenBSD to ifdefs, plus the change of the abort signal to SIGUSR1 which fixes the SIGABRT problem (other compilation problems remain). SIGTTIN is broadcast to the process group which leads to the SIGABRT (at least on OpenBSD).
|
|
It is enough to check for iconv
dependencies once in the eglib/configure
- just use the generated libtool
library file to automatically
add additional dependencies (if any).
While here, make sue libeglib.a
has libraries returned by LTLIBTOOL
as a libtool dependency.
|
|
building of support library (#7652)
* [sdks] Simply building of support library
* [sdks] Fix concurrent building of MonoAotOffsetsDumper.exe
* [sdks] Cleanup of some targets
|
|
unprototyped. (#6691)
|
|
platforms.
|
|
* Get autotools scripts for Mono and Boehm to recognize i
PASE is most similar to AIX, and perhaps I assume other commercial
Unices, as well as PowerPC Linux, so grab variables from them as
needed.
With this, we get glib failing to build due to missing mkdtemp.
* Use better cpp definition to grab more of what we want
* Fix random and 64-bit file offset support
* Set TARGET on IBM i on POWER
* Add hack to gfile-unix.c to work around flawed AIX header
From comment:
/* HACK: the preprocessor will not give us mkdtemp no matter
what and Mono (for good reason) does
"-Werror-implicit-function-declaration" so we error out;
instead declare mkdtemp here; the linker will find mkdtemp
anwyays. libuv has had similar issues, but they just ignore
the compiler warning instead of failing on it.
See: github.com/libuv/libuv/pull/740 */
* Work around missing definition on AIX/PASE
* Fix conflicting definition from due too AIX headers
* Initial work to get JIT working on AIX
* uncertain about NIP; is IAR the right register? need review from
PPC asm people
* needs calling convention work; AIX does NOT use ELF
* Fix lack of casting on sigcontext macros, fix errnos for AIX
* AIX doesn't distinguish between ENOTEMPTY and EEXIST without a
define. Handle this case with a conditional cpp directive..
* When ctx is a void pointer, dereferencing as a struct will fail.
Handle this case with a cast.
* Handle regular AIX as well as PASE
* Implement stack boundaries check for AIX, volume info func
* vol info should be like other Unix, just needs to bridge ifdef
* highly uncertain for the bounds checking, needs further review
* Fix typo in mono/utils/mono-threads-aix.c
* In boehm-gc.c, don't use pthread_getattr_np on AIX even if available
It's not available on IBM i, and even if available, toolchains for AIX
may "helpfully" swap out system headers with variants that remove
functions like pthread_getattr_np.
* Don't use "-export-dynamic" on non-GNU ld
IBM ld considers "-e" to be a flag for setting the entry point.
Detect non-GNU ld, and offer equivalents when possible.
The makefile in mini had to be changed as a result due to
hardcoded flags.
* Use pthread-stop-world.c on AIX
Remove an ifdef that gated this off to AIX. It seems the old AIX
specific files shouldn't be used, and that the changelog for libgc
says pthread should work fine on AIX instead; yet it was blocked.
Restore this, as it compiles and seems to let mono-boehm link fine.
* AIX workarounds for some of support dir
* fstab on AIX is there, but defines a struct more like other
platforms' checklist struct.
* AIX, like macOS and some BSDs, doesn't define some serial types.
* psignal is another victim of GNU; even then it isn't in PASE
headers anyways
* More support workarounds for AIX headers
* Replacement function body for syslog2 on vsyslog-less platforms
AIX lacks vsyslog; detect in autoconf and act appropriately.
* Final support hacks for AIX
* Fix problematic stack management on AIX
this gets us past ifdefs, after much handwringing
* get the right end of the stack; r1/stack pointer is on the wrong
end and ustk is just plain broken
* AIX doesn't seem to like the semantics of the mmap call valloc
does here; either we're allocating into an area we shouldn't be
or we're not passing the right flags. Until then, learn to live
without the stack guard?
* Disable Boehm GC on AIX
Focus on getting SGen working, and avoid legacy debugging nonsense
* Remove AIX ifdef-undef and replace with s/hz/uhz
* Don't use sigaltstack on AIX due to bugginess with guard sections
The valloc call on AIX has issues after issuing mprotect; don't do
do it. I believe it fails because we aren't issuing the right
flags on AIX, or because we're allocating inside of an already
allocated area.
* Perform a 64-bit build on AIX
We still crash at the same place, but probably for the best that
we switch to 64-bit. (Maybe we could make it configurable?)
* Fix func descriptor ifdef, add initial (likely wrong) defs for AIX
* AIX doesn't define __powerpc64__ or __ppc64__ when compiling as
64-bit. Use an alternate ifdef, and shuffle around that ifdef
anyways, as it could lead to wrong results on other platforms
too.
* AIX likely needs special definitions, especially on 32-bit. The
calling convention is closest to PPC64BE Linux, but not exactly.
* Fix stack size on AIX
Ruby dealt with this before: https://github.com/ruby/ruby/commit/a2594be783c727c6034308f5294333752c3845bb
* Set up initial PPC hwcap for AIX, fix ftnptr ifdefs, tweak AIX defs
* Fix hwcap to use better values on PPC AIX
Still needs more adjustment though
* Fix alignment issue on AIX, tweak mini-ppc values just a bit more
* On AIX, doubles are always aligned by 4 if they're in structs.
Since we need to have them aligned by 8 on 64-bit, this is bad,
so change the type on AIX.
* We can use this definition on AIX
Now we can bootstrap Mono!
* Shuffle MonoArray ifdef per suggestion of @vargaz
* Fix System.Decimal division on big endian systems
Before, we got non-sensical overflow on things like
`(Decimal)Int32.MaxValue / 1000`; now they get the same value,
comparing this POWER6 running AIX to my server's output running
OpenBSD/amd64.
* Fix dynamically linked build of Mono on AIX
nm wasn't seeing 64-bit symbools as it defaults to 32-bit mode,
also never try to use GNU nm
* Fix PPC64 define in mono-config
Interestingly, there was an AIX define already present, and that
definition is present in AIX's passed includes, so continue to use
it.
* Don't use __thread even if detected on AIX
tl;dr: The assembler gets angry with __thread and minimal-toc, and
changing options to replace minimal-toc causes linker issues; this
TLS option isn't important anyways if we have pthread instead,
like before when we were using Perzl's old GCC without __thread.
* Get lib.a(lib.o) type archives working with P/Invoke for AIX
AIX libraries are very, very strange compared to other Unices.
I'm not entirely sure if this is correct or optimal; it may need
to special case further. For now, it's enough to get gacutil
up and running.
Some resources I found useful for this charade:
<http://stromberg.dnsalias.org/~dstromberg/AIX-shared-libs.html>
Also set libc and libintl to their proper values.
* Scheduling priority hack for i
PASE doesn't accept anything other than SCHED_OTHER, and the funcs
for getting min/max don't work either. AIX suffers, but only a
little bit.
* Final polish on request
Remove Boehm changes if we don't use Boehm, tweak some defines,
remove some externs, tweak autoconf file
* Be aware of ERESTART, on OSes that use it
Instead of EINTR/EAGAIN, AIX uses ERESTART. Handle this, so things
like xsp are less chatty when performing async IO.
|
|
(Fixes: 6283) (#6307)
* Adds support for nanosecond resolution file information where available.
This patch adds support to the runtime to use the nanosecond
information available on Mac and Linux on `struct stat`.
`stat.st_Xtimespec` strucutre on OSX, and `stat.st_Xtime` and
`stat.st_Xtim.tv_nsec` pair on Linux.
Additionally, this adds support in `Mono.Posix` for MacOS nanosecond stat
data, it already had Linux support before.
* Use ULL here to prevent the computation from overflowing
|
|
* Compile on amd64 Haiku
Use sigcontext (somewhat like win32, or x86) on Haiku amd64.
On amd64, Haiku doesn't have issues with marshalling 64-bit values,
but it currently does have issues with SGen either causing a stall
or a core dump. As such, while it can compile the stdlib (further
than x86 got), it's still a work in progress.
* Use set_real_time_clock for sys-time.c on Haiku
* Get mono-boehm compiling on Haiku again
It still doesn't work. Initialization will call GC_mark_from, which
will cause a segmentation fault as it decrements pointers. (Mono
will enter an infinite loop in mono_get_hazardous_pointer as a result.)
For now, mono-sgen will continue to be used by default.
|
|
Any translation unit that includes a Mono header should include <config.h>
first to ensure that all of our configuration defines are available.
In particular, config.h defines MONO_INSIDE_RUNTIME which, in mono-publib.h causes
MONO_RT_EXTERNAL_ONLY to be defined to an attribute that causes a compilation
error if you use a function that is internally deprecated for the runtime.
Also change a couple of places that used non-_checked functions.
|
|
|
|
1.5 stop bits have not been handled at all.
According to this documentation of the 8250 UART:
http://stanislavs.org/helppc/8250.html
a set bit 2 in the LCR register means stop bits = 1.5 for 5 bit words or 2 for 6, 7 or 8 bit words.
That is the reason why pyserial also sets the bit:
https://github.com/pyserial/pyserial/blob/92d101613be41ecb2f2054c3f43a006fbe6f9966/serial/serialposix.py#L377
|
|
mono_atomic_<op>_<type>, with a consistent signature on all platforms, including Windows implementation. (#5767)
* [runtime] Rename atomic functions from the win32 style naming to mono_atomic_<op>_<type>, with a consistent signature on all platforms. This fixes a large number of warnings on windows.
* Add Windows implementaiton of mono_atomic_*.
* Windows implementation of mono_atomic_* inline functions.
* Changed naming typo in mono_atomic_xchg_i32Add and mono_atomic_xchg_i32Add64.
* Fixed some additional signed/unsigned/volatile warnings when using mono_atomic_*
* Fixed some smaller additionl warnings.
* Fix Interlocked* to mono_atomic_* name change in signal.c
* Additional name adjustment of atomics.
Aligning more towards C11/C++11 standard namings:
mono_atomic_xchg_add_i32|i64 -> mono_atomic_fetch_add_i32|i64
Changed from mono_atomic_add to mono_atomic_fetch_add in cases when return
type is not used.
Also includes small mingw build fix on Windows.
* Aligned loads with C++11 implementation using explicit compiler barrier.
On x86/x64 Windows, reading a properly aligned 8,16,32 bit volatile variable
(using /volatile:ms extension) should have acquire semantics. On x64
this also includes 64-bit properly aligned volatile variables.
The C++11 implementation does however include an explicit _ReadWriteBarrier in
its sequentially consistent implementation to instruct compiler to not reorder
load/stores. Since compiler supports two modes of volatile behavior (ms/iso)
this additional barrier is probably there for consistency, independent of the
behavior of volatile keyword.
NOTE, the x86/x64 CPU architecture has strong guarantees regarding load/store of
memory operations, so issuing a CPU memory barrier for loads should not be needed
(and is not done in C++11 atomics implementation).
This commit also adds a couple of optimizations for 32-bit loads and for x64,
64-bits loads. The C++11 implementation uses the same pattern loading them as 8
and 16 bits variables, so no need for Interlocked* calls to load 32-bit and for x64
64-bit variables.
|
|
Up until NDK release 14 Android SDK included a separate set of C header
files for each supported platform. NDK 14 introduced a new set of those
headers (they are NOT the same as the old ones) which unifies support
for all of the platforms so that bug fixes are available for all the
API levels without having to backport etc. With NDK 15 the unified headers
become the default ones (including when creating standalone toolchains)
and with NDK 16 (in beta currently) the old per-platform headers are removed.
Unfortunately, the new headers introduce breaking changes which made it
impossible to build Mono with NDK configured to use them. This commit makes
a handful of changes to Mono which make it build with unified headers.
|
|
Found a consecutive 'not' pair while searching the code for somethng else.
|
|
|
|
* Fix compiler warnings (w32)
- add explicit (long long (unsigned)) type casts
- change %ld to %lld once, to match the general style of these logging messages
* Fix compiler warnings (threadpool)
- add explicit (void *) type casts
* Fix compiler warnings (boehm)
- add an explicit (long) type cast; the values are defined as gint64, an upgrade to at least "%ld" seems like a good idea
- about dropping const: const does not seem to be necessary as g_getenv() returns pointers to freshly allocated buffers whenever called. const might have been used to protect the return value of g_getenv() on unix systems with earlier versions of Mono (as a comment in gmisc-unix.c suggests). keeping const here causes a compiler warning, as the const qualifier gets dropped when *env is being used with g_free(). that led to the decision to drop the qualifier altogether.
* Fix compiler warnings (sgen)
- specify the arguments (void) to avoid -Wstrict-prototypes warnings
* Fix compiler warnings (misc - metadata)
- specify the arguments (void) to avoid -Wstrict-prototypes warnings
* Fix compiler warnings (misc)
- specify the arguments (void) to avoid -Wstrict-prototypes warnings
- add an explicit (void *) type cast; changing the return type to char* might be more usable and could be discussed
- ret is not being used and can be removed; fixes a -Wunused-but-set-variable warning
* Fix compiler warnings (mini)
- specify the arguments (void) to avoid -Wstrict-prototypes warnings
* [fixup!] Correct indentation
* [fixup!] Correct (void *)
- use GUINT_TO_POINTER and MONO_NATIVE_THREAD_ID_TO_UINT instead of (void *) to cast mono_native_thread_id_get () to %p
* [fixup!] Correct indentation of boehm-gc.c and add FIXME
* include <inttypes.h> and test the G_GINT64_FORMAT macro
* [fixup!] Use G_G*_FORMAT and PRIx32 macros instead of type casts wherever possible
|
|
This enables IPv6 support on Windows.
|
|
* detect sys/errno.h
* Fix errenous LIBS in haiku
* use HAVE_MINCORE
|
|
These return no-ops, but its enough to make it happy
|
|
Also reverts the changes done to support/map.c. This is a generated file which
shouldn't be changed directly. An alternate fix for the problem in map.c on
Windows was to make sure L_SET et al are defined in mph.h which was already
done for Solaris.
|