mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2026-09-13 13:49:58 +00:00
- further fixes to pointer auto-detect
git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@139 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
This commit is contained in:
+24
-8
@@ -15,6 +15,9 @@
|
||||
#ifdef UNITY_USE_LIMITS_H
|
||||
#include <limits.h>
|
||||
#endif
|
||||
#ifdef UNITY_USE_STDINT_H
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
//-------------------------------------------------------
|
||||
// Int Support
|
||||
@@ -109,6 +112,9 @@ typedef _US64 _U_SINT;
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef UINTPTR_MAX
|
||||
#error "OH SHITSTICKS!"
|
||||
#endif
|
||||
//-------------------------------------------------------
|
||||
// Pointer Support
|
||||
//-------------------------------------------------------
|
||||
@@ -117,20 +123,30 @@ typedef _US64 _U_SINT;
|
||||
// We first try to guess based on INTPTR_MAX (if it exists)
|
||||
// Otherwise we fall back on assuming 32-bit
|
||||
#ifndef UNITY_POINTER_WIDTH
|
||||
#ifdef INTPTR_MAX
|
||||
#if (INTPTR_MAX == 0xFFFF)
|
||||
#ifdef UINTPTR_MAX
|
||||
#if (UINTPTR_MAX <= 0xFFFF)
|
||||
#define UNITY_POINTER_WIDTH (16)
|
||||
#elif (INTPTR_MAX == 0xFFFFFFFF)
|
||||
#elif (UINTPTR_MAX <= 0xFFFFFFFF)
|
||||
#define UNITY_POINTER_WIDTH (32)
|
||||
#elif (INTPTR_MAX == 0xFFFFFFFFFFFFFFFF)
|
||||
#elif (UINTPTR_MAX <= 0xFFFFFFFFFFFFFFFF)
|
||||
#define UNITY_POINTER_WIDTH (64)
|
||||
#else
|
||||
#define UNITY_POINTER_WIDTH (32)
|
||||
#endif
|
||||
#else
|
||||
#define UNITY_POINTER_WIDTH (32)
|
||||
#endif
|
||||
#endif
|
||||
#ifndef UNITY_POINTER_WIDTH
|
||||
#ifdef INTPTR_MAX
|
||||
#if (INTPTR_MAX <= 0x7FFF)
|
||||
#define UNITY_POINTER_WIDTH (16)
|
||||
#elif (INTPTR_MAX <= 0x7FFFFFFF)
|
||||
#define UNITY_POINTER_WIDTH (32)
|
||||
#elif (INTPTR_MAX <= 0x7FFFFFFFFFFFFFFF)
|
||||
#define UNITY_POINTER_WIDTH (64)
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#ifndef UNITY_POINTER_WIDTH
|
||||
#define UNITY_POINTER_WIDTH (32)
|
||||
#endif
|
||||
|
||||
#if (UNITY_POINTER_WIDTH == 32)
|
||||
typedef _UU32 _UP;
|
||||
|
||||
@@ -21,6 +21,7 @@ compiler:
|
||||
- UNITY_SUPPORT_64
|
||||
- UNITY_INCLUDE_DOUBLE
|
||||
- UNITY_SUPPORT_TEST_CASES
|
||||
- UNITY_USE_STDINT_H
|
||||
object_files:
|
||||
prefix: '-o'
|
||||
extension: '.o'
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
compiler:
|
||||
path: gcc
|
||||
source_path: 'src/'
|
||||
unit_tests_path: &unit_tests_path 'test/'
|
||||
build_path: &build_path 'build/'
|
||||
options:
|
||||
- '-c'
|
||||
- '-Wall'
|
||||
- '-Wno-address'
|
||||
- '-std=c99'
|
||||
- '-pedantic'
|
||||
includes:
|
||||
prefix: '-I'
|
||||
items:
|
||||
- 'src/'
|
||||
- '../src/'
|
||||
- *unit_tests_path
|
||||
defines:
|
||||
prefix: '-D'
|
||||
items:
|
||||
- UNITY_SUPPORT_64
|
||||
- UNITY_INCLUDE_DOUBLE
|
||||
- UNITY_SUPPORT_TEST_CASES
|
||||
- 'UNITY_POINTER_WIDTH=64'
|
||||
object_files:
|
||||
prefix: '-o'
|
||||
extension: '.o'
|
||||
destination: *build_path
|
||||
linker:
|
||||
path: gcc
|
||||
options:
|
||||
- -lm
|
||||
includes:
|
||||
prefix: '-I'
|
||||
object_files:
|
||||
path: *build_path
|
||||
extension: '.o'
|
||||
bin_files:
|
||||
prefix: '-o'
|
||||
extension: '.exe'
|
||||
destination: *build_path
|
||||
colour: true
|
||||
:unity:
|
||||
:plugins: []
|
||||
Reference in New Issue
Block a user