use SDL's functions version inplace of libc version

This commit is contained in:
Sylvain authored and Sam Lantinga committed 2021-11-22 08:38:46 -08:00
1 parent 35b7ce1893
commit d31251b014
46 files changed
+114 -124

No files matched your search

+1 -1
View File
@@ -59,7 +59,7 @@ SDL_GetPowerInfo_Haiku(SDL_PowerState * state, int *seconds, int *percent)
return SDL_FALSE; /* maybe some other method will work? */
}
memset(regs, '\0', sizeof(regs));
SDL_memset(regs, '\0', sizeof(regs));
regs[0] = APM_FUNC_OFFSET + APM_FUNC_GET_POWER_STATUS;
regs[1] = APM_DEVICE_ALL;
rc = ioctl(fd, APM_BIOS_CALL, regs);
+1 -1
View File
@@ -51,7 +51,7 @@ open_power_file(const char *base, const char *node, const char *key)
return -1; /* oh well. */
}
snprintf(path, pathlen, "%s/%s/%s", base, node, key);
SDL_snprintf(path, pathlen, "%s/%s/%s", base, node, key);
fd = open(path, O_RDONLY | O_CLOEXEC);
SDL_stack_free(path);
return fd;