Imported Upstream version 5.12.0.220

Former-commit-id: c477e03582759447177c6d4bf412cd2355aad476
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2018-04-24 09:31:23 +00:00
parent 8bd104cef2
commit 8fc30896db
1200 changed files with 29534 additions and 26161 deletions

View File

@@ -83,14 +83,14 @@ subdir = support
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(top_srcdir)/mkinstalldirs $(top_srcdir)/depcomp
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/iconv.m4 \
$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
$(top_srcdir)/m4/progtest.m4 $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/configure.ac
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_compile_flag.m4 \
$(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
$(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
@@ -324,6 +324,10 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INTL = @INTL@
INVARIANT_AOT_OPTIONS = @INVARIANT_AOT_OPTIONS@
JEMALLOC_AUTOCONF_FLAGS = @JEMALLOC_AUTOCONF_FLAGS@
JEMALLOC_CFLAGS = @JEMALLOC_CFLAGS@
JEMALLOC_CPPFLAGS = @JEMALLOC_CPPFLAGS@
JEMALLOC_LDFLAGS = @JEMALLOC_LDFLAGS@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBC = @LIBC@
@@ -352,6 +356,9 @@ MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
MONO_CORLIB_VERSION = @MONO_CORLIB_VERSION@
MONO_DL_NEED_USCORE = @MONO_DL_NEED_USCORE@
MONO_JEMALLOC_ASSERT = @MONO_JEMALLOC_ASSERT@
MONO_JEMALLOC_DEFAULT = @MONO_JEMALLOC_DEFAULT@
MONO_JEMALLOC_ENABLED = @MONO_JEMALLOC_ENABLED@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@

View File

@@ -46,6 +46,26 @@ mph_fstab_offsets[] = {
MPH_STRING_OFFSET (struct Mono_Posix_Syscall__Fstab, fs_type, MPH_STRING_OFFSET_PTR)
};
#elif defined (HAVE_FSTAB_H) && defined(_AIX)
/* AIX defines fstab, but it has contents like checklist */
typedef struct fstab mph_fstab;
static const mph_string_offset_t
fstab_offsets[] = {
MPH_STRING_OFFSET (struct fstab, fs_spec, MPH_STRING_OFFSET_PTR),
MPH_STRING_OFFSET (struct fstab, fs_file, MPH_STRING_OFFSET_PTR),
MPH_STRING_OFFSET (struct fstab, fs_type, MPH_STRING_OFFSET_PTR)
};
static const mph_string_offset_t
mph_fstab_offsets[] = {
MPH_STRING_OFFSET (struct Mono_Posix_Syscall__Fstab, fs_spec, MPH_STRING_OFFSET_PTR),
MPH_STRING_OFFSET (struct Mono_Posix_Syscall__Fstab, fs_file, MPH_STRING_OFFSET_PTR),
MPH_STRING_OFFSET (struct Mono_Posix_Syscall__Fstab, fs_type, MPH_STRING_OFFSET_PTR)
};
#elif defined (HAVE_FSTAB_H)
typedef struct fstab mph_fstab;

View File

@@ -201,7 +201,7 @@ setup_baud_rate (int baud_rate, gboolean *custom_baud_rate)
{
switch (baud_rate)
{
/*Some values are not defined on OSX and *BSD */
/*Some values are not defined on OSX, *BSD, or AIX */
#if defined(B921600)
case 921600:
baud_rate = B921600;
@@ -212,15 +212,21 @@ setup_baud_rate (int baud_rate, gboolean *custom_baud_rate)
baud_rate = B460800;
break;
#endif
#if defined(B230400)
case 230400:
baud_rate = B230400;
break;
#endif
#if defined(B115200)
case 115200:
baud_rate = B115200;
break;
#endif
#if defined(B57600)
case 57600:
baud_rate = B57600;
break;
#endif
case 38400:
baud_rate = B38400;
break;

View File

@@ -132,6 +132,18 @@ int Mono_Posix_FromRealTimeSignum (int offset, int *r)
#endif
#if HAVE_PSIGNAL
/*
* HACK: similar to the mkdtemp one in glib; turns out gcc "helpfully"
* shadows system headers with "fixed" versions that omit functions...
* in any case, psignal is another victim of poor GNU decisions. Even
* then, we may have to do this anyways, as psignal, while present in
* libc, isn't in PASE headers - so do it anyways
*/
#if defined(_AIX)
extern void psignal(int, const char *);
#endif
int
Mono_Posix_Syscall_psignal (int sig, const char* s)
{

View File

@@ -51,16 +51,24 @@ Mono_Posix_FromStat (struct Mono_Posix_Stat *from, void *_to)
to->st_atime = from->st_atime_;
to->st_mtime = from->st_mtime_;
to->st_ctime = from->st_ctime_;
#ifdef HAVE_STRUCT_STAT_ST_ATIM
#if HAVE_STRUCT_STAT_ST_ATIMESPEC
to->st_atimespec.tv_sec = from->st_atime_;
to->st_atimespec.tv_nsec = from->st_atime_nsec;
to->st_mtimespec.tv_sec = from->st_mtime_;
to->st_mtimespec.tv_nsec = from->st_mtime_nsec;
to->st_ctimespec.tv_sec = from->st_ctime_;
to->st_ctimespec.tv_nsec = from->st_ctime_nsec;
#else
# ifdef HAVE_STRUCT_STAT_ST_ATIM
to->st_atim.tv_nsec = from->st_atime_nsec;
#endif
#ifdef HAVE_STRUCT_STAT_ST_MTIM
# endif
# ifdef HAVE_STRUCT_STAT_ST_MTIM
to->st_mtim.tv_nsec = from->st_mtime_nsec;
#endif
#ifdef HAVE_STRUCT_STAT_ST_CTIM
# endif
# ifdef HAVE_STRUCT_STAT_ST_CTIM
to->st_ctim.tv_nsec = from->st_ctime_nsec;
# endif
#endif
return 0;
}
@@ -87,16 +95,21 @@ Mono_Posix_ToStat (void *_from, struct Mono_Posix_Stat *to)
to->st_atime_ = from->st_atime;
to->st_mtime_ = from->st_mtime;
to->st_ctime_ = from->st_ctime;
#ifdef HAVE_STRUCT_STAT_ST_ATIM
#if HAVE_STRUCT_STAT_ST_ATIMESPEC
to->st_atime_nsec = from->st_atimespec.tv_nsec;
to->st_mtime_nsec = from->st_mtimespec.tv_nsec;
to->st_ctime_nsec = from->st_ctimespec.tv_nsec;
#else
# ifdef HAVE_STRUCT_STAT_ST_ATIM
to->st_atime_nsec = from->st_atim.tv_nsec;
#endif
#ifdef HAVE_STRUCT_STAT_ST_MTIM
# endif
# ifdef HAVE_STRUCT_STAT_ST_MTIM
to->st_mtime_nsec = from->st_mtim.tv_nsec;
#endif
#ifdef HAVE_STRUCT_STAT_ST_CTIM
# endif
# ifdef HAVE_STRUCT_STAT_ST_CTIM
to->st_ctime_nsec = from->st_ctim.tv_nsec;
# endif
#endif
return 0;
}

View File

@@ -51,7 +51,15 @@ Mono_Posix_ToStatvfs (void *_from, struct Mono_Posix_Statvfs *to)
to->f_files = from->f_files;
to->f_ffree = from->f_ffree;
to->f_favail = from->f_favail;
/*
* On AIX with -D_ALL_SOURCE, fsid_t is a struct
* See: github.com/python/cpython/pull/4972
*/
#if defined(_AIX) && defined(_ALL_SOURCE)
to->f_fsid = from->f_fsid.val[0];
#else
to->f_fsid = from->f_fsid;
#endif
to->f_namemax = from->f_namemax;
if (Mono_Posix_ToMountFlags (from->f_flag, &to->f_flag) != 0)
@@ -74,7 +82,11 @@ Mono_Posix_FromStatvfs (struct Mono_Posix_Statvfs *from, void *_to)
to->f_files = from->f_files;
to->f_ffree = from->f_ffree;
to->f_favail = from->f_favail;
#if defined(_AIX) && defined(_ALL_SOURCE)
to->f_fsid.val[0] = from->f_fsid;
#else
to->f_fsid = from->f_fsid;
#endif
to->f_namemax = from->f_namemax;
if (Mono_Posix_FromMountFlags (from->f_flag, &flag) != 0)

View File

@@ -10,6 +10,9 @@
#include <sys/types.h>
#include <sys/time.h>
#include <string.h>
#ifdef __HAIKU__
#include <os/kernel/OS.h>
#endif
#include "map.h"
#include "mph.h"
@@ -47,11 +50,6 @@ Mono_Posix_Syscall_settimeofday (
struct Mono_Posix_Timeval *tv,
struct Mono_Posix_Timezone *tz)
{
#if defined(__HAIKU__)
/* FIXME: Haiku doesn't support this either, consider
using set_real_time_clock instead? */
return -1;
#else
struct timeval _tv = {0};
struct timeval *ptv = NULL;
struct timezone _tz = {0};
@@ -69,10 +67,14 @@ Mono_Posix_Syscall_settimeofday (
ptz = &_tz;
}
#ifdef __HAIKU__
set_real_time_clock(ptv->tv_sec);
r = 0;
#else
r = settimeofday (ptv, ptz);
#endif
return r;
#endif
}
static inline struct timeval*

View File

@@ -55,10 +55,20 @@ Mono_Posix_Syscall_syslog2 (int priority, const char *format, ...)
{
va_list ap;
#if HAVE_VSYSLOG
va_start (ap, format);
vsyslog (priority, format, ap);
va_end (ap);
#else
/* some OSes like AIX lack vsyslog; simulate with vsprintf */
char message[256];
va_start (ap, format);
vsnprintf(message, 256, format, ap);
va_end(ap);
syslog(priority, message);
#endif
return 0;
}

View File

@@ -49,6 +49,11 @@ Mono_Posix_Syscall_nanosleep (struct Mono_Posix_Timespec *req,
#endif
#ifdef HAVE_STIME
/* AIX has stime in libc, but not at all in headers, so declare here */
#if defined(_AIX)
extern int stime(time_t);
#endif
gint32
Mono_Posix_Syscall_stime (mph_time_t *t)
{

View File

@@ -20,6 +20,16 @@
#include <errno.h>
#include <limits.h>
#include <string.h> /* for swab(3) on Mac OS X */
#if defined(_AIX)
#include <netdb.h> /* for get/setdomainname */
/*
* Yet more stuff in libc that isn't in headers.
* Python does the same thing we do here.
* see: bugs.python.org/issue18259
*/
extern int sethostname(const char *, size_t);
extern int sethostid(long);
#endif
#include "mph.h" /* Don't remove or move after map.h! Works around issues with Android SDK unified headers */
#include "map.h"