LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File gcc-5.1.0-libjava.patch of Package mingw64-gcc (Project home:dg0yt:extra)

--- libjava/configure	2015-04-22 10:45:05.000000000 +0200
+++ libjava/configure	2015-04-23 21:55:35.491209693 +0200
@@ -19771,6 +19771,7 @@
 test -d java/io || mkdir java/io
 test -d gnu || mkdir gnu
 ac_config_links="$ac_config_links java/io/natFile.cc:java/io/natFile${FILE-${PLATFORM}}.cc"
+ac_config_links="$ac_config_links java/io/natVMConsole.cc:java/io/natVMConsole${FILE-${PLATFORM}}.cc"
 
 
 # Likewise for natConcreteProcess.cc.
@@ -20581,6 +20582,9 @@
     LIBSTDCXXSPEC=-lstdc++
     LIBGCJTESTSPEC="-L`${PWDCMD-pwd}`/.libs -L`${PWDCMD-pwd}`/../libstdc++-v3/src/.libs -rpath `${PWDCMD-pwd}`/.libs:`${PWDCMD-pwd}`/../libstdc++-v3/src/.libs -lstdc++"
     ;;
+*-*-mingw*)
+    extra_ldflags_libjava=-lws2_32
+    ;;
 *-*-cygwin)
     extra_ldflags_libjava=-liconv
     ;;
@@ -26437,6 +26441,7 @@
     "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
     "include/platform.h") CONFIG_LINKS="$CONFIG_LINKS include/platform.h:include/$PLATFORMH" ;;
     "java/io/natFile.cc") CONFIG_LINKS="$CONFIG_LINKS java/io/natFile.cc:java/io/natFile${FILE-${PLATFORM}}.cc" ;;
+    "java/io/natVMConsole.cc") CONFIG_LINKS="$CONFIG_LINKS java/io/natFile.cc:java/io/natVMConsole${FILE-${PLATFORM}}.cc" ;;
     "java/lang/natConcreteProcess.cc") CONFIG_LINKS="$CONFIG_LINKS java/lang/natConcreteProcess.cc:java/lang/nat${PLATFORM}Process.cc" ;;
     "java/net/natVMInetAddress.cc") CONFIG_LINKS="$CONFIG_LINKS java/net/natVMInetAddress.cc:java/net/natVMInetAddress${PLATFORMNET}.cc" ;;
     "java/net/natVMNetworkInterface.cc") CONFIG_LINKS="$CONFIG_LINKS java/net/natVMNetworkInterface.cc:java/net/natVMNetworkInterface${PLATFORMNET}.cc" ;;
--- libjava/configure.ac	2014-04-22 14:30:59.000000000 +0200
+++ libjava/configure.ac	2015-04-23 21:55:35.492209671 +0200
@@ -862,6 +862,7 @@
 test -d java/io || mkdir java/io
 test -d gnu || mkdir gnu
 AC_CONFIG_LINKS(java/io/natFile.cc:java/io/natFile${FILE-${PLATFORM}}.cc)
+AC_CONFIG_LINKS(java/io/natVMConsole.cc:java/io/natVMConsole${FILE-${PLATFORM}}.cc)
 
 # Likewise for natConcreteProcess.cc.
 test -d java/lang || mkdir java/lang
@@ -941,6 +942,9 @@
     LIBSTDCXXSPEC=-lstdc++
     LIBGCJTESTSPEC="-L`${PWDCMD-pwd}`/.libs -L`${PWDCMD-pwd}`/../libstdc++-v3/src/.libs -rpath `${PWDCMD-pwd}`/.libs:`${PWDCMD-pwd}`/../libstdc++-v3/src/.libs -lstdc++"
     ;;
+*-*-mingw*)
+    extra_ldflags_libjava=-lws2_32
+    ;;
 *-*-cygwin)
     extra_ldflags_libjava=-liconv
     ;;
--- libjava/gcj/javaprims.h	2012-12-19 18:03:15.000000000 +0100
+++ libjava/gcj/javaprims.h	2015-04-23 21:55:35.492209671 +0200
@@ -35,6 +35,18 @@
  #endif
 #endif
 
+// JNI calling convention.  Also defined in jni.h.
+// This is needed here because some classes have JNI friends. 
+
+#ifndef JNICALL
+ #if (defined (_WIN32) || defined (__WIN32__) || defined (WIN32)) && !defined (_WIN64)
+  #define JNICALL __stdcall
+ #else
+  #define JNICALL
+ #endif
+#endif
+
+
 // To force selection of correct types that will mangle consistently
 // across platforms.
 extern "Java"
--- libjava/include/jni_md.h	2013-01-04 13:49:55.000000000 +0100
+++ libjava/include/jni_md.h	2015-04-23 21:55:35.492209671 +0200
@@ -124,6 +124,15 @@
 
 #endif /* __GCJ_JNI_IMPL__ */
 
+/*  JNI calling convention.  Also defined in javaprims.h. */
+#ifndef JNICALL
+ #if (defined (_WIN32) || defined (__WIN32__) || defined (WIN32)) && !defined (_WIN64)
+  #define JNICALL __stdcall
+ #else
+  #define JNICALL
+ #endif
+#endif
+
 
 /* Linkage and calling conventions. */
 #if (defined (_WIN32) || defined (__WIN32__) || defined (WIN32)) \
--- libjava/java/io/natVMConsole.cc	2012-03-26 18:24:33.000000000 +0200
+++ libjava/java/io/natVMConsole.cc	1970-01-01 01:00:00.000000000 +0100
@@ -1,49 +0,0 @@
-// natVMConsole.cc - Native part of VMConsole class.
-
-/* Copyright (C) 2012
-   Free Software Foundation
-
-   This file is part of libgcj.
-
-This software is copyrighted work licensed under the terms of the
-Libgcj License.  Please consult the ObjectInputStream "LIBGCJ_LICENSE" for
-details.  */
-
-#include <config.h>
-
-#include <termios.h>
-#include <unistd.h>
-
-#include <gcj/cni.h>
-
-#include <java/io/Console.h>
-#include <java/io/VMConsole.h>
-
-#ifndef IUCLC
-#define IUCLC 0
-#endif
-
-#define TERMIOS_ECHO_IFLAGS (IUCLC|IXON|IXOFF|IXANY)
-#define TERMIOS_ECHO_LFLAGS (ECHO|ECHOE|ECHOK|ECHONL|TOSTOP)
-
-jstring
-java::io::VMConsole::readPassword(::java::io::Console *con)
-{
-  struct termios oldt, newt;
-  jstring result;
-
-  tcgetattr (STDIN_FILENO, &oldt);
-
-  tcgetattr (STDIN_FILENO, &newt);
-
-  newt.c_iflag &= ~TERMIOS_ECHO_IFLAGS;
-  newt.c_lflag &= ~TERMIOS_ECHO_LFLAGS;
-
-  tcsetattr (STDIN_FILENO, TCSANOW, &newt);
-
-  result = con->readLine ();
-
-  tcsetattr (STDIN_FILENO, TCSANOW, &oldt);
-
-  return result;
-}
--- libjava/java/io/natVMConsolePosix.cc	1970-01-01 01:00:00.000000000 +0100
+++ libjava/java/io/natVMConsolePosix.cc	2015-04-23 21:55:35.492209671 +0200
@@ -0,0 +1,49 @@
+// natVMConsolePosix.cc - Native Posix part of VMConsole class.
+
+/* Copyright (C) 2012
+   Free Software Foundation
+
+   This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License.  Please consult the ObjectInputStream "LIBGCJ_LICENSE" for
+details.  */
+
+#include <config.h>
+
+#include <termios.h>
+#include <unistd.h>
+
+#include <gcj/cni.h>
+
+#include <java/io/Console.h>
+#include <java/io/VMConsole.h>
+
+#ifndef IUCLC
+#define IUCLC 0
+#endif
+
+#define TERMIOS_ECHO_IFLAGS (IUCLC|IXON|IXOFF|IXANY)
+#define TERMIOS_ECHO_LFLAGS (ECHO|ECHOE|ECHOK|ECHONL|TOSTOP)
+
+jstring
+java::io::VMConsole::readPassword(::java::io::Console *con)
+{
+  struct termios oldt, newt;
+  jstring result;
+
+  tcgetattr (STDIN_FILENO, &oldt);
+
+  tcgetattr (STDIN_FILENO, &newt);
+
+  newt.c_iflag &= ~TERMIOS_ECHO_IFLAGS;
+  newt.c_lflag &= ~TERMIOS_ECHO_LFLAGS;
+
+  tcsetattr (STDIN_FILENO, TCSANOW, &newt);
+
+  result = con->readLine ();
+
+  tcsetattr (STDIN_FILENO, TCSANOW, &oldt);
+
+  return result;
+}
--- libjava/java/io/natVMConsoleWin32.cc	1970-01-01 01:00:00.000000000 +0100
+++ libjava/java/io/natVMConsoleWin32.cc	2015-04-23 21:55:35.493209649 +0200
@@ -0,0 +1,38 @@
+// natVMConsoleWin32.cc - Native Win32 part of VMConsole class.
+
+/* Copyright (C) 2012
+   Free Software Foundation
+
+   This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License.  Please consult the ObjectInputStream "LIBGCJ_LICENSE" for
+details.  */
+
+#include <config.h>
+
+#include <windows.h>
+#ifdef STRICT
+#undef STRICT
+#endif
+
+#include <gcj/cni.h>
+
+#include <java/io/Console.h>
+#include <java/io/VMConsole.h>
+
+jstring
+java::io::VMConsole::readPassword(::java::io::Console *con)
+{
+  jstring result;
+  HANDLE hStdin = GetStdHandle(STD_INPUT_HANDLE); 
+  DWORD mode = 0;
+  GetConsoleMode(hStdin, &mode);
+  SetConsoleMode(hStdin, mode & (~ENABLE_ECHO_INPUT));
+
+  result = con->readLine ();
+
+  SetConsoleMode(hStdin, mode);
+
+  return result;
+}
--- libjava/libgcj-noncore-dummy.def	2010-03-21 20:41:37.000000000 +0100
+++ libjava/libgcj-noncore-dummy.def	2015-04-23 21:55:35.493209649 +0200
@@ -1,5 +1,5 @@
 
-LIBRARY cyggcj-noncore-11.dll
+LIBRARY libgcj-noncore-16.dll
 
 EXPORTS
 
--- libjava/Makefile.am	2015-01-13 09:23:31.000000000 +0100
+++ libjava/Makefile.am	2015-04-23 21:55:35.493209649 +0200
@@ -526,7 +526,7 @@
 ## either always loads both at runtime.
 DLL_VERSION=`expr \`grep -v '^\#' $(srcdir)/libtool-version | sed -e 's/\(.*\):\(.*\):.*/\1 + \2/'\``
 libgcj-noncore-dummy.dll.a : $(srcdir)/libgcj-noncore-dummy.def
-	$(DLLTOOL) -d $^ -l $@ --dllname cyggcj-noncore-$(DLL_VERSION).dll 
+	$(DLLTOOL) -d $^ -l $@ --dllname libgcj-noncore-$(DLL_VERSION).dll 
 
 ## These are the libtool definitions for the noncore library.
 libgcj_noncore_la_SOURCES =
--- libjava/Makefile.in	2015-04-22 10:45:05.000000000 +0200
+++ libjava/Makefile.in	2015-04-23 21:55:35.495209604 +0200
@@ -10586,7 +10586,7 @@
 interpret.lo:  AM_CXXFLAGS += -fwrapv
 prims.lo: AM_CXXFLAGS += -fno-omit-frame-pointer
 @BUILD_SUBLIBS_TRUE@libgcj-noncore-dummy.dll.a : $(srcdir)/libgcj-noncore-dummy.def
-@BUILD_SUBLIBS_TRUE@	$(DLLTOOL) -d $^ -l $@ --dllname cyggcj-noncore-$(DLL_VERSION).dll 
+@BUILD_SUBLIBS_TRUE@	$(DLLTOOL) -d $^ -l $@ --dllname libgcj-noncore-$(DLL_VERSION).dll 
 
 $(db_name): gcj-dbtool$(EXEEXT)
 	@rm -f $(db_name)
--- ltmain.sh	2014-02-04 10:31:38.000000000 +0100
+++ ltmain.sh	2015-04-23 21:55:35.496209582 +0200
@@ -5438,7 +5438,7 @@
 	    case " $dlpreconveniencelibs " in
 	    *" $deplib "*) ;;
 	    *)
-	      valid_a_lib=no
+	      valid_a_lib=yes
 	      case $deplibs_check_method in
 		match_pattern*)
 		  set dummy $deplibs_check_method; shift