| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
Per the standard, malloc is declared in stdlib.h1 which is already included. Footnotes |
Sorry, something went wrong.
|
@ahuo-dev Could you share what environment you were trying to solve what problem, then we can look at whether this is the best fix. |
Sorry, something went wrong.
|
Sorry, something went wrong.
|
Ok, but the include of #malloc.h in the CommonDef.h shouldn't need to trigger you to include it in the SatndardCLibrary.h, right? Could you share what the compile error is that you are getting? |
Sorry, something went wrong.
Compile error message : and run command "gcc -E " to expand all macro. I see malloc function prototype expand to cpputest_malloc_location, like this : 38 "/usr/include/malloc.h"cpputest_malloc_location( 38 "/usr/include/malloc.h" 3 4size_t __size 38 "/usr/include/malloc.h", "/usr/include/malloc.h", 38) 38 "/usr/include/malloc.h" 3 4__attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__alloc_size__ (1))) ; Normally it should be like this: |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Add malloc.h into StandardCLibrary.h. Some C code include malloc.h for malloc func.