Avoid NSGetSizeAndAlignment bug
authorWincent Colaiuta <win@wincent.com>
Tue, 24 Jul 2007 17:25:12 +0000 (19:25 +0200)
committerWincent Colaiuta <win@wincent.com>
Tue, 24 Jul 2007 17:25:12 +0000 (19:25 +0200)
commit1266032b3c0da0a869f49a47459992e1243fcf5c
tree76e54bea2c70b364830218ddae164711ef4c5bc9
parentb788b43b92cd17eab8262d915f738f47b86f150a
Avoid NSGetSizeAndAlignment bug

Leopard has a bug in the NSGetSizeAndAlignment() function which prevents it
from handling structs which have bitfields in them. This in turn breaks the
+[NSValue valueWithBytes:objCType:] method when used with structs containing
bitfields.

So this commit #ifdefs out the tests which fail as a result of this bug. A
simplified testcase demonstrating the problem has be en added to the "other"
subdirectory. A Radar has been filed (<rdar://problem/5357040>); currently
awaiting on a fix from Apple.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
Tests/NSValueTests.m
other/NSGetSizeAndAlignment_bug/NSGetSizeAndAlignment_bug.m [new file with mode: 0644]
other/NSGetSizeAndAlignment_bug/NSGetSizeAndAlignment_bug.xcodeproj/.gitignore [new file with mode: 0644]
other/NSGetSizeAndAlignment_bug/NSGetSizeAndAlignment_bug.xcodeproj/project.pbxproj [new file with mode: 0644]
other/NSGetSizeAndAlignment_bug/NSGetSizeAndAlignment_bug_Prefix.pch [new file with mode: 0644]