Author: mturk
Date: Fri Jul 17 20:44:55 2009
New Revision: 795221

URL: http://svn.apache.org/viewvc?rev=795221&view=rev
Log:
Use % insted ; for a sed separator. ; is windows path separator

Modified:
    commons/sandbox/runtime/trunk/src/main/native/configure
    commons/sandbox/runtime/trunk/src/main/native/os/unix/uutils.c

Modified: commons/sandbox/runtime/trunk/src/main/native/configure
URL: 
http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/configure?rev=795221&r1=795220&r2=795221&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/configure (original)
+++ commons/sandbox/runtime/trunk/src/main/native/configure Fri Jul 17 20:44:55 
2009
@@ -256,12 +256,12 @@
 
 toupper()
 {
-    echo "$1" | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+    echo "$1" | tr '[a-z]' '[A-Z]'
 }
 
 tolower()
 {
-    echo "$1" | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'
+    echo "$1" | tr '[A-Z]' '[a-z]'
 }
 
 if [ ".$java_home" = . ]; then
@@ -861,38 +861,38 @@
 
 for m in $makefiles
 do
-    sed -e "s;=...@cc@;=$cc;g" \
-    -e "s;=...@cpp@;=$cpp;g" \
-    -e "s;=...@cxx@;=$cxx;g" \
-    -e "s;=...@as@;=$as;g" \
-    -e "s;=...@so@;=$so;g" \
-    -e "s;=...@lib@;=$lib;g" \
-    -e "s;=...@obj@;=$obj;g" \
-    -e "s;=...@exe@;=$exe;g" \
-    -e "s;=...@ar@;=$ar;g" \
-    -e "s;=...@host@;=$host;g" \
-    -e "s;=...@mach@;=$mach;g" \
-    -e "s;=...@bits@;=$bits;g" \
-    -e "s;=...@ranlib@;=$ranlib;g" \
-    -e "s;=...@prefix@;=$prefix;g" \
-    -e "s;=...@libdir@;=$libdir;g" \
-    -e "s;=...@topdir@;=$topdir;g" \
-    -e "s;=...@ccflags@;=$ccflags;g" \
-    -e "s;=...@cppopts@;=$cppopts;g" \
-    -e "s;=...@cxxopts@;=$cxxopts;g" \
-    -e "s;=...@ldflags@;=$ldflags;g" \
-    -e "s;=...@shflags@;=$shflags;g" \
-    -e "s;=...@arflags@;=$arflags;g" \
-    -e "s;=...@sslflags@;=$sslflags;g" \
-    -e "s;=...@rcflags@;=$rcflags;g" \
-    -e "s;=...@includes@;=$includes;g" \
-    -e "s;=...@name@;=$name;g" \
-    -e "s;=...@vmajor@;=$vmajor;g" \
-    -e "s;=...@vminor@;=$vminor;g" \
-    -e "s;=...@vpatch@;=$vpatch;g" \
-    -e "s;@platform@;$platform;g" \
-    -e "s;@testobjs@;$testobjs;g" \
-    -e "s;@modules@;$modules;g" \
+    sed -e "s...@cc@%=$cc%g" \
+    -e "s...@cpp@%=$cpp%g" \
+    -e "s...@cxx@%=$cxx%g" \
+    -e "s...@as@%=$as%g" \
+    -e "s...@so@%=$so%g" \
+    -e "s...@lib@%=$lib%g" \
+    -e "s...@obj@%=$obj%g" \
+    -e "s...@exe@%=$exe%g" \
+    -e "s...@ar@%=$ar%g" \
+    -e "s...@host@%=$host%g" \
+    -e "s...@mach@%=$mach%g" \
+    -e "s...@bits@%=$bits%g" \
+    -e "s...@ranlib@%=$ranlib%g" \
+    -e "s...@prefix@%=$prefix%g" \
+    -e "s...@libdir@%=$libdir%g" \
+    -e "s...@topdir@%=$topdir%g" \
+    -e "s...@ccflags@%=$ccflags%g" \
+    -e "s...@cppopts@%=$cppopts%g" \
+    -e "s...@cxxopts@%=$cxxopts%g" \
+    -e "s...@ldflags@%=$ldflags%g" \
+    -e "s...@shflags@%=$shflags%g" \
+    -e "s...@arflags@%=$arflags%g" \
+    -e "s...@sslflags@%=$sslflags%g" \
+    -e "s...@rcflags@%=$rcflags%g" \
+    -e "s...@includes@%=$includes%g" \
+    -e "s...@name@%=$name%g" \
+    -e "s...@vmajor@%=$vmajor%g" \
+    -e "s...@vminor@%=$vminor%g" \
+    -e "s...@vpatch@%=$vpatch%g" \
+    -e "s...@platform@%$platform%g" \
+    -e "s...@testobjs@%$testobjs%g" \
+    -e "s...@modules@%$modules%g" \
     $m.in > $m
 done
 

Modified: commons/sandbox/runtime/trunk/src/main/native/os/unix/uutils.c
URL: 
http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/unix/uutils.c?rev=795221&r1=795220&r2=795221&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/unix/uutils.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/unix/uutils.c Fri Jul 17 
20:44:55 2009
@@ -30,7 +30,7 @@
     if (!(f = fopen(name, "r")))
         return NULL;
     if ((b = malloc(rd))) {
-        size_t i, nr = fread(b, 1, rd - 2, f);
+        size_t nr = fread(b, 1, rd - 2, f);
         if (nr == (rd - 2)) {
             /* Try with larger buffer size */
             char *nb = malloc(ACR_MAX_FREAD_LEN);
@@ -45,8 +45,9 @@
                 nr = 0;
         }
         if (nr > 0) {
+            int i;
             /* Remove all trailing zero and space characters */
-            for (i = nr - 1; i >= 0 && (acr_iscntrl(b[i]) ||
+            for ((i = (int)(nr - 1); i >= 0 && (acr_iscntrl(b[i]) ||
                  acr_isspace(b[i])); i--)
                 ;
             b[i + 1] = '\0';
@@ -61,3 +62,4 @@
     fclose(f);
     return b;
 }
+


Reply via email to