Imported Upstream version 4.6.0.125

Former-commit-id: a2155e9bd80020e49e72e86c44da02a8ac0e57a4
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2016-08-03 10:59:49 +00:00
parent a569aebcfd
commit e79aa3c0ed
17047 changed files with 3137615 additions and 392334 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -16,4 +16,4 @@ endif
endif
endif
EXTRA_DIST = autogen.sh README NEWS AUTHORS ChangeLog winconfig.h
EXTRA_DIST = autogen.sh README NEWS AUTHORS winconfig.h

View File

@@ -82,11 +82,10 @@ subdir = .
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(top_srcdir)/configure $(am__configure_deps) \
$(srcdir)/config.h.in $(top_srcdir)/../mkinstalldirs AUTHORS \
COPYING ChangeLog NEWS README TODO config.rpath \
$(top_srcdir)/../compile $(top_srcdir)/../config.guess \
$(top_srcdir)/../config.rpath $(top_srcdir)/../config.sub \
$(top_srcdir)/../install-sh $(top_srcdir)/../ltmain.sh \
$(top_srcdir)/../missing
COPYING NEWS README TODO config.rpath $(top_srcdir)/../compile \
$(top_srcdir)/../config.guess $(top_srcdir)/../config.rpath \
$(top_srcdir)/../config.sub $(top_srcdir)/../install-sh \
$(top_srcdir)/../ltmain.sh $(top_srcdir)/../missing
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 \
@@ -354,7 +353,7 @@ AM_CFLAGS = $(WERROR_CFLAGS)
@CROSS_COMPILING_TRUE@@HOST_WIN32_FALSE@@PLATFORM_DARWIN_FALSE@SUBDIRS = m4 src
@HOST_WIN32_FALSE@@PLATFORM_DARWIN_TRUE@SUBDIRS = m4 src
@HOST_WIN32_TRUE@SUBDIRS = m4 src
EXTRA_DIST = autogen.sh README NEWS AUTHORS ChangeLog winconfig.h
EXTRA_DIST = autogen.sh README NEWS AUTHORS winconfig.h
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive

View File

@@ -1 +1 @@
f1c77cc9e77e8b57e9e1f2308c20317786f8adef
e6c748208dd33485e04939f7cbb59545aa05f3a3

View File

@@ -193,10 +193,6 @@ if test $ac_cv_sizeof_void_p = $ac_cv_sizeof_int; then
GUINT_TO_POINTER="((gpointer) (v))"
GSIZE="int"
GSIZE_FORMAT='"u"'
G_GUINT64_FORMAT='"llu"'
G_GINT64_FORMAT='"lld"'
G_GUINT32_FORMAT='"lu"'
G_GINT32_FORMAT='"ld"'
elif test $ac_cv_sizeof_void_p = $ac_cv_sizeof_long; then
GPOINTER_TO_INT="((gint)(long) (ptr))"
GPOINTER_TO_UINT="((guint)(long) (ptr))"
@@ -204,10 +200,6 @@ elif test $ac_cv_sizeof_void_p = $ac_cv_sizeof_long; then
GUINT_TO_POINTER="((gpointer)(gulong) (v))"
GSIZE="long"
GSIZE_FORMAT='"lu"'
G_GUINT64_FORMAT='"lu"'
G_GINT64_FORMAT='"ld"'
G_GUINT32_FORMAT='"u"'
G_GINT32_FORMAT='"d"'
elif test $ac_cv_sizeof_void_p = $ac_cv_sizeof_long_long; then
GPOINTER_TO_INT="((gint)(long long) (ptr))"
GPOINTER_TO_UINT="((guint)(unsigned long long) (ptr))"
@@ -215,10 +207,6 @@ elif test $ac_cv_sizeof_void_p = $ac_cv_sizeof_long_long; then
GUINT_TO_POINTER="((gpointer)(unsigned long long) (v))"
GSIZE="long long"
GSIZE_FORMAT='"I64u"'
G_GUINT64_FORMAT='"I64u"'
G_GINT64_FORMAT='"I64i"'
G_GUINT32_FORMAT='"I32u"'
G_GINT32_FORMAT='"I32i"'
else
AC_MSG_ERROR([unsupported pointer size])
fi

View File

@@ -27,10 +27,6 @@ typedef unsigned @GSIZE@ gsize;
typedef signed @GSIZE@ gssize;
#define G_GSIZE_FORMAT @GSIZE_FORMAT@
#define G_GUINT64_FORMAT @G_GUINT64_FORMAT@
#define G_GINT64_FORMAT @G_GINT64_FORMAT@
#define G_GUINT32_FORMAT @G_GUINT32_FORMAT@
#define G_GINT32_FORMAT @G_GINT32_FORMAT@
#if @G_HAVE_ISO_VARARGS@ == 1
#define G_HAVE_ISO_VARARGS

View File

@@ -26,27 +26,14 @@ typedef int pid_t;
#define G_SEARCHPATH_SEPARATOR_S ";"
#define G_SEARCHPATH_SEPARATOR ';'
#define G_GSIZE_FORMAT "d"
#define G_GUINT64_FORMAT "d"
#define G_GINT64_FORMAT "d"
#define GPOINTER_TO_INT(ptr) ((gint)(intptr_t) (ptr))
#define GPOINTER_TO_UINT(ptr) ((guint)(intptr_t) (ptr))
#define GINT_TO_POINTER(v) ((gpointer)(intptr_t) (v))
#define GUINT_TO_POINTER(v) ((gpointer)(intptr_t) (v))
/* VS 2010 and later have stdint.h */
#if defined(_MSC_VER) && _MSC_VER < 1600
#define INT32_MAX 2147483647
#define INT32_MIN (~ INT32_MAX)
#define INT64_MAX 9223372036854775807i64
#define INT64_MIN (~INT64_MAX)
#define UINT32_MAX 0xffffffffU
#define UINT64_MAX 0xffffffffffffffffULL
#endif
#define STDOUT_FILENO (int)(intptr_t)stdout
#define STDERR_FILENO (int)(intptr_t)stderr
/* FIXME: what should this be ?*/
#define X_OK 4 /* This is really read */
#define WNOHANG 1

View File

@@ -777,42 +777,9 @@ g_convert (const gchar *str, gssize len, const gchar *to_charset, const gchar *f
*/
/**
* from http://home.tiscali.nl/t876506/utf8tbl.html
* An explanation of the conversion can be found at:
* http://home.tiscali.nl/t876506/utf8tbl.html
*
* From Unicode UCS-4 to UTF-8:
* Start with the Unicode number expressed as a decimal number and call this ud.
*
* If ud <128 (7F hex) then UTF-8 is 1 byte long, the value of ud.
*
* If ud >=128 and <=2047 (7FF hex) then UTF-8 is 2 bytes long.
* byte 1 = 192 + (ud div 64)
* byte 2 = 128 + (ud mod 64)
*
* If ud >=2048 and <=65535 (FFFF hex) then UTF-8 is 3 bytes long.
* byte 1 = 224 + (ud div 4096)
* byte 2 = 128 + ((ud div 64) mod 64)
* byte 3 = 128 + (ud mod 64)
*
* If ud >=65536 and <=2097151 (1FFFFF hex) then UTF-8 is 4 bytes long.
* byte 1 = 240 + (ud div 262144)
* byte 2 = 128 + ((ud div 4096) mod 64)
* byte 3 = 128 + ((ud div 64) mod 64)
* byte 4 = 128 + (ud mod 64)
*
* If ud >=2097152 and <=67108863 (3FFFFFF hex) then UTF-8 is 5 bytes long.
* byte 1 = 248 + (ud div 16777216)
* byte 2 = 128 + ((ud div 262144) mod 64)
* byte 3 = 128 + ((ud div 4096) mod 64)
* byte 4 = 128 + ((ud div 64) mod 64)
* byte 5 = 128 + (ud mod 64)
*
* If ud >=67108864 and <=2147483647 (7FFFFFFF hex) then UTF-8 is 6 bytes long.
* byte 1 = 252 + (ud div 1073741824)
* byte 2 = 128 + ((ud div 16777216) mod 64)
* byte 3 = 128 + ((ud div 262144) mod 64)
* byte 4 = 128 + ((ud div 4096) mod 64)
* byte 5 = 128 + ((ud div 64) mod 64)
* byte 6 = 128 + (ud mod 64)
**/
gint
g_unichar_to_utf8 (gunichar c, gchar *outbuf)

View File

@@ -13,11 +13,7 @@
#pragma include_alias(<eglib-config.h>, <eglib-config.hw>)
#endif
/* VS 2010 and later have stdint.h */
#if defined(_MSC_VER) && _MSC_VER < 1600
#else
#include <stdint.h>
#endif
#include <eglib-config.h>
#ifndef EGLIB_NO_REMAP
@@ -63,21 +59,6 @@ typedef const void * gconstpointer;
typedef char gchar;
typedef unsigned char guchar;
#if !G_TYPES_DEFINED
/* VS 2010 and later have stdint.h */
#if defined(_MSC_VER) && _MSC_VER < 1600
typedef __int8 gint8;
typedef unsigned __int8 guint8;
typedef __int16 gint16;
typedef unsigned __int16 guint16;
typedef __int32 gint32;
typedef unsigned __int32 guint32;
typedef __int64 gint64;
typedef unsigned __int64 guint64;
typedef float gfloat;
typedef double gdouble;
typedef int gboolean;
#else
/* Types defined in terms of the stdint.h */
typedef int8_t gint8;
typedef uint8_t guint8;
@@ -90,8 +71,6 @@ typedef uint64_t guint64;
typedef float gfloat;
typedef double gdouble;
typedef int32_t gboolean;
#endif
#endif
typedef guint16 gunichar2;
typedef guint32 gunichar;
@@ -135,6 +114,11 @@ typedef guint32 gunichar;
#define G_CONST_RETURN const
#define G_GUINT64_FORMAT PRIu64
#define G_GINT64_FORMAT PRIi64
#define G_GUINT32_FORMAT PRIu32
#define G_GINT32_FORMAT PRIi32
/*
* Allocation
*/
@@ -788,6 +772,8 @@ const gchar *g_get_user_name (void);
gchar *g_get_prgname (void);
void g_set_prgname (const gchar *prgname);
gboolean g_ensure_directory_exists (const gchar *filename);
/*
* Shell
*/

View File

@@ -29,6 +29,7 @@
#include <stdio.h>
#include <glib.h>
#include <errno.h>
#include <sys/stat.h>
#ifdef G_OS_WIN32
#include <direct.h>
@@ -294,3 +295,95 @@ g_get_prgname (void)
{
return name;
}
gboolean
g_ensure_directory_exists (const gchar *filename)
{
#ifdef G_OS_WIN32
gchar *dir_utf8 = g_path_get_dirname (filename);
gunichar2 *p;
gunichar2 *dir_utf16 = NULL;
int retval;
if (!dir_utf8 || !dir_utf8 [0])
return FALSE;
dir_utf16 = g_utf8_to_utf16 (dir_utf8, strlen (dir_utf8), NULL, NULL, NULL);
g_free (dir_utf8);
if (!dir_utf16)
return FALSE;
p = dir_utf16;
/* make life easy and only use one directory seperator */
while (*p != '\0')
{
if (*p == '/')
*p = '\\';
p++;
}
p = dir_utf16;
/* get past C:\ )*/
while (*p++ != '\\')
{
}
while (1) {
gboolean bRet = FALSE;
p = wcschr (p, '\\');
if (p)
*p = '\0';
retval = _wmkdir (dir_utf16);
if (retval != 0 && errno != EEXIST) {
g_free (dir_utf16);
return FALSE;
}
if (!p)
break;
*p++ = '\\';
}
g_free (dir_utf16);
return TRUE;
#else
char *p;
gchar *dir = g_path_get_dirname (filename);
int retval;
struct stat sbuf;
if (!dir || !dir [0]) {
g_free (dir);
return FALSE;
}
if (stat (dir, &sbuf) == 0 && S_ISDIR (sbuf.st_mode)) {
g_free (dir);
return TRUE;
}
p = dir;
while (*p == '/')
p++;
while (1) {
p = strchr (p, '/');
if (p)
*p = '\0';
retval = mkdir (dir, 0777);
if (retval != 0 && errno != EEXIST) {
g_free (dir);
return FALSE;
}
if (!p)
break;
*p++ = '/';
}
g_free (dir);
return TRUE;
#endif
}