Imported Upstream version 6.0.0.172

Former-commit-id: f3cc9b82f3e5bd8f0fd3ebc098f789556b44e9cd
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2019-04-12 14:10:50 +00:00
parent 8016999e4d
commit 64ac736ec5
32155 changed files with 3981439 additions and 75368 deletions

View File

@@ -222,6 +222,7 @@ am__recursive_targets = \
$(am__extra_recursive_targets)
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
distdir
am__extra_recursive_targets = test-recursive test-bundle-recursive
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates. Input order is
@@ -322,6 +323,7 @@ ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
EXTERNAL_LLVM_CONFIG = @EXTERNAL_LLVM_CONFIG@
EXTERNAL_LLVM_CONFIG_WIN32 = @EXTERNAL_LLVM_CONFIG_WIN32@
FGREP = @FGREP@
GDKX11 = @GDKX11@
GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
@@ -340,6 +342,7 @@ HAVE_ALLOCA_H = @HAVE_ALLOCA_H@
HAVE_MSGFMT = @HAVE_MSGFMT@
HAVE_NINJA = @HAVE_NINJA@
HAVE_UNISTD_H = @HAVE_UNISTD_H@
HAVE_YASM = @HAVE_YASM@
HOST_CC = @HOST_CC@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
@@ -373,6 +376,7 @@ MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
MONO_CORLIB_VERSION = @MONO_CORLIB_VERSION@
MONO_CXXLD = @MONO_CXXLD@
MONO_DL_NEED_USCORE = @MONO_DL_NEED_USCORE@
MONO_JEMALLOC_ASSERT = @MONO_JEMALLOC_ASSERT@
MONO_JEMALLOC_DEFAULT = @MONO_JEMALLOC_DEFAULT@
@@ -433,6 +437,7 @@ SHELL = @SHELL@
SIZEOF_VOID_P = @SIZEOF_VOID_P@
SQLITE = @SQLITE@
SQLITE3 = @SQLITE3@
STATIC_ZLIB_PATH = @STATIC_ZLIB_PATH@
STRIP = @STRIP@
TEST_PROFILE = @TEST_PROFILE@
USE_NLS = @USE_NLS@
@@ -502,7 +507,11 @@ mcs_topdir_from_srcdir = @mcs_topdir_from_srcdir@
mkdir_p = @mkdir_p@
mono_build_root = @mono_build_root@
mono_cfg_dir = @mono_cfg_dir@
mono_msvc_build_bin_dir = @mono_msvc_build_bin_dir@
mono_msvc_build_dir = @mono_msvc_build_dir@
mono_msvc_build_lib_dir = @mono_msvc_build_lib_dir@
mono_runtime = @mono_runtime@
mono_runtime_wrapper = @mono_runtime_wrapper@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
@@ -1011,6 +1020,8 @@ $(am__recursive_targets):
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
test-local:
test-bundle-local:
ID: $(am__tagged_files)
$(am__define_uniq_tagged_files); mkid -fID $$unique
@@ -1240,6 +1251,14 @@ ps: ps-recursive
ps-am:
test: test-recursive
test-am: test-local
test-bundle: test-bundle-recursive
test-bundle-am: test-bundle-local
uninstall-am: uninstall-eglibDATA
.MAKE: $(am__recursive_targets) install-am install-strip
@@ -1257,7 +1276,8 @@ uninstall-am: uninstall-eglibDATA
installdirs installdirs-am maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags tags-am uninstall uninstall-am uninstall-eglibDATA
tags tags-am test-am test-bundle-am test-bundle-local \
test-local uninstall uninstall-am uninstall-eglibDATA
# Tell versions [3.59,3.63) of GNU make to not export all variables.

View File

@@ -139,6 +139,7 @@
#define g_async_safe_vprintf monoeg_g_async_safe_vprintf
#define g_print monoeg_g_print
#define g_printf monoeg_g_printf
#define g_printv monoeg_g_printv
#define g_printerr monoeg_g_printerr
#define g_propagate_error monoeg_g_propagate_error
#define g_ptr_array_add monoeg_g_ptr_array_add
@@ -286,6 +287,7 @@
#define g_strdup monoeg_strdup
#define g_ucs4_to_utf16_len monoeg_ucs4_to_utf16_len
#define g_utf16_to_ucs4_len monoeg_utf16_to_ucs4_len
#define g_utf16_len monoeg_utf16_len
#define g_ascii_strcasecmp monoeg_ascii_strcasecmp
#define g_ascii_strup monoeg_ascii_strup

View File

@@ -30,6 +30,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include "../utils/mono-errno.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
@@ -113,7 +114,7 @@ g_mkdir_with_parents (const gchar *pathname, int mode)
int rv;
if (!pathname || *pathname == '\0') {
errno = EINVAL;
mono_set_errno (EINVAL);
return -1;
}

View File

@@ -73,7 +73,8 @@ g_clear_error (GError **gerror)
void
g_error_free (GError *gerror)
{
g_return_if_fail (gerror != NULL);
if (!gerror)
return;
g_free (gerror->message);
g_free (gerror);

View File

@@ -94,10 +94,21 @@ g_file_get_contents (const gchar *filename, gchar **contents, gsize *length, GEr
} while ((nread > 0 && offset < st.st_size) || (nread == -1 && errno == EINTR));
close (fd);
#ifdef G_OS_WIN32
// Windows defaults to O_TEXT for opened files, meaning that st_size can be larger than
// what's actually read into str due to new line conversion.
g_assert (offset <= st.st_size);
str [offset] = '\0';
if (length)
*length = offset;
#else
str [st.st_size] = '\0';
if (length) {
*length = st.st_size;
}
#endif
*contents = str;
return TRUE;
}

View File

@@ -58,11 +58,13 @@ g_file_test (const gchar *filename, GFileTest test)
if (access (filename, X_OK) == 0)
return TRUE;
}
#ifdef HAVE_LSTAT
if ((test & G_FILE_TEST_IS_SYMLINK) != 0) {
have_stat = (lstat (filename, &st) == 0);
if (have_stat && S_ISLNK (st.st_mode))
return TRUE;
}
#endif
if ((test & G_FILE_TEST_IS_REGULAR) != 0) {
if (!have_stat)

View File

@@ -123,7 +123,7 @@ g_file_set_contents (const gchar *filename, const gchar *contents, gssize length
else
name++;
path = g_strdup_printf (TMP_FILE_FORMAT, name - filename, filename, name);
path = g_strdup_printf (TMP_FILE_FORMAT, (int)(name - filename), filename, name);
if (!(fp = fopen (path, "wb"))) {
g_set_error (err, G_FILE_ERROR, g_file_error_from_errno (errno), "%s", g_strerror (errno));
g_free (path);

View File

@@ -29,6 +29,7 @@
#include <iconv.h>
#endif
#include <errno.h>
#include "../utils/mono-errno.h"
#ifdef _MSC_VER
#define FORCE_INLINE(RET_TYPE) __forceinline RET_TYPE
@@ -117,7 +118,7 @@ g_iconv_open (const char *to_charset, const char *from_charset)
guint i;
if (!to_charset || !from_charset || !to_charset[0] || !from_charset[0]) {
errno = EINVAL;
mono_set_errno (EINVAL);
return (GIConv) -1;
}
@@ -135,7 +136,7 @@ g_iconv_open (const char *to_charset, const char *from_charset)
if ((icd = iconv_open (to_charset, from_charset)) == (iconv_t) -1)
return (GIConv) -1;
#else
errno = EINVAL;
mono_set_errno (EINVAL);
return (GIConv) -1;
#endif
@@ -265,17 +266,17 @@ decode_utf32_endian (char *inbuf, size_t inleft, gunichar *outchar, unsigned end
gunichar c;
if (inleft < 4) {
errno = EINVAL;
mono_set_errno (EINVAL);
return -1;
}
c = read_uint32_endian (inptr, endian);
if (c >= 0xd800 && c < 0xe000) {
errno = EILSEQ;
mono_set_errno (EILSEQ);
return -1;
} else if (c >= 0x110000) {
errno = EILSEQ;
mono_set_errno (EILSEQ);
return -1;
}
@@ -302,7 +303,7 @@ encode_utf32be (gunichar c, char *outbuf, size_t outleft)
unsigned char *outptr = (unsigned char *) outbuf;
if (outleft < 4) {
errno = E2BIG;
mono_set_errno (E2BIG);
return -1;
}
@@ -320,7 +321,7 @@ encode_utf32le (gunichar c, char *outbuf, size_t outleft)
unsigned char *outptr = (unsigned char *) outbuf;
if (outleft < 4) {
errno = E2BIG;
mono_set_errno (E2BIG);
return -1;
}
@@ -348,7 +349,7 @@ decode_utf16_endian (char *inbuf, size_t inleft, gunichar *outchar, unsigned end
gunichar u;
if (inleft < 2) {
errno = EINVAL;
mono_set_errno (E2BIG);
return -1;
}
@@ -361,14 +362,14 @@ decode_utf16_endian (char *inbuf, size_t inleft, gunichar *outchar, unsigned end
} else if (u < 0xdc00) {
/* 0xd800 -> 0xdbff */
if (inleft < 4) {
errno = EINVAL;
mono_set_errno (EINVAL);
return -2;
}
c = read_uint16_endian (inptr + 2, endian);
if (c < 0xdc00 || c > 0xdfff) {
errno = EILSEQ;
mono_set_errno (EILSEQ);
return -2;
}
@@ -378,7 +379,7 @@ decode_utf16_endian (char *inbuf, size_t inleft, gunichar *outchar, unsigned end
return 4;
} else if (u < 0xe000) {
/* 0xdc00 -> 0xdfff */
errno = EILSEQ;
mono_set_errno (EILSEQ);
return -1;
} else {
/* 0xe000 -> 0xffff */
@@ -420,7 +421,7 @@ encode_utf16_endian (gunichar c, char *outbuf, size_t outleft, unsigned endian)
if (c < 0x10000) {
if (outleft < 2) {
errno = E2BIG;
mono_set_errno (E2BIG);
return -1;
}
@@ -428,7 +429,7 @@ encode_utf16_endian (gunichar c, char *outbuf, size_t outleft, unsigned endian)
return 2;
} else {
if (outleft < 4) {
errno = E2BIG;
mono_set_errno (E2BIG);
return -1;
}
@@ -469,7 +470,7 @@ decode_utf8 (char *inbuf, size_t inleft, gunichar *outchar)
*outchar = u;
return 1;
} else if (u < 0xc2) {
errno = EILSEQ;
mono_set_errno (EILSEQ);
return -1;
} else if (u < 0xe0) {
u &= 0x1f;
@@ -487,12 +488,12 @@ decode_utf8 (char *inbuf, size_t inleft, gunichar *outchar)
u &= 0x01;
n = 6;
} else {
errno = EILSEQ;
mono_set_errno (EILSEQ);
return -1;
}
if (n > inleft) {
errno = EINVAL;
mono_set_errno (EINVAL);
return -1;
}
@@ -541,7 +542,7 @@ encode_utf8 (gunichar c, char *outbuf, size_t outleft)
}
if (outleft < n) {
errno = E2BIG;
mono_set_errno (E2BIG);
return -1;
}
@@ -577,12 +578,12 @@ static int
encode_latin1 (gunichar c, char *outbuf, size_t outleft)
{
if (outleft < 1) {
errno = E2BIG;
mono_set_errno (E2BIG);
return -1;
}
if (c > 0xff) {
errno = EILSEQ;
mono_set_errno (EILSEQ);
return -1;
}
@@ -863,7 +864,7 @@ eg_utf8_to_utf16_general (const gchar *str, glong len, glong *items_read, glong
if (replace_invalid_codepoints) {
u = 2;
} else {
errno = EILSEQ;
mono_set_errno (EILSEQ);
goto error;
}
}

View File

@@ -84,7 +84,7 @@ struct g_cast
private:
void * const x;
public:
explicit g_cast (void *y) : x(y) { }
explicit g_cast (void volatile *y) : x((void*)y) { }
// Lack of rvalue constructor inhibits ternary operator.
// Either don't use ternary, or cast each side.
// sa = (salen <= 128) ? g_alloca (salen) : g_malloc (salen);
@@ -265,6 +265,12 @@ typedef guint32 gunichar;
#define G_GUINT32_FORMAT PRIu32
#define G_GINT32_FORMAT PRIi32
#ifdef __GNUC__
#define G_ATTR_FORMAT_PRINTF(fmt_pos,arg_pos) __attribute__((__format__(__printf__,fmt_pos,arg_pos)))
#else
#define G_ATTR_FORMAT_PRINTF(fmt_pos,arg_pos)
#endif
/*
* Allocation
*/
@@ -350,7 +356,7 @@ void g_propagate_error (GError **dest, GError *src);
* Strings utility
*/
G_EXTERN_C // Used by libtest, at least.
gchar *g_strdup_printf (const gchar *format, ...);
gchar *g_strdup_printf (const gchar *format, ...) G_ATTR_FORMAT_PRINTF(1, 2);
gchar *g_strdup_vprintf (const gchar *format, va_list args);
gchar *g_strndup (const gchar *str, gsize n);
const gchar *g_strerror (gint errnum);
@@ -376,10 +382,10 @@ gchar *g_strescape (const gchar *source, const gchar *exceptions);
gchar *g_filename_to_uri (const gchar *filename, const gchar *hostname, GError **gerror);
gchar *g_filename_from_uri (const gchar *uri, gchar **hostname, GError **gerror);
gint g_printf (gchar const *format, ...);
gint g_fprintf (FILE *file, gchar const *format, ...);
gint g_sprintf (gchar *string, gchar const *format, ...);
gint g_snprintf (gchar *string, gulong n, gchar const *format, ...);
gint g_printf (gchar const *format, ...) G_ATTR_FORMAT_PRINTF(1, 2);
gint g_fprintf (FILE *file, gchar const *format, ...) G_ATTR_FORMAT_PRINTF(2, 3);
gint g_sprintf (gchar *string, gchar const *format, ...) G_ATTR_FORMAT_PRINTF(2, 3);
gint g_snprintf (gchar *string, gulong n, gchar const *format, ...) G_ATTR_FORMAT_PRINTF(3, 4);
gint g_vasprintf (gchar **ret, const gchar *fmt, va_list ap);
#define g_vprintf vprintf
#define g_vfprintf vfprintf
@@ -406,8 +412,8 @@ gboolean g_utf16_asciiz_equal (const gunichar2 *utf16, const char *ascii);
/* FIXME: g_strcasecmp supports utf8 unicode stuff */
#ifdef _MSC_VER
#define g_strcasecmp stricmp
#define g_strncasecmp strnicmp
#define g_strcasecmp _stricmp
#define g_strncasecmp _strnicmp
#define g_strstrip(a) g_strchug (g_strchomp (a))
#else
#define g_strcasecmp strcasecmp
@@ -431,8 +437,9 @@ GString *g_string_new_len (const gchar *init, gssize len);
GString *g_string_sized_new (gsize default_size);
gchar *g_string_free (GString *string, gboolean free_segment);
GString *g_string_append (GString *string, const gchar *val);
void g_string_printf (GString *string, const gchar *format, ...);
void g_string_append_printf (GString *string, const gchar *format, ...);
void g_string_printf (GString *string, const gchar *format, ...) G_ATTR_FORMAT_PRINTF(2, 3);
void g_string_append_printf (GString *string, const gchar *format, ...) G_ATTR_FORMAT_PRINTF(2, 3);
void g_string_append_vprintf (GString *string, const gchar *format, va_list args);
GString *g_string_append_unichar (GString *string, gunichar c);
GString *g_string_append_c (GString *string, gchar c);
@@ -891,7 +898,11 @@ GUnicodeBreakType g_unichar_break_type (gunichar c);
#endif
/* g_assert is a boolean expression; the precise value is not preserved, just true or false. */
#ifdef DISABLE_ASSERT_MESSAGES
#define g_assert(x) (G_LIKELY((x)) ? 1 : (g_assertion_message ("* Assertion at %s:%d, condition `%s' not met\n", __FILE__, __LINE__, "<disabled>"), 0))
#else
#define g_assert(x) (G_LIKELY((x)) ? 1 : (g_assertion_message ("* Assertion at %s:%d, condition `%s' not met\n", __FILE__, __LINE__, #x), 0))
#endif
#define g_assert_not_reached() G_STMT_START { g_assertion_message ("* Assertion: should not be reached at %s:%d\n", __FILE__, __LINE__); eg_unreachable(); } G_STMT_END
@@ -947,6 +958,7 @@ gchar *g_utf16_to_utf8 (const gunichar2 *str, glong len, glong *items_read,
gunichar *g_utf16_to_ucs4 (const gunichar2 *str, glong len, glong *items_read, glong *items_written, GError **err);
gchar *g_ucs4_to_utf8 (const gunichar *str, glong len, glong *items_read, glong *items_written, GError **err);
gunichar2 *g_ucs4_to_utf16 (const gunichar *str, glong len, glong *items_read, glong *items_written, GError **err);
size_t g_utf16_len (const gunichar2 *);
#define u8to16(str) g_utf8_to_utf16(str, (glong)strlen(str), NULL, NULL, NULL)

View File

@@ -169,7 +169,7 @@ g_get_home_dir (void)
return home_dir;
}
const char *
const gchar *
g_get_user_name (void)
{
get_pw_data ();

View File

@@ -182,7 +182,7 @@ g_get_home_dir (void)
return home_dir;
}
const char *
const gchar *
g_get_user_name (void)
{
const char * retName = g_getenv ("USER");

View File

@@ -226,7 +226,7 @@ write_all (int fd, const void *vbuf, size_t n)
return nwritten;
}
#ifndef G_OS_WIN32
#if !defined(G_OS_WIN32) && defined(HAVE_GETDTABLESIZE)
int
eg_getdtablesize (void)
{

View File

@@ -1056,3 +1056,16 @@ g_strnfill (gsize length, gchar fill_char)
ret [length] = 0;
return ret;
}
size_t
g_utf16_len (const gunichar2 *a)
{
#ifdef G_OS_WIN32
return wcslen (a);
#else
size_t length = 0;
while (a [length])
++length;
return length;
#endif
}

View File

@@ -167,6 +167,7 @@ am__can_run_installinfo = \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__extra_recursive_targets = test-recursive test-bundle-recursive
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates. Input order is
@@ -242,6 +243,7 @@ ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
EXTERNAL_LLVM_CONFIG = @EXTERNAL_LLVM_CONFIG@
EXTERNAL_LLVM_CONFIG_WIN32 = @EXTERNAL_LLVM_CONFIG_WIN32@
FGREP = @FGREP@
GDKX11 = @GDKX11@
GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
@@ -260,6 +262,7 @@ HAVE_ALLOCA_H = @HAVE_ALLOCA_H@
HAVE_MSGFMT = @HAVE_MSGFMT@
HAVE_NINJA = @HAVE_NINJA@
HAVE_UNISTD_H = @HAVE_UNISTD_H@
HAVE_YASM = @HAVE_YASM@
HOST_CC = @HOST_CC@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
@@ -293,6 +296,7 @@ MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
MONO_CORLIB_VERSION = @MONO_CORLIB_VERSION@
MONO_CXXLD = @MONO_CXXLD@
MONO_DL_NEED_USCORE = @MONO_DL_NEED_USCORE@
MONO_JEMALLOC_ASSERT = @MONO_JEMALLOC_ASSERT@
MONO_JEMALLOC_DEFAULT = @MONO_JEMALLOC_DEFAULT@
@@ -353,6 +357,7 @@ SHELL = @SHELL@
SIZEOF_VOID_P = @SIZEOF_VOID_P@
SQLITE = @SQLITE@
SQLITE3 = @SQLITE3@
STATIC_ZLIB_PATH = @STATIC_ZLIB_PATH@
STRIP = @STRIP@
TEST_PROFILE = @TEST_PROFILE@
USE_NLS = @USE_NLS@
@@ -422,7 +427,11 @@ mcs_topdir_from_srcdir = @mcs_topdir_from_srcdir@
mkdir_p = @mkdir_p@
mono_build_root = @mono_build_root@
mono_cfg_dir = @mono_cfg_dir@
mono_msvc_build_bin_dir = @mono_msvc_build_bin_dir@
mono_msvc_build_dir = @mono_msvc_build_dir@
mono_msvc_build_lib_dir = @mono_msvc_build_lib_dir@
mono_runtime = @mono_runtime@
mono_runtime_wrapper = @mono_runtime_wrapper@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
@@ -619,6 +628,8 @@ mostlyclean-libtool:
clean-libtool:
-rm -rf .libs _libs
test-local:
test-bundle-local:
ID: $(am__tagged_files)
$(am__define_uniq_tagged_files); mkid -fID $$unique
@@ -806,6 +817,14 @@ ps: ps-am
ps-am:
test: test-am
test-am: test-local
test-bundle: test-bundle-am
test-bundle-am: test-bundle-local
uninstall-am:
.MAKE: install-am install-strip
@@ -822,7 +841,8 @@ uninstall-am:
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags tags-am uninstall uninstall-am
tags tags-am test-am test-bundle-am test-bundle-local \
test-local uninstall uninstall-am
# Something amiss with subdirs ordering?