On 12/11/08, Ludovic Rousseau <[EMAIL PROTECTED]> wrote:
> On Thu, Dec 11, 2008 at 11:20 AM, Alon Bar-Lev <[EMAIL PROTECTED]> wrote:
>  > Can't it cause conflict?
>
>
> What kind of conflicts?
>  If the DWORD type is already defined elsewhere for exemple?

No... I meant that if prototype accept portable type and code defines
windows type...

>
>
>  > Or the Windows types are defined by "portable" types... ?
>
>
> That depends on your definition of "portable".
>     typedef int32_t LONG;
>     typedef uint32_t DWORD;
>
>  The problem is that with the "official" pcsc-lite we have:
>     typedef long LONG;
>     typedef unsigned long DWORD;
>  These are the same definition that are used by Microsoft on Windows.
>
>  The problem is that Windows on 64-bits arch uses LLP64 model [1] and
>  Linux, Darwin (and I think any other Unix) uses the LP64 model.
>
>  So:
>  On Windows 64bits a LONG is 32 bits
>  On Linux 64 bits a LONG is 64 bits (as a long)
>  On Mac OS X 64 bits a LONG is 32 bits (as a int32_t)
>
>  I think Apple made the good choice. I could change the definitions in
>  pcsc-lite wintypes.h but that would break the ABI (on 64 bits
>  machines) and would then require a new pcsclite library version.

I think a fixup to pcsc-lite is the best, as the winscard ABI is broken now.
But we support all modes now, right?

Thanks,
Alon.
_______________________________________________
opensc-devel mailing list
opensc-devel@lists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc-devel

Reply via email to