Author: mturk
Date: Fri Jul 17 09:43:03 2009
New Revision: 795022

URL: http://svn.apache.org/viewvc?rev=795022&view=rev
Log:
Rename BIG_ENDIAN define

Modified:
    commons/sandbox/runtime/trunk/src/main/native/configure
    commons/sandbox/runtime/trunk/src/main/native/os/hpux/os.c
    commons/sandbox/runtime/trunk/src/main/native/os/linux/os.c
    commons/sandbox/runtime/trunk/src/main/native/os/solaris/os.c
    commons/sandbox/runtime/trunk/src/main/native/shared/xdr.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=795022&r1=795021&r2=795022&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/configure (original)
+++ commons/sandbox/runtime/trunk/src/main/native/configure Fri Jul 17 09:43:03 
2009
@@ -537,7 +537,12 @@
 int main() {return 0;}
 EOF
     rc=0
-    co="`$cc $ccflags $cppopts $test.c -l$1 -o $test$exe 2>&1`"
+    if [ ".host" = ".windows" ]; then
+        ll=$1
+    else
+        ll="-l$1"
+    fi
+    co="`$cc $ccflags $cppopts $test.c $ll -o $test$exe 2>&1`"
     if [ ".$co" = "." ]; then
         rc=1
     else
@@ -789,7 +794,6 @@
 #define HAVE_OPENSSL          $have_openssl
 #define HAVE_ZLIB             $have_zlib
 #define HAVE_SELINUX_H        $have_selinux
-#define HAS_BIG_ENDIAN        $bige
 
 #define HAVE_UNISTD_H         `have_include unistd`
 #define HAVE_STRING_H         `have_include string`
@@ -833,6 +837,7 @@
 #define CC_SIZEOF_VOIDP       `test_csizeof 'void *'`
 #define CC_SIZEOF_SIZE_T      `test_csizeof size_t`
 #define CC_SIZEOF_OFF64_T     $sizeof_off64t
+#define CC_IS_BIG_ENDIAN      $bige
 
 EOF
 
@@ -845,27 +850,9 @@
 EOF
 
 if [ ".$host" = ".windows" ]; then
-    printf "Checking for %-32s" "bufferoverflowu.lib"
-    cat > $test.c << EOF
-#include <stdlib.h>
-#include <stdio.h>
-int main() {return 0;}
-EOF
-    rc=0
-    co="`$cc $ccflags $cppopts $test.c bufferoverflowu.lib -o $test$exe 2>&1`"
-    if [ ".$co" = "." ]; then
-        rc=1
-    else
-        if [ -x $test$exe ]; then
-            rc=1
-        fi
-    fi
-    rm -rf $test.* $test *.pdb >/dev/null 2>&1 || true
-    if [ $rc = 1 ]; then
-        echo ok
+    ok=`have_library bufferoverflowu.lib`
+    if [ ".$ok" = ".1" ]; then
         varadds ldflags "bufferoverflowu.lib"
-    else
-        echo "not found"
     fi
     if [ ".$have_fileextd" = ".1" ]; then
         varadds ldflags "fileextd.lib"

Modified: commons/sandbox/runtime/trunk/src/main/native/os/hpux/os.c
URL: 
http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/hpux/os.c?rev=795022&r1=795021&r2=795022&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/hpux/os.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/hpux/os.c Fri Jul 17 
09:43:03 2009
@@ -75,7 +75,7 @@
 /* TODO: Figure out which API to use for that
  * without defines
  */
-#if HAS_BIG_ENDIAN
+#if CC_IS_BIG_ENDIAN
 #if CC_SIZEOF_VOIDP == 8
     return CSTR_TO_JSTRING("pa64");
 #else

Modified: commons/sandbox/runtime/trunk/src/main/native/os/linux/os.c
URL: 
http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/linux/os.c?rev=795022&r1=795021&r2=795022&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/linux/os.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/linux/os.c Fri Jul 17 
09:43:03 2009
@@ -78,7 +78,7 @@
         ACR_CopyStrn(string, sys.machine, MAXSIZESYSSTRING);
         ACR_StrLwr(string);
 
-#if HAS_BIG_ENDIAN
+#if CC_IS_BIG_ENDIAN
         /* TODO: Name BE machines (PPC ?) */
 #else
         if (strstr(string, "64")) {

Modified: commons/sandbox/runtime/trunk/src/main/native/os/solaris/os.c
URL: 
http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/solaris/os.c?rev=795022&r1=795021&r2=795022&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/solaris/os.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/solaris/os.c Fri Jul 17 
09:43:03 2009
@@ -68,7 +68,7 @@
 
 ACR_JNI_EXPORT_DECLARE(jstring, Os, getProcessor)(ACR_JNISTDARGS)
 {
-#if HAS_BIG_ENDIAN
+#if CC_IS_BIG_ENDIAN
 #if CC_SIZEOF_VOIDP == 8
     return CSTR_TO_JSTRING("sparc64");
 #else

Modified: commons/sandbox/runtime/trunk/src/main/native/shared/xdr.c
URL: 
http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/shared/xdr.c?rev=795022&r1=795021&r2=795022&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/shared/xdr.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/shared/xdr.c Fri Jul 17 
09:43:03 2009
@@ -50,7 +50,7 @@
     (*xdr)->size = len;
     (*xdr)->used = 0;
     (*xdr)->read = 0;
-#if HAS_BIG_ENDIAN     
+#if CC_IS_BIG_ENDIAN     
     (*xdr)->swap = 0;
 #else
     (*xdr)->swap = nbo == ACR_XDR_NATIVE_BYTE_ORDER ? 0 : 1;
@@ -70,7 +70,7 @@
     (*xdr)->size = len - ACR_ALIGN_DEFAULT(sizeof(acr_xdr_t));
     (*xdr)->used = 0;
     (*xdr)->read = 0;
-#if HAS_BIG_ENDIAN     
+#if CC_IS_BIG_ENDIAN     
     (*xdr)->swap = 0;
 #else
     (*xdr)->swap = nbo == ACR_XDR_NATIVE_BYTE_ORDER ? 0 : 1;
@@ -300,7 +300,7 @@
 ACR_DECLARE(acr_uint32_t) ACR_XdrReadLen(int nbo, acr_byte_t *buff)
 {
     acr_uint32_t val = 0;
-#if HAS_BIG_ENDIAN     
+#if CC_IS_BIG_ENDIAN     
     int swap = 0;
 #else
     int swap = nbo == ACR_XDR_NATIVE_BYTE_ORDER ? 0 : 1;


Reply via email to