x86_64 part 2
Posted 03-06-2012 at 09:57 AM by Rod3775
When XWindows was ported to 64 bit architectures, the decision was made (probably for legacy compatibility) not to add a 64 bit data format to routines that return overloaded pointers, specifically XGetWindowProperties. Pointers, which are 64 bits, are returned in 64 bit elements that are claimed to be 32 bits. There is no way to cope with this in user code, except to check which architecture you are running on. The compiler define "__x86_64" is set on Intel 64 bit compilers. wmctrl (not part of base Slackware, but available as a Slackbuild), uses this routine and fails. In wmctrl-1.07/main.c add the following after line 1441 to fix the problem:
#ifdef __x86_64
if(ret_type == 32) tmp_size *=2;
#endif
#ifdef __x86_64
if(ret_type == 32) tmp_size *=2;
#endif
Total Comments 0