mirror of
https://github.com/yuzu-emu/breakpad.git
synced 2024-10-20 07:28:23 +02:00
Fix build breaks on Solaris using Sun Studio.
Written by Ginn Chen & Eagle.Lu@ R=nealsid (although I don't have a Solaris machine to build on, & these changes look localized to Sun-only builds) git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@314 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
parent
e1a7efca7d
commit
4af5fe0b59
@ -176,7 +176,9 @@ inline void RecalculateOffset(struct slist* cur_list, char *stabstr) {
|
|||||||
// Demangle using demangle library on Solaris.
|
// Demangle using demangle library on Solaris.
|
||||||
std::string Demangle(const char *mangled) {
|
std::string Demangle(const char *mangled) {
|
||||||
int status = 0;
|
int status = 0;
|
||||||
|
std::string str(mangled);
|
||||||
char *demangled = (char *)malloc(demangleLen);
|
char *demangled = (char *)malloc(demangleLen);
|
||||||
|
|
||||||
if (!demangled) {
|
if (!demangled) {
|
||||||
fprintf(stderr, "no enough memory.\n");
|
fprintf(stderr, "no enough memory.\n");
|
||||||
goto out;
|
goto out;
|
||||||
@ -188,12 +190,11 @@ std::string Demangle(const char *mangled) {
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string str(demangled);
|
str = demangled;
|
||||||
free(demangled);
|
free(demangled);
|
||||||
return str;
|
|
||||||
|
|
||||||
out:
|
out:
|
||||||
return std::string(mangled);
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool WriteFormat(int fd, const char *fmt, ...) {
|
bool WriteFormat(int fd, const char *fmt, ...) {
|
||||||
|
@ -107,7 +107,11 @@ typedef struct {
|
|||||||
/* Use the same 32-bit alignment when accessing this structure from 64-bit code
|
/* Use the same 32-bit alignment when accessing this structure from 64-bit code
|
||||||
* as is used natively in 32-bit code. #pragma pack is a MSVC extension
|
* as is used natively in 32-bit code. #pragma pack is a MSVC extension
|
||||||
* supported by gcc. */
|
* supported by gcc. */
|
||||||
|
#if defined(__SUNPRO_C) || defined(__SUNPRO_CC)
|
||||||
|
#pragma pack(4)
|
||||||
|
#else
|
||||||
#pragma pack(push, 4)
|
#pragma pack(push, 4)
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
/* context_flags is not present in ppc_thread_state, but it aids
|
/* context_flags is not present in ppc_thread_state, but it aids
|
||||||
@ -136,7 +140,11 @@ typedef struct {
|
|||||||
MDVectorSaveAreaPPC vector_save;
|
MDVectorSaveAreaPPC vector_save;
|
||||||
} MDRawContextPPC; /* Based on ppc_thread_state */
|
} MDRawContextPPC; /* Based on ppc_thread_state */
|
||||||
|
|
||||||
|
#if defined(__SUNPRO_C) || defined(__SUNPRO_CC)
|
||||||
|
#pragma pack(0)
|
||||||
|
#else
|
||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
|
#endif
|
||||||
|
|
||||||
/* For (MDRawContextPPC).context_flags. These values indicate the type of
|
/* For (MDRawContextPPC).context_flags. These values indicate the type of
|
||||||
* context stored in the structure. MD_CONTEXT_PPC is Breakpad-defined. Its
|
* context stored in the structure. MD_CONTEXT_PPC is Breakpad-defined. Its
|
||||||
|
Loading…
Reference in New Issue
Block a user