[Bf-committers] Blender 2.46 RC1 Build Patch For Solaris 10 Sparc, Sun Studio 12

josh eliason josheliason at gmail.com
Mon Mar 31 18:24:25 CEST 2008


I submitted a patch to compile Blender 2.46.RC1 on Solaris 10 Sparc
using Sun Studio 12 compilers. The changes I made were in direct
result of compiler errors.

The OS ifdef block overhaul to source/blender/blenkernel/BKE_cloth.h
is probably to drastic for the current development stage, but a sun
directive, such as the following, would be helpful.

#elif defined (__sun) || defined (__sun__)
#   define DO_INLINE

----------

source/blender/blenkernel/BKE_cloth.h:


original BKE_cloth.h OS ifdef block using reverse logic

#ifndef _WIN32 /*not Windows*/
#   define LINUX
#   ifndef __sgi /*UNIX-like OS, but not SGI*/
#   	define DO_INLINE inline
#   else /*SGI*/
#   	define DO_INLINE
#   endif
#else /*WIN32*/
#   define DO_INLINE __inline
#endif

rewrote BKE_cloth.h OS ifdef block as follows. Note, this is
incomplete as it does not account for other systems such as OSX or
FreeBSD. Also, it assumes any system unidentified is LINUX. It may be
more beneficial to explicitly define each supported OS. I did not
check if the LINUX directive is used to include or exclude code blocks
in other files compiling on Unix-like systems such as the Solaris
platform. But if LINUX is used to include/exclude code for all
Unix-like systems as the original ifdef code suggests, then perhaps
the LINUX directive should be renamed.

#if defined _WIN32
#   define DO_INLINE __inline
#elif defined (__sgi)
#   define DO_INLINE
#elif defined (__sun) || defined (__sun__)
#   define DO_INLINE
#else
#   define DO_INLINE inline
#   define LINUX
#endif

-- 
Josh


More information about the Bf-committers mailing list