New upstream version 1.0.5
This commit is contained in:
155
packaging/win32/xming/patches/xming-build-native.patch
Normal file
155
packaging/win32/xming/patches/xming-build-native.patch
Normal file
@@ -0,0 +1,155 @@
|
||||
diff -urw xc-orig/config/imake/imake.c xc/config/imake/imake.c
|
||||
--- xc-orig/config/imake/imake.c 2009-03-18 18:13:23 +0100
|
||||
+++ xc/config/imake/imake.c 2009-08-03 23:03:20 +0200
|
||||
@@ -280,7 +280,7 @@
|
||||
#include <sys/utsname.h>
|
||||
#endif
|
||||
|
||||
-#if !(defined(Lynx) || defined(__Lynx__) || (defined(SVR4) && !defined(sun))) && !defined (__CYGWIN__)
|
||||
+#if !(defined(Lynx) || defined(__Lynx__) || (defined(SVR4) && !defined(sun))) && !(defined (__CYGWIN__) || defined(__MINGW32__))
|
||||
#define HAS_MKSTEMP
|
||||
#endif
|
||||
|
||||
diff -urw xc-orig/config/util/lndir.c xc/config/util/lndir.c
|
||||
--- xc-orig/config/util/lndir.c 2009-03-18 18:13:23 +0100
|
||||
+++ xc/config/util/lndir.c 2009-08-04 00:18:18 +0200
|
||||
@@ -62,6 +62,9 @@
|
||||
#ifdef USG
|
||||
#include <dirent.h>
|
||||
#else
|
||||
+# ifdef __MINGW32__
|
||||
+# include <dirent.h>
|
||||
+# else
|
||||
#include <sys/dir.h>
|
||||
#ifndef dirent
|
||||
#define dirent direct
|
||||
@@ -69,6 +72,7 @@
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
+#endif
|
||||
#ifndef MAXPATHLEN
|
||||
#define MAXPATHLEN 2048
|
||||
#endif
|
||||
@@ -141,6 +145,9 @@
|
||||
return !strcmp(lname, rname);
|
||||
}
|
||||
|
||||
+#ifdef __MINGW32__
|
||||
+extern __declspec(dllimport) int __stdcall CopyFileA(const char *, const char *, int);
|
||||
+#endif
|
||||
|
||||
/* Recursively create symbolic links from the current directory to the "from"
|
||||
directory. Assumes that files described by fs and ts are directories. */
|
||||
@@ -231,18 +238,25 @@
|
||||
if (!silent)
|
||||
printf ("%s:\n", buf);
|
||||
if ((stat (dp->d_name, &sc) < 0) && (errno == ENOENT)) {
|
||||
+#ifdef __MINGW32__
|
||||
+ if (mkdir (dp->d_name) < 0 ||
|
||||
+ stat (dp->d_name, &sc) < 0) {
|
||||
+#else
|
||||
if (mkdir (dp->d_name, 0777) < 0 ||
|
||||
stat (dp->d_name, &sc) < 0) {
|
||||
+#endif
|
||||
mperror (dp->d_name);
|
||||
curdir = rcurdir = ocurdir;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
+#ifndef __MINGW32__
|
||||
if (readlink (dp->d_name, symbuf, sizeof(symbuf) - 1) >= 0) {
|
||||
msg ("%s: is a link instead of a directory", dp->d_name);
|
||||
curdir = rcurdir = ocurdir;
|
||||
continue;
|
||||
}
|
||||
+#endif
|
||||
if (chdir (dp->d_name) < 0) {
|
||||
mperror (dp->d_name);
|
||||
curdir = rcurdir = ocurdir;
|
||||
@@ -256,6 +270,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
+#ifdef __MINGW32__
|
||||
+ symlen = -1;
|
||||
+#else
|
||||
/* non-directory */
|
||||
symlen = readlink (dp->d_name, symbuf, sizeof(symbuf) - 1);
|
||||
if (symlen >= 0)
|
||||
@@ -270,6 +287,7 @@
|
||||
if (basesymlen >= 0)
|
||||
basesym[basesymlen] = '\0';
|
||||
}
|
||||
+#endif
|
||||
|
||||
if (symlen >= 0) {
|
||||
/* Link exists in new tree. Print message if it doesn't match. */
|
||||
@@ -324,7 +342,11 @@
|
||||
}
|
||||
else
|
||||
sympath = buf;
|
||||
+#ifdef __MINGW32__
|
||||
+ if (CopyFileA(sympath, dp->d_name, 1) != 0)
|
||||
+#else
|
||||
if (symlink (sympath, dp->d_name) < 0)
|
||||
+#endif
|
||||
mperror (dp->d_name);
|
||||
}
|
||||
}
|
||||
diff -urw xcorig/config/cf/mingw.cf xc/config/cf/mingw.cf
|
||||
--- xcorig/config/cf/mingw.cf 2009-03-18 18:13:23 +0100
|
||||
+++ xc/config/cf/mingw.cf 2009-08-09 13:26:26 +0200
|
||||
@@ -145,7 +145,8 @@
|
||||
#define HasShm NO
|
||||
|
||||
/* snprintf from windows runtime does return -1 if the buffer is to small */
|
||||
-#define HasSnprintf NO
|
||||
+/* FE: However, latest MinGW provides the correct ones ... */
|
||||
+#define HasSnprintf YES
|
||||
|
||||
#define HasFfs NO
|
||||
|
||||
@@ -158,7 +159,7 @@
|
||||
|
||||
#define HasSockets NO
|
||||
#define GzipFontCompression YES
|
||||
-#define HasZlib NO
|
||||
+#define HasZlib YES
|
||||
#define HasFreetype2 NO
|
||||
|
||||
/* We don't need -lm */
|
||||
@@ -258,7 +259,7 @@
|
||||
# ifdef CrossCompileDir
|
||||
# define ExtraIncDir CrossCompileDir/../../include
|
||||
# else
|
||||
-# define ExtraIncDir /usr/include/w32api
|
||||
+# define ExtraIncDir /mingw/include
|
||||
# endif
|
||||
#endif
|
||||
|
||||
diff -urw xc-orig/extras/rman/rman.c xc/extras/rman/rman.c
|
||||
--- xc-orig/extras/rman/rman.c 2009-03-18 18:13:28 +0100
|
||||
+++ xc/extras/rman/rman.c 2009-08-07 04:21:06 +0200
|
||||
@@ -268,21 +268,6 @@
|
||||
/* case insensitive versions of strcmp and strncmp */
|
||||
|
||||
static int
|
||||
-stricmp(const char *s1, const char *s2)
|
||||
-{
|
||||
- assert(s1!=NULL && s2!=NULL);
|
||||
- /*strincmp(s1, s2, strlen(s1)+1);*/
|
||||
-
|
||||
- while (tolower(*s1)==tolower(*s2)) {
|
||||
- if (*s1=='\0' /*&& *s2=='\0'*/) return 0;
|
||||
- s1++; s2++;
|
||||
- }
|
||||
-
|
||||
- if (tolower(*s1)<tolower(*s2)) return -1;
|
||||
- else return 1;
|
||||
-}
|
||||
-
|
||||
-static int
|
||||
lcexceptionscmp(const void *a, const void *b)
|
||||
{
|
||||
return stricmp(*(char **)a, *(char **)b);
|
||||
Reference in New Issue
Block a user