summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamjan Jovanovic <damjan@apache.org>2018-03-04 06:52:50 +0000
committerDamjan Jovanovic <damjan@apache.org>2018-03-04 06:52:50 +0000
commit229b54c679debb0f60569e46520db85fc5d3b4a1 (patch)
treece7c0311edf10867f74af83e8d3bd74ea904c0fc
parent8683cfd616e1e11b62b5ccdedaec7a3d4bda8dfe (diff)
dmake's config.guess is too old to detect Cygwin64, so
overwrite it with our own one during ./bootstrap. dmake uses Cygwin API functions that were deprecated on Cygwin32 and are obsolete on Cygwin64, so patch it to use the replacement APIs during ./bootstrap as well. Patch by: me
Notes
Notes: ignore: obsolete
-rw-r--r--bootstrap.16
-rw-r--r--solenv/src/dmake-cygwin64.patch48
2 files changed, 54 insertions, 0 deletions
diff --git a/bootstrap.1 b/bootstrap.1
index 41a09acb736e..7ef41bb8af76 100644
--- a/bootstrap.1
+++ b/bootstrap.1
@@ -136,6 +136,12 @@ if test -n "$DMAKE_URL" -a ! -x "$SOLARENV/$INPATH/bin/dmake$EXEEXT"; then
$GNUMAKE distclean || exit
fi
+ # The config.guess for dmake is too old, overwrite it with ours:
+ cp $SOLARSRC/config.guess .
+
+ # We also need to patch dmake for Win64
+ patch -p0 < $SOLARSRC/solenv/src/dmake-cygwin64.patch
+
./configure $DMAKE_CONF || exit
## invoke the gnu make command set by configure.
diff --git a/solenv/src/dmake-cygwin64.patch b/solenv/src/dmake-cygwin64.patch
new file mode 100644
index 000000000000..fabeb561b206
--- /dev/null
+++ b/solenv/src/dmake-cygwin64.patch
@@ -0,0 +1,48 @@
+diff -Nur path.c path.c
+--- path.c 2011-09-25 18:53:42.000000000 +0200
++++ path.c 2018-03-04 08:13:24.836905800 +0200
+@@ -317,8 +317,8 @@
+ #if __CYGWIN__
+ /* Use cygwin function to convert a DOS path to a POSIX path. */
+ if( *path && path[1] == ':' && isalpha(*path) ) {
+- int err = cygwin_conv_to_posix_path(path, cpath);
+- if (err)
++ int err = cygwin_conv_path(CCP_WIN_A_TO_POSIX, path, cpath, PATH_MAX);
++ if (err < 0)
+ Fatal( "error converting \"%s\" - %s\n",
+ path, strerror (errno));
+ if( path[2] != '/' && path[2] != '\\' )
+diff -Nur sysintf.c sysintf.c
+--- sysintf.c 2011-09-25 18:53:42.000000000 +0200
++++ sysintf.c 2018-03-04 08:15:54.315421400 +0200
+@@ -69,7 +69,7 @@
+ # include <sys/timeb.h>
+ #endif
+
+-/* for cygwin_conv_to_posix_path() in Prolog() and for cygdospath()*/
++/* for cygwin_conv_path() in Prolog() and for cygdospath()*/
+ #if __CYGWIN__
+ # include <sys/cygwin.h>
+ #endif
+@@ -538,8 +538,8 @@
+ if ( (CygDrvPre = MALLOC( PATH_MAX, char)) == NIL(char) )
+ No_ram();
+ else {
+- int err = cygwin_conv_to_posix_path("c:", CygDrvPre);
+- if (err)
++ int err = cygwin_conv_path(CCP_WIN_A_TO_POSIX, "c:", CygDrvPre, PATH_MAX);
++ if (err < 0)
+ Fatal( "error converting \"%s\" - %s\n",
+ CygDrvPre, strerror (errno));
+ if( (CygDrvPreLen = strlen(CygDrvPre)) == 2 ) {
+@@ -1144,8 +1144,8 @@
+
+ if( *src && src[0] == '/' ) {
+ char *tmp;
+- int err = cygwin_conv_to_win32_path(src, buf);
+- if (err)
++ int err = cygwin_conv_path(CCP_WIN_A_TO_POSIX, src, buf, PATH_MAX);
++ if (err < 0)
+ Fatal( "error converting \"%s\" - %s\n",
+ src, strerror (errno));
+