Hi Pedro,

On Fri, Oct 28, 2011 at 03:12:42PM -0700, Pedro Giffuni wrote:
> Hi again;
> 
> I waited for a while but I didn't get any report on how
> well (or bad) the new twain header works while building
> on Windows. I am pretty sure the authors take care of
> GCC and most commercial compilers so the only special
> case is mingw32.
> 
> Ming32 is something that was indeed hacked into our old
> header so I adapted the code to suit our previous behavior
> and now that I have something robust I have committed it.
> I did everything I could to ensure this works but I am not
> perfect, and there has been little feedback, so please
> don't panic and let me know if something related with
> scanners changes.

I didn't test scanning, but building breaks:

ifdef defined(TWH_CMP_MING32)
     #pragma pack (push, 2)
#elif TWH_CMP_MSC

see attached patch.

Regards
-- 
Ariel Constenla-Haile
La Plata, Argentina
Compiling: extensions/source/scanner/scanwin.cxx
C:/ARCHIV~1/MICROS~1.0/VC/bin/cl.exe  -Zm500 -Zc:forScope,wchar_t- -GR -GS -c 
-nologo -Gs  -Gy -Ob1 -Oxs -Oy- -DENABLE_LAYOUT=0 
-DENABLE_LAYOUT_EXPERIMENTAL=0 -Gd  -I. -I../../wntmsci12.pro/inc/scn -I../inc 
-I../../inc/pch -I../../inc -I../../WIN/inc -I../../wntmsci12.pro/inc -I. 
-IY:/apache/trunk/main/solver/340/wntmsci12.pro/inc/stl 
-IY:/apache/trunk/main/solver/340/wntmsci12.pro/inc/external 
-IY:/apache/trunk/main/solver/340/wntmsci12.pro/inc 
-IY:/apache/trunk/main/solenv/wntmsci12/inc -IY:/apache/trunk/main/solenv/inc 
-IY:/apache/trunk/main/res 
-IY:/apache/trunk/main/solver/340/wntmsci12.pro/inc/stl 
-IC:/ARCHIV~1/Java/JDK16~2.0_1/include/win32 
-IC:/ARCHIV~1/Java/JDK16~2.0_1/include 
-IC:/ARCHIV~1/MICROS~3/Windows/v6.1/include -IC:/ARCHIV~1/MICROS~1.0/VC/include 
-IC:/ARCHIV~1/MI599E~1/include -IC:/ARCHIV~1/MI599E~1/include  
-IY:/apache/trunk/main/solver/340/wntmsci12.pro/inc/offuh -I. -I../../res -I. 
-Wall -wd4061 -wd4127 -wd4191 -wd4217 -wd4250 -wd4251 -wd4275     -wd4290 
-wd4294 -wd4355 -wd4511 -wd4512 -wd4514 -wd4611 -wd4625 -wd4626     -wd4640 
-wd4675 -wd4710 -wd4711 -wd4786 -wd4800 -wd4820 -wd4503 -wd4619     -wd4365 
-wd4668 -wd4738 -wd4826 -wd4350 -wd4505 -wd4692 -wd4189 -wd4005     -wd4180   
-DWNT -DWNT -DNT351 -DMSC -DM1500 -DINTEL -D_X86_=1 -D_CRT_SECURE_NO_DEPRECATE 
-D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NON_CONFORMING_SWPRINTFS -DFULL_DESK 
-DBOOST_MEM_FN_ENABLE_CDECL -DSTLPORT_VERSION=400 -D_MT -DWINVER=0x0500 
-D_WIN32_WINNT=0x0500 -D_WIN32_IE=0x0500 -DCPPU_ENV=msci -DSUPD=340 -DPRODUCT 
-DNDEBUG -DOSL_DEBUG_LEVEL=0 -DOPTIMIZE -DCUI -DSOLAR_JAVA   -DSHAREDLIB 
-D_DLL_ -DWIN32 -D_MT -D_DLL -DWIN32 -D_MT -D_DLL  -EHa -DEXCEPTIONS_ON  
-Fo../../wntmsci12.pro/slo/scanwin.obj 
Y:/apache/trunk/main/extensions/source/scanner/scanwin.cxx 
: &&     
PATH=/cygdrive/y/apache/trunk/main/solver/340/wntmsci12.pro/bin${PATH:+:${PATH}}
 Y:/apache/trunk/main/solver/340/wntmsci12.pro/bin/makedepend 
@C:/cygwin/tmp/mkFpvjxJ > ../../wntmsci12.pro/misc/s_scanwin.dpcc
scanwin.cxx
Y:/apache/trunk/main/solver/340/wntmsci12.pro/inc/external\twain/twain.h(184) : 
warning C4067: s�mbolos (token) inesperados despu�s de la directiva del 
preprocesador; se esperaba una nueva l�nea
Y:/apache/trunk/main/solver/340/wntmsci12.pro/inc/external\twain/twain.h(186) : 
fatal error C1017: expresi�n constante de tipo entero no v�lida
dmake:  Error code 2, while making '../../wntmsci12.pro/slo/scanwin.obj'
diff --git a/twain/inc/twain.h b/twain/inc/twain.h
index 95a2a55..11a93e4 100644
--- a/twain/inc/twain.h
+++ b/twain/inc/twain.h
@@ -181,9 +181,9 @@
 
 
 /* Set the packing: this occurs before any structures are defined */
-#ifdef defined(TWH_CMP_MING32)
+#if defined(TWH_CMP_MING32)
     #pragma pack (push, 2)
-#elif TWH_CMP_MSC
+#elif defined(TWH_CMP_MSC)
     #pragma pack (push, before_twain)
     #pragma pack (2)
 #elif defined(TWH_CMP_GNU)
@@ -2184,9 +2184,9 @@ typedef struct {
 } TW_ENTRYPOINT, FAR * pTW_ENTRYPOINT;
 
 /* Restore the previous packing alignment: this occurs after all structures 
are defined */
-#ifdef defined(TWH_CMP_MING32)
+#if defined(TWH_CMP_MING32)
     #pragma pack (pop)
-#elif TWH_CMP_MSC
+#elif defined(TWH_CMP_MSC)
     #pragma pack (pop, before_twain)
 #elif defined(TWH_CMP_GNU)
     #pragma pack (pop, before_twain)

Attachment: pgpiuiCS4lzDI.pgp
Description: PGP signature

Reply via email to