Issue 118517 - Update standard twain.h header to version 2.1
Summary: Update standard twain.h header to version 2.1
Status: CLOSED FIXED
Alias: None
Product: imported-component
Classification: Test
Component: imported-subcomponent (show other issues)
Version: version58
Hardware: PC All
: P5 (lowest) Normal
Target Milestone: imported-milestone
Assignee: Martin Hollmichel
QA Contact:
URL:
Keywords:
: 106143 (view as issue list)
Depends on:
Blocks:
 
Reported: 2011-10-17 01:11 UTC by Pedro Giffuni
Modified: 2016-04-07 08:28 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Update twain from 1.9 to 2.1 (+mingw32) (91.48 KB, application/octet-stream)
2011-10-17 01:11 UTC, Pedro Giffuni
no flags Details
mingw32 isa now a special case of GNUC (91.45 KB, patch)
2011-10-27 01:14 UTC, Pedro Giffuni
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description Pedro Giffuni 2011-10-17 01:11:20 UTC
Created attachment 76894 [details]
Update twain from 1.9 to 2.1 (+mingw32)

OOo was using the twain header version 1.9. The new versions have nice features:

Version 2.0 – Unix/Linux support, check scanning support, open source, 64-bit
Version 2.1 – Supported on Windows 7 (32 and 64 bit), support for automatic color detection

I took the basic ideas from our local patches to add support for mingw32.
It is however untested so I will leave it here for a while for testers.
Comment 1 oooforum (fr) 2011-10-17 09:10:57 UTC
Hi Pedro,
Do you think that this improvement will be integrated for 3.4 release?
Comment 2 Pedro Giffuni 2011-10-17 19:50:20 UTC
Hi;
Yes, I'd like to commit it but I need confirmation that it doesn't break the build on Windows.
Comment 3 Pedro Giffuni 2011-10-19 13:48:01 UTC
*** Issue 106143 has been marked as a duplicate of this issue. ***
Comment 4 Pedro Giffuni 2011-10-27 01:14:42 UTC
Created attachment 76934 [details]
mingw32 isa now a special case of GNUC

Update: mingw32 is actually a special case of __GNUC__ and is valid also for 64 bits.

This patch preserves the original working order.
Comment 5 Pedro Giffuni 2011-10-28 21:55:38 UTC
I was wondering why not many projects have updated this and why
there doesn't seem to be mingw patches available.

Ming32 seems to be a bit weird as it sets __GNUC__ but according
to the Wine guys it looks like also defines itself as WIN32.

Maybe the original twain header works fine with Ming32 but JIC,
I made a workaround that should work with Mingw64 too: Mingw32
will be detected early and the 32 or 64 bit flags will be set
as if it were a Microsoft compiler but it will be forced to
behave as with our previous twain versions.

I haven't had feedback on the previous patches but this one
seems bulletproof.

twain/inc/twain.h

Committed as revision 1190602.
Comment 6 Oliver-Rainer Wittmann 2012-06-13 12:27:43 UTC
getting rid of value "enhancement" for field "severity".
For enhancement the field "issue type" shall be used.