On 21/06/17 10:46, Vitaly Prapirny wrote:
Roger Leigh wrote on 21/06/2017 12:20:
On 21/06/17 08:48, Vitaly Prapirny wrote:
I've got an error while running cmake with "Borland Makefiles" generator and Borland C++ Builder 5 compiler. Is BCB5 still supported?

It's not a combination I've personally tested, but I can't see any evidence that it shouldn't work.

What are the errors you are seeing? Maybe it just needs a few minor tweaks to our cmake logic.
I've attached log files to the https://issues.apache.org/jira/browse/XERCESC-2077

Thanks. This was a problem with the int type check fallbacks. Please see the attached patch or this github branch: https://github.com/rleigh-codelibre/xerces-c/tree/cmake-int-fallback

This was a search-replace error when porting m4/xerces_int_types, and all the systems I've tested on all had stdint.h or cstdint, so I didn't notice this wasn't working. I've switched all the types to be unambiguously signed, and added SIGNED_ to all the variable names where missing.

If you could give that a go, I'd be very interested if this works for you, or if you hit any other problems after this point.


Regards,
Roger
>From c56f25ebf6f40a68a3232d1132bb7f4953185218 Mon Sep 17 00:00:00 2001
From: Roger Leigh <rle...@codelibre.net>
Date: Wed, 21 Jun 2017 11:12:17 +0100
Subject: [PATCH] cmake: XercesIntType: Correct signed types and variable names

---
 cmake/XercesIntTypes.cmake | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/cmake/XercesIntTypes.cmake b/cmake/XercesIntTypes.cmake
index 3390febf7..dd5ab472c 100644
--- a/cmake/XercesIntTypes.cmake
+++ b/cmake/XercesIntTypes.cmake
@@ -70,13 +70,13 @@ else()
 endif()
 
 # Check type sizes
-check_type_size("short"              SIZEOF_SHORT)
+check_type_size("signed short"       SIZEOF_SIGNED_SHORT)
 check_type_size("unsigned short"     SIZEOF_UNSIGNED_SHORT)
-check_type_size("int"                SIZEOF_INT)
+check_type_size("signed int"         SIZEOF_SIGNED_INT)
 check_type_size("unsigned int"       SIZEOF_UNSIGNED_INT)
-check_type_size("long"               SIZEOF_LONG)
+check_type_size("signed long"        SIZEOF_SIGNED_LONG)
 check_type_size("unsigned long"      SIZEOF_UNSIGNED_LONG)
-check_type_size("long long"          SIZEOF_LONG_LONG)
+check_type_size("signed long long"   SIZEOF_SIGNED_LONG_LONG)
 check_type_size("unsigned long long" SIZEOF_UNSIGNED_LONG_LONG)
 check_type_size("__int64"            SIZEOF___INT64)
 check_type_size("unsigned __int64"   SIZEOF_UNSIGNED__INT64)
@@ -102,7 +102,7 @@ else()
   # Fallback to basic language types
   if(SIZEOF_SIGNED_SHORT EQUAL 2)
     set(XERCES_S16BIT_INT "signed short")
-  elseif(SIZEOF_INT EQUAL 2)
+  elseif(SIZEOF_SIGNED_INT EQUAL 2)
     set(XERCES_S16BIT_INT "int")
   else()
     message(FATAL_ERROR "Couldn't find a signed 16-bit type")
@@ -132,12 +132,12 @@ else()
     message(FATAL_ERROR "Couldn't find an unsigned 32-bit type")
   endif()
 
-  if(SIZEOF_INT EQUAL 8)
-    set(XERCES_S64BIT_INT "int")
-  elseif(SIZEOF_LONG EQUAL 8)
-    set(XERCES_S64BIT_INT "long")
-  elseif(SIZEOF_LONG_LONG EQUAL 8)
-    set(XERCES_S64BIT_INT "long long")
+  if(SIZEOF_SIGNED_INT EQUAL 8)
+    set(XERCES_S64BIT_INT "signed int")
+  elseif(SIZEOF_SIGNED_LONG EQUAL 8)
+    set(XERCES_S64BIT_INT "signed long")
+  elseif(SIZEOF_SIGNED_LONG_LONG EQUAL 8)
+    set(XERCES_S64BIT_INT "signed long long")
   elseif(SIZEOF___INT64 EQUAL 8)
     set(XERCES_S64BIT_INT "__int64")
   else()
-- 
2.13.1


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscr...@xerces.apache.org
For additional commands, e-mail: c-dev-h...@xerces.apache.org

Reply via email to