Fix some gcc-4.4-isms, should build now on 4.1+.

This commit is contained in:
Graydon Hoare 2012-03-28 13:49:39 -07:00
parent 211d41948a
commit c141e7a068
4 changed files with 10 additions and 2 deletions

View file

@ -38,6 +38,11 @@ extern "C" {
#include <pthread.h>
#include <errno.h>
#include <dirent.h>
#define GCC_VERSION (__GNUC__ * 10000 \
+ __GNUC_MINOR__ * 100 \
+ __GNUC_PATCHLEVEL__)
#else
#error "Platform not supported."
#endif

View file

@ -3,11 +3,12 @@
#define __STDC_LIMIT_MACROS 1
#endif
#include <vector>
#include "rust_internal.h"
#include "rust_util.h"
#include "rust_scheduler.h"
#include <vector>
#define KLOG_(...) \
KLOG(this, kern, __VA_ARGS__)
#define KLOG_ERR_(field, ...) \

View file

@ -34,7 +34,8 @@
// the rust stack and happen frequently enough to catch most stack changes,
// including at the beginning of all landing pads.
// FIXME: Enable this for windows
#if defined __linux__ || defined __APPLE__ || defined __FreeBSD__
#if (defined __linux__ || defined __APPLE__ || defined __FreeBSD__) \
&& (defined(GCC_VERSION) && GCC_VERSION > 40300)
extern "C" void
check_stack_alignment() __attribute__ ((aligned (16)));
#else

View file

@ -43,6 +43,7 @@ public:
}
virtual int32_t remove(T* value);
virtual T * operator[](int32_t index);
virtual ~indexed_list() {}
};
template<typename T> int32_t