You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update libdivide.h to support -ffreestanding targets
Simply check for the value of the `__STDC_HOSTED__` macro before including `<stdlib.h>` or `<stdio.h>` and others.
Moreover, as an idea for future changes, you could also add some checks for user-provided `LIBDIVIDE_{ERROR|ASSERT}`, as printing to the screen and aborting the program is not always a good thing to do anyways (and is sometimes not even possible, in the case of a freestanding environment)
0 commit comments