mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2025-06-23 16:19:07 +08:00
Merge pull request #359 from farrrb/fix-include-stddef
Issue #317 - unity.h should include <stddef.h>
This commit is contained in:
@ -215,6 +215,18 @@ Guide.
|
|||||||
_Example:_
|
_Example:_
|
||||||
#define UNITY_FLOAT_PRECISION 0.001f
|
#define UNITY_FLOAT_PRECISION 0.001f
|
||||||
|
|
||||||
|
### Miscellaneous
|
||||||
|
|
||||||
|
##### `UNITY_EXCLUDE_STDDEF_H`
|
||||||
|
|
||||||
|
Unity uses the `NULL` macro, which defines the value of a null pointer constant,
|
||||||
|
defined in `stddef.h` by default. If you want to provide
|
||||||
|
your own macro for this, you should exclude the `stddef.h` header file by adding this
|
||||||
|
define to your configuration.
|
||||||
|
|
||||||
|
_Example:_
|
||||||
|
#define UNITY_EXCLUDE_STDDEF_H
|
||||||
|
|
||||||
|
|
||||||
### Toolset Customization
|
### Toolset Customization
|
||||||
|
|
||||||
|
@ -19,6 +19,10 @@
|
|||||||
#include <math.h>
|
#include <math.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef UNITY_EXCLUDE_STDDEF_H
|
||||||
|
#include <stddef.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Unity Attempts to Auto-Detect Integer Types
|
/* Unity Attempts to Auto-Detect Integer Types
|
||||||
* Attempt 1: UINT_MAX, ULONG_MAX in <limits.h>, or default to 32 bits
|
* Attempt 1: UINT_MAX, ULONG_MAX in <limits.h>, or default to 32 bits
|
||||||
* Attempt 2: UINTPTR_MAX in <stdint.h>, or default to same size as long
|
* Attempt 2: UINTPTR_MAX in <stdint.h>, or default to same size as long
|
||||||
|
Reference in New Issue
Block a user