Mercurial > dwindows
changeset 1319:03f0bc85e7be
Code change to fix llvm-gcc optimization problem on Mac.
long/int size difference in 64bit causing unexpected buffer overrun with optimization.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Sat, 05 Nov 2011 21:32:35 +0000 |
parents | ebd67be26f43 |
children | 6bebcfa03b2b |
files | dwtest.c readme |
diffstat | 2 files changed, 3 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/dwtest.c Sat Nov 05 14:30:04 2011 +0000 +++ b/dwtest.c Sat Nov 05 21:32:35 2011 +0000 @@ -1085,7 +1085,7 @@ int z; CTIME time; CDATE date; - unsigned long size; + unsigned long size, newpoint; HICN thisicon; /* create a box to pack into the notebook page */ @@ -1161,7 +1161,8 @@ mle_point = dw_mle_import(container_mle, buffer, mle_point); dw_mle_delete(container_mle, 9, 3); mle_point = dw_mle_import(container_mle, "gh", 12); - dw_mle_get_size(container_mle, (unsigned long*)&mle_point, NULL); + dw_mle_get_size(container_mle, &newpoint, NULL); + mle_point = (int)newpoint; sprintf(buffer, "[%d]\r\n\r\n", mle_point); mle_point = dw_mle_import(container_mle, buffer, mle_point); dw_mle_set_cursor(container_mle, mle_point);
--- a/readme Sat Nov 05 14:30:04 2011 +0000 +++ b/readme Sat Nov 05 21:32:35 2011 +0000 @@ -10,9 +10,6 @@ GTK3 due to changes in the core architecture does not support widgets that are smaller than what is contained within them unless they use scrolled windows. GTK2 and other platforms do. -Mac version built on Lion with Xcode 4.1 in 64bit mode will encounter - a compiler optimization problem with the default gcc compiler. - The workaround is to disable optimization or use clang instead. Known limitations: