# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1320528755 0 # Node ID 03f0bc85e7bec385334fddea5a03fda0fb7af1d6 # Parent ebd67be26f4352e5f359499732e2425f90a8d68e Code change to fix llvm-gcc optimization problem on Mac. long/int size difference in 64bit causing unexpected buffer overrun with optimization. diff -r ebd67be26f43 -r 03f0bc85e7be dwtest.c --- 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); diff -r ebd67be26f43 -r 03f0bc85e7be readme --- 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: