Forráskód Böngészése

More platform support fixes

- Support platforms without mkdtemp
- Fix compile for console-null.c
Andi McClure 8 éve
szülő
commit
40ded2b552
3 módosított fájl, 7 hozzáadás és 0 törlés
  1. 1 0
      configure.ac
  2. 4 0
      eglib/src/gfile-unix.c
  3. 2 0
      mono/metadata/console-null.c

+ 1 - 0
configure.ac

@@ -2408,6 +2408,7 @@ if test x$host_win32 = xno; then
 	AC_CHECK_FUNCS(fork execv execve)
 	AC_CHECK_FUNCS(accept4)
 	AC_CHECK_FUNCS(localtime_r)
+	AC_CHECK_FUNCS(mkdtemp)
 	AC_CHECK_SIZEOF(size_t)
 	AC_CHECK_TYPES([blksize_t], [AC_DEFINE(HAVE_BLKSIZE_T)], , 
 		[#include <sys/types.h>

+ 4 - 0
eglib/src/gfile-unix.c

@@ -82,7 +82,11 @@ g_file_test (const gchar *filename, GFileTest test)
 gchar *
 g_mkdtemp (char *tmp_template)
 {
+#ifdef HAVE_MKDTEMP
 	char *template_copy = g_strdup (tmp_template);
 
 	return mkdtemp (template_copy);
+#else
+	g_error("Function not supported");
+#endif
 }

+ 2 - 0
mono/metadata/console-null.c

@@ -17,6 +17,8 @@
 
 #include <mono/metadata/console-io.h>
 #include <mono/metadata/exception.h>
+#include <mono/metadata/w32file.h>
+#include <mono/utils/w32api.h>
 
 void
 mono_console_init (void)