More android support

Conflicts:
	Makefile.in
	cmakeFiles/rustllvm.cmake
This commit is contained in:
ILyoan 2012-11-29 19:36:03 +09:00 committed by Brian Anderson
parent 987f824f23
commit 4fb4be8f17
8 changed files with 834 additions and 3 deletions

View file

@ -2,4 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "execinfo.h"
#ifndef _RUST_ANDROID_DUMMY_H
#define _RUST_ANDROID_DUMMY_H
int backtrace (void **__array, int __size);
char **backtrace_symbols (void *__const *__array, int __size);
void backtrace_symbols_fd (void *__const *__array, int __size, int __fd);
#endif

View file

@ -73,7 +73,7 @@ last_os_error() {
task->fail();
return NULL;
}
#elif defined(_GNU_SOURCE)
#elif defined(_GNU_SOURCE) && !defined(__ANDROID__)
char cbuf[BUF_BYTES];
char *buf = strerror_r(errno, cbuf, sizeof(cbuf));
if (!buf) {

View file

@ -9,9 +9,13 @@
// except according to those terms.
#ifndef __WIN32__
#ifndef __WIN32_
#ifdef __ANDROID__
#include "rust_android_dummy.h"
#else
#include <execinfo.h>
#endif
#endif
#include <iostream>
#include <algorithm>