From Paul Idstein, warning fixes for OSX 10.7

This commit is contained in:
Robert Osfield
2011-09-12 11:24:24 +00:00
parent 9be4a1a1c8
commit edd83a03fe
2 changed files with 4 additions and 2 deletions

View File

@@ -73,7 +73,7 @@ typedef char TCHAR;
// Unfortunately, we can't use the label MAC_OS_X_VERSION_10_4
// for older OS's like Jaguar, Panther since they are not defined,
// so I am going to hardcode the number.
#if (MAC_OS_X_VERSION_MAX_ALLOWED <= 1040)
#if (MAC_OS_X_VERSION_MAX_ALLOWED <= 1040) || (MAC_OS_X_VERSION_MAX_ALLOWED >= 1066)
#define stat64 stat
#endif
#elif defined(__CYGWIN__) || defined(__FreeBSD__) || (defined(__hpux) && !defined(_LARGEFILE64_SOURCE))

View File

@@ -388,8 +388,10 @@ osg::Image* CreateOSGImageFromCGImage(CGImageRef image_ref)
int i, j;
GLubyte *pixels = (GLubyte *)image_data;
for (i = the_height * the_width; i--; ) {
GLuint *value = (GLuint *)pixels;
#if __BIG_ENDIAN__
// That value is a temporary one and only needed for endianess conversion
GLuint *value = (GLuint *)pixels;
//
// swap endian of each pixel for avoiding weird colors on ppc macs
// by Tatsuhiro Nishioka