Window datatype on 32 and 64 bit systems

rarob at comcast.net rarob at comcast.net
Fri Mar 14 05:38:16 PDT 2008


Greetings all,
  I've got a question regarding how the Window X11 datatype works on 32 and 64 
bit systems.
My 64 bit boxes show sizeof(Window)=8, and the 32 bit boxes show 
sizeof(Window)=4.  An engineer
that I've worked with stated that the upper 32 bits of the 64 bit Window *will* 
be zero, since a Window 
is a 32 bit values according to the X11 protocol.  
  The context of the question is related to our application.  It is built using 
a combination of F77 and C/C++
code, and the Fortran side was coded (years ago) to use an integer*4 to 
represent the Window value.  There 
are C wrappers between the Fortran and C/C++ code that explicitly convert  
between the Fortran integer*4 and 
the C/C++ Window.  If the *value* of the Window code never exceeds what a 
integer*4 holds then all is good.  
If the value of a 64-bit Window exceeds a 32 bit quantity, then something needs 
to change in our app.


Thanks,

Rob



More information about the xorg mailing list