diff -urN upp-x11-src-2361/uppsrc/Core/Cpu.cpp upp-x11-src-2361-dwokfur/uppsrc/Core/Cpu.cpp --- upp-x11-src-2361/uppsrc/Core/Cpu.cpp 2010-05-04 03:32:13.000000000 +0200 +++ upp-x11-src-2361-dwokfur/uppsrc/Core/Cpu.cpp 2010-07-05 23:13:37.000000000 +0200 @@ -37,8 +37,22 @@ #else dword info1; dword info2; + /* call the cpuid instruction with the registers as input and output + * modification by Dwokfur based on Sam Hocevar's discussion on + * how to make Assemly code PIC compatible: + * http://sam.zoy.org/blog/2007-04-13-shlib-with-non-pic-code-have-inline-assembly-and-pic-mix-well + */ +#ifdef __PIC__ + __asm__("pushl %%ebx \n\t" /* save %ebx */ + "movl $1, %%eax \n\t" + "cpuid \n\t" + "popl %%ebx \n\t" /* restore the old %ebx */ + : "=d" (info1), "=c" (info2) + : : "%eax"); +#else __asm__("movl $1, %%eax\n\tcpuid" : "=d" (info1), "=c" (info2) : : "%eax", "%ebx"); #endif +#endif sHasMMX = ((info1 >> 23) & 0x1); sHasSSE = ((info1 >> 25) & 0x1); sHasSSE2 = ((info1 >> 26) & 0x1); diff -urN upp-x11-src-2361/uppsrc/plugin/png/pngupp.cpp upp-x11-src-2361-dwokfur/uppsrc/plugin/png/pngupp.cpp --- upp-x11-src-2361/uppsrc/plugin/png/pngupp.cpp 2010-05-04 03:32:20.000000000 +0200 +++ upp-x11-src-2361-dwokfur/uppsrc/plugin/png/pngupp.cpp 2010-07-05 23:13:37.000000000 +0200 @@ -427,9 +427,9 @@ // text_ptr[0].key = "Title"; // text_ptr[0].text = "Mona Lisa"; // text_ptr[0].compression = PNG_TEXT_COMPRESSION_NONE; - #ifdef PNG_iTXt_SUPPORTED - text_ptr[0].lang = NULL; - #endif +// #ifdef PNG_iTXt_SUPPORTED +// text_ptr[0].lang = NULL; +// #endif // png_set_text(png_ptr, info_ptr, text_ptr, 1); /* other optional chunks like cHRM, bKGD, tRNS, tIME, oFFs, pHYs, */