I think I will do without the configuration flag and just remove the #ifdef _WIN64 completely<br><br><div class="gmail_quote">On Sat, Feb 18, 2012 at 3:16 PM, red plait <span dir="ltr"><<a href="mailto:redplait@gmail.com">redplait@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi<br>
<div class="im">> I believe there is a simpler way to achieve this: just teaching ECL (not<br>
> GMP) that there exist long long integers in Windows/32. Why not just change<br>
> config.h.msvc6 to define ecl_uint64_t also for 32 bits?<br>
</div>It seems that I now able to build ECL with int64 numbers support<br>
Patch:<br>
<div class="im">*** msvc\ecl\config.h.msvc6.old Wed Feb 15 17:16:30 2012<br>
</div>--- msvc\ecl\config.h.msvc6 Sat Feb 18 17:49:26 2012<br>
***************<br>
*** 120,126 ****<br>
#define ecl_uint32_t unsigned int<br>
#define ecl_int32_t int<br>
<br>
! #ifdef _WIN64<br>
# define ecl_uint64_t unsigned __int64<br>
# define ecl_int64_t __int64<br>
# define ecl_long_long_t long long<br>
--- 120,126 ----<br>
#define ecl_uint32_t unsigned int<br>
#define ecl_int32_t int<br>
<br>
! #if defined(_WIN64) || defined(BITS64)<br>
# define ecl_uint64_t unsigned __int64<br>
# define ecl_int64_t __int64<br>
# define ecl_long_long_t long long<br>
<div class="im"><br>
*** msvc\Makefile.old Wed Feb 15 16:01:44 2012<br>
</div>--- msvc\Makefile Sat Feb 18 18:05:10 2012<br>
***************<br>
<div class="im">*** 60,65 ****<br>
--- 60,68 ----<br>
# Profiling<br>
ECL_PROFILE =<br>
<br>
+ # Bitness of numbers - set it to non-empty to build 64bit numbers on win32<br>
+ ECL_64BITS = 1<br>
+<br>
# <END> (ECL configuration)<br>
# =============================================================<br>
<br>
***************<br>
</div><div class="im">*** 91,97 ****<br>
--- 94,106 ----<br>
ARCHITECTURE=AMD64<br>
VCREDIST=vcredist_x64.exe<br>
!else<br>
+ !if "$(ECL_64BITS)" != ""<br>
</div>+ GMP_BITS=32<br>
<div class="im">+ ECL_BITS64=/D BITS64<br>
+ !else<br>
GMP_BITS=32<br>
+ ECL_BITS64=<br>
+ !endif<br>
GC_CPU=i386<br>
ARCHITECTURE=PENTIUM4<br>
VCREDIST=vcredist_x86.exe<br>
***************<br>
</div><div><div class="h5">*** 102,114 ****<br>
#<br>
!if "$(ECL_DEBUG)" != ""<br>
CFLAGS_OPTIMIZE = /Od<br>
! CFLAGS_CONFIG = /Zi /D_DEBUG /MDd $(CFLAGS_OPTIMIZE) $(CFLAGS_SSE)<br>
LDFLAGS_CONFIG = /debug /nodefaultlib:msvcrt.lib<br>
SHARED_LDFLAGS = /LDd<br>
GCFLAGS =<br>
!else<br>
CFLAGS_OPTIMIZE = /O2<br>
! CFLAGS_CONFIG = /DNDEBUG /MD $(CFLAGS_OPTIMIZE) $(CFLAGS_SSE)<br>
LDFLAGS_CONFIG = /nodefaultlib:msvcrtd.lib<br>
SHARED_LDFLAGS = /LD<br>
GCFLAGS = nodebug=1<br>
--- 111,123 ----<br>
#<br>
!if "$(ECL_DEBUG)" != ""<br>
CFLAGS_OPTIMIZE = /Od<br>
! CFLAGS_CONFIG = /Zi /D_DEBUG /MDd $(CFLAGS_OPTIMIZE) $(CFLAGS_SSE)<br>
$(ECL_BITS64)<br>
LDFLAGS_CONFIG = /debug /nodefaultlib:msvcrt.lib<br>
SHARED_LDFLAGS = /LDd<br>
GCFLAGS =<br>
!else<br>
CFLAGS_OPTIMIZE = /O2<br>
! CFLAGS_CONFIG = /DNDEBUG /MD $(CFLAGS_OPTIMIZE) $(CFLAGS_SSE) $(ECL_BITS64)<br>
LDFLAGS_CONFIG = /nodefaultlib:msvcrtd.lib<br>
SHARED_LDFLAGS = /LD<br>
GCFLAGS = nodebug=1<br>
***************<br>
</div></div><div class="im">*** 352,358 ****<br>
eclgmp.lib:<br>
cd gmp<br>
$(MAKE) "MPN_TYPE=$(GMP_TYPE)" "CFLAGS_CONFIG=$(CFLAGS_CONFIG)" \<br>
! "BITS=$(GMP_BITS)"<br>
$(CP) gmp.lib ..\eclgmp.lib<br>
$(CP) gmp.h ..\ecl\gmp.h<br>
cd ..<br>
--- 361,367 ----<br>
eclgmp.lib:<br>
cd gmp<br>
$(MAKE) "MPN_TYPE=$(GMP_TYPE)" "CFLAGS_CONFIG=$(CFLAGS_CONFIG)" \<br>
! "BITS=$(GMP_BITS)" "BITS64=$(ECL_BITS64)"<br>
$(CP) gmp.lib ..\eclgmp.lib<br>
$(CP) gmp.h ..\ecl\gmp.h<br>
cd ..<br>
<br>
</div>After building:<br>
dumpbin /exports ecl.dll | grep int64<br>
1040 40F 000B44E0 ecl_make_int64_t<br>
1058 421 000B4470 ecl_make_uint64_t<br>
1176 497 000B4380 ecl_to_int64_t<br>
1182 49D 000B4270 ecl_to_uint64_t<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Instituto de Física Fundamental, CSIC<br>c/ Serrano, 113b, Madrid 28006 (Spain) <br><a href="http://juanjose.garciaripoll.googlepages.com" target="_blank">http://juanjose.garciaripoll.googlepages.com</a><br>