You've already forked linux-packaging-mono
Imported Upstream version 5.14.0.78
Former-commit-id: 3494343bcc9ddb42b36b82dd9ae7b69e85e0229f
This commit is contained in:
parent
74b74abd9f
commit
19234507ba
@@ -52,11 +52,13 @@ libeglib_la_CFLAGS = -g -Wall -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE
|
||||
|
||||
AM_CPPFLAGS = -I$(srcdir)
|
||||
|
||||
if HOST_WIN32
|
||||
libeglib_la_LIBADD = -lm $(LIBICONV) -lpsapi
|
||||
else
|
||||
if HOST_ANDROID
|
||||
libeglib_la_LIBADD = -llog
|
||||
else
|
||||
if HOST_WIN32
|
||||
libeglib_la_LIBADD = -lm -lpsapi $(LTLIBICONV)
|
||||
else
|
||||
libeglib_la_LIBADD = $(LTLIBICONV)
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
@@ -85,8 +85,6 @@ DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
|
||||
$(top_srcdir)/depcomp
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
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 \
|
||||
@@ -99,8 +97,7 @@ CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES = eglib-config.h
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
LTLIBRARIES = $(noinst_LTLIBRARIES)
|
||||
am__DEPENDENCIES_1 =
|
||||
@HOST_WIN32_TRUE@libeglib_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
|
||||
libeglib_la_DEPENDENCIES =
|
||||
am__libeglib_la_SOURCES_DIST = eglib-remap.h sort.frag.h glib.h \
|
||||
garray.c gbytearray.c gerror.c ghashtable.c giconv.c gmem.c \
|
||||
gmodule.h goutput.c gqsort.c gstr.c gslist.c gstring.c \
|
||||
@@ -273,6 +270,7 @@ G_GUINT64_FORMAT = @G_GUINT64_FORMAT@
|
||||
G_HAVE_ISO_VARARGS = @G_HAVE_ISO_VARARGS@
|
||||
HAVE_ALLOCA_H = @HAVE_ALLOCA_H@
|
||||
HAVE_MSGFMT = @HAVE_MSGFMT@
|
||||
HAVE_NINJA = @HAVE_NINJA@
|
||||
HOST_CC = @HOST_CC@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
@@ -291,7 +289,6 @@ LIBC = @LIBC@
|
||||
LIBGC_CPPFLAGS = @LIBGC_CPPFLAGS@
|
||||
LIBGC_LIBS = @LIBGC_LIBS@
|
||||
LIBGC_STATIC_LIBS = @LIBGC_STATIC_LIBS@
|
||||
LIBICONV = @LIBICONV@
|
||||
LIBMONO_LA = @LIBMONO_LA@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
@@ -305,7 +302,6 @@ LLVM_LIBS = @LLVM_LIBS@
|
||||
LN_S = @LN_S@
|
||||
LTCOMPILE = @LTCOMPILE@
|
||||
LTCXXCOMPILE = @LTCXXCOMPILE@
|
||||
LTLIBICONV = @LTLIBICONV@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
@@ -419,7 +415,6 @@ mkdir_p = @mkdir_p@
|
||||
mono_build_root = @mono_build_root@
|
||||
mono_cfg_dir = @mono_cfg_dir@
|
||||
mono_runtime = @mono_runtime@
|
||||
ninja = @ninja@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
@@ -485,8 +480,9 @@ libeglib_la_SOURCES = \
|
||||
|
||||
libeglib_la_CFLAGS = -g -Wall -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE
|
||||
AM_CPPFLAGS = -I$(srcdir)
|
||||
@HOST_ANDROID_TRUE@@HOST_WIN32_FALSE@libeglib_la_LIBADD = -llog
|
||||
@HOST_WIN32_TRUE@libeglib_la_LIBADD = -lm $(LIBICONV) -lpsapi
|
||||
@HOST_ANDROID_FALSE@@HOST_WIN32_FALSE@libeglib_la_LIBADD = $(LTLIBICONV)
|
||||
@HOST_ANDROID_FALSE@@HOST_WIN32_TRUE@libeglib_la_LIBADD = -lm -lpsapi $(LTLIBICONV)
|
||||
@HOST_ANDROID_TRUE@libeglib_la_LIBADD = -llog
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
EXTRA_DIST = eglib-config.h.in $(win_files) $(unix_files)
|
||||
all: all-am
|
||||
|
||||
@@ -243,6 +243,9 @@
|
||||
#define g_usleep monoeg_g_usleep
|
||||
#define g_utf16_to_ucs4 monoeg_g_utf16_to_ucs4
|
||||
#define g_utf16_to_utf8 monoeg_g_utf16_to_utf8
|
||||
#define g_utf16_ascii_equal monoeg_g_utf16_ascii_equal
|
||||
#define g_utf16_asciiz_equal monoeg_g_utf16_asciiz_equal
|
||||
#define g_utf8_jump_table monoeg_g_utf8_jump_table
|
||||
#define g_utf8_get_char monoeg_g_utf8_get_char
|
||||
#define g_utf8_offset_to_pointer monoeg_g_utf8_offset_to_pointer
|
||||
#define g_utf8_pointer_to_offset monoeg_g_utf8_pointer_to_offset
|
||||
|
||||
@@ -79,27 +79,32 @@ g_file_test (const gchar *filename, GFileTest test)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
#ifdef _AIX
|
||||
/* 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 */
|
||||
|
||||
extern char *mkdtemp(char *);
|
||||
#endif
|
||||
|
||||
gchar *
|
||||
g_mkdtemp (char *tmp_template)
|
||||
{
|
||||
#ifdef HAVE_MKDTEMP
|
||||
/*
|
||||
* On systems without mkdtemp, use a reimplemented version
|
||||
* adapted from the Win32 version of this file. AIX is an
|
||||
* exception because i before version 7.2 lacks mkdtemp in
|
||||
* libc, and GCC can "fix" system headers so that it isn't
|
||||
* present without redefining it.
|
||||
*/
|
||||
#if defined(HAVE_MKDTEMP) && !defined(_AIX)
|
||||
char *template_copy = g_strdup (tmp_template);
|
||||
|
||||
return mkdtemp (template_copy);
|
||||
#else
|
||||
g_error("Function mkdtemp not supported");
|
||||
char *template = g_strdup (tmp_template);
|
||||
|
||||
template = mktemp(template);
|
||||
if (template && *template) {
|
||||
/* 0700 is the mode specified in specs */
|
||||
if (mkdir (template, 0700) == 0){
|
||||
return template;
|
||||
}
|
||||
}
|
||||
|
||||
g_free (template);
|
||||
return NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -107,6 +107,14 @@ typedef guint32 gunichar;
|
||||
#define ABS(a) ((a) > 0 ? (a) : -(a))
|
||||
#endif
|
||||
|
||||
#ifndef ALIGN_TO
|
||||
#define ALIGN_TO(val,align) ((((gssize)val) + ((align) - 1)) & ~((align) - 1))
|
||||
#endif
|
||||
|
||||
#ifndef ALIGN_PTR_TO
|
||||
#define ALIGN_PTR_TO(ptr,align) (gpointer)((((gssize)(ptr)) + (align - 1)) & (~(align - 1)))
|
||||
#endif
|
||||
|
||||
#define G_STRUCT_OFFSET(p_type,field) offsetof(p_type,field)
|
||||
|
||||
#define EGLIB_STRINGIFY(x) #x
|
||||
@@ -721,12 +729,8 @@ GUnicodeBreakType g_unichar_break_type (gunichar c);
|
||||
#define eg_unreachable()
|
||||
#endif
|
||||
|
||||
/* Old version. Preserved for testing and history. */
|
||||
|
||||
/* g_assert is a boolean expression; the precise value is not preserved, just true or false. */
|
||||
#define g_assert(x) \
|
||||
(G_LIKELY(x) ? 1 : (g_assertion_message ( \
|
||||
"* Assertion at %s:%d, condition `%s' not met\n", __FILE__, __LINE__, #x), 0))
|
||||
#define g_assert(x) (G_LIKELY((x)) ? 1 : (g_assertion_message ("* Assertion at %s:%d, condition `%s' not met\n", __FILE__, __LINE__, #x), 0))
|
||||
|
||||
#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
|
||||
|
||||
@@ -747,10 +751,11 @@ GUnicodeBreakType g_unichar_break_type (gunichar c);
|
||||
* format must be a string literal, in order to be concatenated.
|
||||
* If this is too restrictive, g_error remains.
|
||||
*/
|
||||
#define g_assertf(x, format, ...) \
|
||||
(G_LIKELY(x) ? 1 : (g_assertion_message ( \
|
||||
"* Assertion at %s:%d, condition `%s' not met, function:%s, " format "\n", \
|
||||
__FILE__, __LINE__, #x, __func__, __VA_ARGS__), 0))
|
||||
#if defined(_MSC_VER) && (_MSC_VER < 1910)
|
||||
#define g_assertf(x, format, ...) (G_LIKELY((x)) ? 1 : (g_assertion_message ("* Assertion at %s:%d, condition `%s' not met, function:%s, " format "\n", __FILE__, __LINE__, #x, __func__, __VA_ARGS__), 0))
|
||||
#else
|
||||
#define g_assertf(x, format, ...) (G_LIKELY((x)) ? 1 : (g_assertion_message ("* Assertion at %s:%d, condition `%s' not met, function:%s, " format "\n", __FILE__, __LINE__, #x, __func__, ##__VA_ARGS__), 0))
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Unicode conversion
|
||||
@@ -909,10 +914,33 @@ GFileError g_file_error_from_errno (gint err_no);
|
||||
gint g_file_open_tmp (const gchar *tmpl, gchar **name_used, GError **gerror);
|
||||
gboolean g_file_test (const gchar *filename, GFileTest test);
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
#define g_open _open
|
||||
#else
|
||||
#define g_open open
|
||||
#endif
|
||||
#define g_rename rename
|
||||
#define g_stat stat
|
||||
#ifdef G_OS_WIN32
|
||||
#define g_access _access
|
||||
#else
|
||||
#define g_access access
|
||||
#endif
|
||||
#ifdef G_OS_WIN32
|
||||
#define g_mktemp _mktemp
|
||||
#else
|
||||
#define g_mktemp mktemp
|
||||
#endif
|
||||
#ifdef G_OS_WIN32
|
||||
#define g_unlink _unlink
|
||||
#else
|
||||
#define g_unlink unlink
|
||||
#endif
|
||||
#ifdef G_OS_WIN32
|
||||
#define g_write _write
|
||||
#else
|
||||
#define g_write write
|
||||
#endif
|
||||
#define g_fopen fopen
|
||||
#define g_lstat lstat
|
||||
#define g_rmdir rmdir
|
||||
|
||||
@@ -251,11 +251,13 @@ g_find_program_in_path (const gchar *program)
|
||||
|
||||
x = NULL;
|
||||
probe_path = g_build_path (G_DIR_SEPARATOR_S, l, program, NULL);
|
||||
if (access (probe_path, X_OK) == 0){ /* FIXME: on windows this is just a read permissions test */
|
||||
#ifdef HAVE_ACCESS
|
||||
if (g_access (probe_path, X_OK) == 0){ /* FIXME: on windows this is just a read permissions test */
|
||||
g_free (curdir);
|
||||
g_free (p);
|
||||
return probe_path;
|
||||
}
|
||||
#endif
|
||||
g_free (probe_path);
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
@@ -265,12 +267,14 @@ g_find_program_in_path (const gchar *program)
|
||||
while (suffix_list[listx]) {
|
||||
program_exe = g_strjoin(NULL,program,suffix_list[listx],NULL);
|
||||
probe_path = g_build_path (G_DIR_SEPARATOR_S, l, program_exe, NULL);
|
||||
if (access (probe_path, X_OK) == 0){ /* FIXME: on windows this is just a read permissions test */
|
||||
#ifdef HAVE_ACCESS
|
||||
if (g_access (probe_path, X_OK) == 0){ /* FIXME: on windows this is just a read permissions test */
|
||||
g_free (curdir);
|
||||
g_free (p);
|
||||
g_free (program_exe);
|
||||
return probe_path;
|
||||
}
|
||||
#endif
|
||||
listx++;
|
||||
g_free (probe_path);
|
||||
g_free (program_exe);
|
||||
|
||||
@@ -11,21 +11,21 @@
|
||||
#define CODESET 1
|
||||
#include <windows.h>
|
||||
|
||||
extern const char *my_charset;
|
||||
extern const char *eg_my_charset;
|
||||
static gboolean is_utf8;
|
||||
|
||||
gboolean
|
||||
g_get_charset (G_CONST_RETURN char **charset)
|
||||
{
|
||||
if (my_charset == NULL) {
|
||||
if (eg_my_charset == NULL) {
|
||||
static char buf [14];
|
||||
sprintf (buf, "CP%u", GetACP ());
|
||||
my_charset = buf;
|
||||
eg_my_charset = buf;
|
||||
is_utf8 = FALSE;
|
||||
}
|
||||
|
||||
if (charset != NULL)
|
||||
*charset = my_charset;
|
||||
*charset = eg_my_charset;
|
||||
|
||||
return is_utf8;
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
const char *my_charset;
|
||||
const char *eg_my_charset;
|
||||
|
||||
/*
|
||||
* Character set conversion
|
||||
@@ -206,18 +206,18 @@ static gboolean is_utf8;
|
||||
gboolean
|
||||
g_get_charset (G_CONST_RETURN char **charset)
|
||||
{
|
||||
if (my_charset == NULL) {
|
||||
if (eg_my_charset == NULL) {
|
||||
/* These shouldn't be heap allocated */
|
||||
#if defined(HAVE_LOCALCHARSET_H)
|
||||
my_charset = locale_charset ();
|
||||
eg_my_charset = locale_charset ();
|
||||
#else
|
||||
my_charset = "UTF-8";
|
||||
eg_my_charset = "UTF-8";
|
||||
#endif
|
||||
is_utf8 = strcmp (my_charset, "UTF-8") == 0;
|
||||
is_utf8 = strcmp (eg_my_charset, "UTF-8") == 0;
|
||||
}
|
||||
|
||||
if (charset != NULL)
|
||||
*charset = my_charset;
|
||||
*charset = eg_my_charset;
|
||||
|
||||
return is_utf8;
|
||||
}
|
||||
@@ -228,7 +228,7 @@ g_locale_to_utf8 (const gchar *opsysstring, gssize len, gsize *bytes_read, gsize
|
||||
{
|
||||
g_get_charset (NULL);
|
||||
|
||||
return g_convert (opsysstring, len, "UTF-8", my_charset, bytes_read, bytes_written, gerror);
|
||||
return g_convert (opsysstring, len, "UTF-8", eg_my_charset, bytes_read, bytes_written, gerror);
|
||||
}
|
||||
|
||||
gchar *
|
||||
@@ -236,5 +236,5 @@ g_locale_from_utf8 (const gchar *utf8string, gssize len, gsize *bytes_read, gsiz
|
||||
{
|
||||
g_get_charset (NULL);
|
||||
|
||||
return g_convert (utf8string, len, my_charset, "UTF-8", bytes_read, bytes_written, gerror);
|
||||
return g_convert (utf8string, len, eg_my_charset, "UTF-8", bytes_read, bytes_written, gerror);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user