mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 19:35:51 +00:00
Bug 579856 Failed to build angle code with Sun Studio 12 r=vlad a=joedrew
This commit is contained in:
parent
ba9a804f7b
commit
3ed86f3dc2
@ -7,6 +7,8 @@ Local patches:
|
||||
|
||||
angle-shared.patch - add declspec dllexport/dllimport support on win32
|
||||
|
||||
angle-sunstudio.patch - Fix compilation with Sun Studio on Solaris
|
||||
|
||||
To regenerate the flex/yacc generated files:
|
||||
|
||||
flex --noline --nounistd --outfile=generated/glslang.cpp src/compiler/glslang.l
|
||||
|
@ -7,6 +7,10 @@
|
||||
#ifndef _BASICTYPES_INCLUDED_
|
||||
#define _BASICTYPES_INCLUDED_
|
||||
|
||||
#if defined(__SUNPRO_C) || defined(__SUNPRO_CC)
|
||||
#define __inline inline
|
||||
#endif
|
||||
|
||||
//
|
||||
// Precision qualifiers
|
||||
//
|
||||
|
@ -147,7 +147,7 @@ void TOutputGLSL::writeFunctionParameters(const TIntermSequence& args)
|
||||
out << arrayBrackets(type);
|
||||
|
||||
// Put a comma if this is not the last argument.
|
||||
if (iter != --args.end())
|
||||
if (iter != args.end() - 1)
|
||||
out << ", ";
|
||||
}
|
||||
}
|
||||
|
@ -263,12 +263,22 @@ public:
|
||||
template<class Other>
|
||||
pool_allocator(const pool_allocator<Other>& p) : allocator(p.getAllocator()) { }
|
||||
|
||||
#if defined(__SUNPRO_CC) && !defined( _RWSTD_ALLOCATOR)
|
||||
// libCStd on Solaris has a differenet interface of allocate()
|
||||
void* allocate(size_type n) {
|
||||
return getAllocator().allocate(n);
|
||||
}
|
||||
void* allocate(size_type n, const void*) {
|
||||
return getAllocator().allocate(n);
|
||||
}
|
||||
#else
|
||||
pointer allocate(size_type n) {
|
||||
return reinterpret_cast<pointer>(getAllocator().allocate(n * sizeof(T)));
|
||||
}
|
||||
pointer allocate(size_type n, const void*) {
|
||||
return reinterpret_cast<pointer>(getAllocator().allocate(n * sizeof(T)));
|
||||
}
|
||||
#endif
|
||||
|
||||
void deallocate(void*, size_type) { }
|
||||
void deallocate(pointer, size_type) { }
|
||||
|
Loading…
Reference in New Issue
Block a user