[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - configure.ac

Jan-Marek Glogowski glogow at fbihome.de
Fri Mar 10 16:55:27 UTC 2017


 configure.ac |   32 ++++++++++++++++++--------------
 1 file changed, 18 insertions(+), 14 deletions(-)

New commits:
commit 5ebc0b40569f8b6eeb6241f2dc4a2ec69dabc035
Author: Jan-Marek Glogowski <glogow at fbihome.de>
Date:   Wed Mar 8 12:00:03 2017 +0100

    Fix build with latest Cygwin updates
    
    Stop bash complaining about \0 bytes in input
    (cherry picked from commit 8800292351dcf1f538c47ac6acf834ac2633ce6b)
    
    Strip newlines from UCRT detecion using tr
    (cherry picked from commit 37baabe6436037de604bfbc2702bfb0bc156c41b)
    
    Just get rid of CR when parsing .bat output
    (cherry picked from commit 019ea173701eae4b8c5ffd45bb0063fc0a688ce0)
    
    Dropped "Remove stray CR from input"
    (cherry picked from commit 77779166569da389de44075b3d03413b353046a4)
    as it was backported seperatly.
    
    Reviewed-on: https://gerrit.libreoffice.org/35010
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Tor Lillqvist <tml at collabora.com>
    (cherry picked from commit 86bb733f6a9af9af253afe896e315b463e592dc7)
    
    Change-Id: Id0040bf772ba3abcd0e9a39b5338d0a6b733fc07
    Reviewed-on: https://gerrit.libreoffice.org/35033
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>

diff --git a/configure.ac b/configure.ac
index f928d5e..2f68ebe 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3172,28 +3172,32 @@ dnl ===================================================================
 dnl Windows specific tests and stuff
 dnl ===================================================================
 
-# Get a value from the 32-bit side of the Registry
-reg_get_value_32()
+reg_get_value()
 {
     # Return value: $regvalue
     unset regvalue
-    _regvalue=`cat "/proc/registry32/$1" 2> /dev/null`
 
-    if test $? -eq 0; then
-        regvalue=$_regvalue
+    local _regentry="/proc/registry${1}/${2}"
+    if test -f "$_regentry"; then
+        # Stop bash complaining about \0 bytes in input, as it can't handle them.
+        # Registry keys read via /proc/registry* are always \0 terminated!
+        local _regvalue=$(tr -d '\0' < "$_regentry")
+        if test $? -eq 0; then
+            regvalue=$_regvalue
+        fi
     fi
 }
 
+# Get a value from the 32-bit side of the Registry
+reg_get_value_32()
+{
+    reg_get_value "32" "$1"
+}
+
 # Get a value from the 64-bit side of the Registry
 reg_get_value_64()
 {
-    # Return value: $regvalue
-    unset regvalue
-    _regvalue=`cat "/proc/registry64/$1" 2> /dev/null`
-
-    if test $? -eq 0; then
-        regvalue=$_regvalue
-    fi
+    reg_get_value "64" "$1"
 }
 
 if test "$_os" = "WINNT"; then
@@ -3325,7 +3329,7 @@ win_get_env_from_vsvars32bat()
     echo -e "@echo %$1%\r\n" >> $WRAPPERBATCHFILEPATH
     echo -e "@endlocal\r\n" >> $WRAPPERBATCHFILEPATH
     chmod +x $WRAPPERBATCHFILEPATH
-    _win_get_env_from_vsvars32bat="`$WRAPPERBATCHFILEPATH | $SED -e s/^M^J//`"
+    _win_get_env_from_vsvars32bat=$($WRAPPERBATCHFILEPATH | tr -d "\r")
     rm -f $WRAPPERBATCHFILEPATH
     echo $_win_get_env_from_vsvars32bat
 }
@@ -6805,7 +6809,7 @@ if test "$ENABLE_JAVA" != ""; then
 
         if test -z "$with_jdk_home"; then
             for ver in 1.8 1.7 1.6; do
-                reg_get_value_$bitness "HKEY_LOCAL_MACHINE/SOFTWARE/JavaSoft/Java Development Kit/$ver/JavaHome"
+                reg_get_value "$bitness" "HKEY_LOCAL_MACHINE/SOFTWARE/JavaSoft/Java Development Kit/$ver/JavaHome"
                 if test -n "$regvalue"; then
                     _jdk_home=$regvalue
                     break


More information about the Libreoffice-commits mailing list