Review libc dependencies and remove when possible
Just for clarification, no plans to remove libc dependency, just did some code analysis to see how much raylib depend on stardard C library. My conclusions: - stdlib.h: primary dependency is for malloc() and free() - stdio.h: primary dependency is for FILE access, maybe it could go through a custom ABI? - string.h: just around 8 functions required - math.h: just around 8 functions required - others: 1-2 functions required for some other headers
This commit is contained in:
parent
3cd9e3896a
commit
b5fe41f41a
11 changed files with 73 additions and 67 deletions
|
@ -45,10 +45,10 @@
|
|||
|
||||
#include "utils.h" // Required for: fopen() Android mapping
|
||||
|
||||
#include <stdio.h> // Required for: FILE, fopen(), fclose(), fscanf(), feof(), rewind(), fgets()
|
||||
#include <stdlib.h> // Required for: malloc(), free()
|
||||
#include <string.h> // Required for: strcmp()
|
||||
#include <math.h> // Required for: sin(), cos()
|
||||
#include <stdio.h> // Required for: FILE, fopen(), fclose()
|
||||
#include <string.h> // Required for: strncmp() [Used in LoadModelAnimations()], strlen() [Used in LoadTextureFromCgltfImage()]
|
||||
#include <math.h> // Required for: sinf(), cosf(), sqrtf()
|
||||
|
||||
#include "rlgl.h" // raylib OpenGL abstraction layer to OpenGL 1.1, 2.1, 3.3+ or ES2
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue