Skip to content
Tcl Source Code View Ticket
Login

View Ticket

DWORD vs DWORD_PTR

Closed / Fixed3497099fffffffffffffffffffffffffffffffffCreated 15 years agoUpdated 15 years ago
Descriptionplain2012-03-05 18:40:35
Looking at the nijtmans commit

http://core.tcl.tk/tcl/info/8c851aad1d

and the sebres commit

http://core.tcl.tk/tcl/info/57f30e3f2c

you two apparently have compilers making
incompatible demands.  Can you guys sort
out a common solution please?

When you get that sorted out, the same issue
is over in the registry package, and neither of
these packages seem to have had their version
numbers maintained since 2006 even though
there have been many commits so that the
"dde 1.3.2" of today is quite distinct from the
"dde 1.3.2" that was released bundled with Tcl 8.5a4.
Can't fix the past, but let's at least get a bump done now.
dgpplain2012-03-06 02:09:17
The use of the "intptr_t" type in tclTest.c is another
point of contention that comes up in the 8c851aad1d checkin.

Elsewhere in Tcl the macro HAVE_INTPTR_T is used to guard
such things.
nijtmansplain2012-03-06 03:45:08
The last argument of the function
SendMessageTimeout is of type
PDWORD_PTR, see:
    <http://msdn.microsoft.com/en-us/library/windows/desktop/ms644952%28v=vs.85%29.aspx>
so the variable sendResult should
really be DWORD_PTR, not DWORD......

sebres, what version of Visual Studio you
are using?

The easiest fix for the intptr_t usage
is as done in trunk: just juse size_t in
stead of intptr_t.
Backported to core-8-5-branch now.
nijtmans Ticket [3497099fff]: 1 change [History diff]2012-03-06 03:46:43
sebresplain2012-03-06 16:37:01
I am forced to use Visual studio 6.0 (7.0) in one long long project, that I still support. :)

IMO, I found more friendly solution, commited now in "dgp-scan-element".
http://core.tcl.tk/tcl/info/a16a2b5417
nijtmansplain2012-03-07 04:10:31
This 'friendly' solution looks good to me, so committed
that to core-8-4-branch, core-8-5-branch and trunk,
and re-merged the core-8-5-branch changes
to dgp-scan-element.

So, the PDWORD_PTR and intptr_t issues are
now resolved in all those branches.

Left-to-do: bump dde version, but prefer
to do that in a separate commit.

Thanks!
sebresplain2012-03-07 07:53:06
Hi, Jan

Makes it sense that you have placed the "#if !defined(MAXULONG_PTR)" before the "#include <windows.h>"?
dgpplain2012-03-08 03:54:29
allow_comments - 1
nijtmansplain2012-03-08 04:38:58
No, that didn't make sense :-(
Log in (anonymous is fine) to add a comment.