diff --git a/ChangeLog b/ChangeLog index c49efbd7b..6554ffead 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2013-10-01 Richard Frith-Macdonald + + * config/config.align.c: Try to more reliably detect whether word + alignment is needed. + * Source/NSUserDefaults.m: Fix failure to send notification when + defaults are updated. + 2013-09-18 Richard Frith-Macdonald * Source/GSTLS.h: diff --git a/Source/NSUserDefaults.m b/Source/NSUserDefaults.m index 0a33845fe..2241f6496 100644 --- a/Source/NSUserDefaults.m +++ b/Source/NSUserDefaults.m @@ -2386,7 +2386,10 @@ static BOOL isLocked = NO; * synchronize to load the domain contents into memory * so a lookup will work. */ - haveChange = [pd synchronize]; + if (YES == [pd synchronize]) + { + haveChange = YES; + } } } } diff --git a/config/config.align.c b/config/config.align.c index a9c0487ee..734352cfb 100644 --- a/config/config.align.c +++ b/config/config.align.c @@ -10,12 +10,18 @@ int main () { - char buf[12]; - short sval = 4; - int ival = 3; - *(short *)(buf+1) = sval; - *(int *)(buf+1) = ival; - buf[0] = 0; - puts (buf); /* force compiler not to optimise out the above assignments */ - exit (0); + char buf[12]; + char *ptr = buf; + short sval = 4; + int ival = 3; + if (0 == ((int)ptr % 2)) + { + ptr++; + } + *(short *)ptr = sval; + *(int *)ptr = ival; + ptr[0] = 0; + puts (ptr); /* force compiler not to optimise out the above assignments */ + exit (0); } +