Remove bool from public headers

This commit is contained in:
Justine Tunney 2023-11-15 20:57:18 -08:00
parent dffee606cf
commit 1351d3cede
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
55 changed files with 105 additions and 98 deletions

View file

@ -12,8 +12,8 @@ COSMOPOLITAN_C_START_
*/
/* clang-format off */
bool IsElfSymbolContent(const Elf64_Sym *);
bool IsElf64Binary(const Elf64_Ehdr *, size_t);
bool32 IsElfSymbolContent(const Elf64_Sym *);
bool32 IsElf64Binary(const Elf64_Ehdr *, size_t);
char *GetElfStringTable(const Elf64_Ehdr *, size_t, const char *);
Elf64_Sym *GetElfSymbols(const Elf64_Ehdr *, size_t, int, Elf64_Xword *);
Elf64_Shdr *GetElfSymbolTable(const Elf64_Ehdr *, size_t, int, Elf64_Xword *);

View file

@ -28,7 +28,7 @@
* @param mapsize is the number of bytes past `elf` we can access
* @return true if elf header looks legit
*/
bool IsElf64Binary(const Elf64_Ehdr *elf, size_t mapsize) {
bool32 IsElf64Binary(const Elf64_Ehdr *elf, size_t mapsize) {
if (mapsize < sizeof(Elf64_Ehdr)) return false;
if (READ32LE(elf->e_ident) != READ32LE(ELFMAG)) return false;
return elf->e_ident[EI_CLASS] != ELFCLASS32;

View file

@ -19,7 +19,7 @@
#include "libc/elf/def.h"
#include "libc/elf/elf.h"
bool IsElfSymbolContent(const Elf64_Sym *sym) {
bool32 IsElfSymbolContent(const Elf64_Sym *sym) {
return sym->st_size > 0 && (ELF64_ST_TYPE(sym->st_info) == STT_FUNC ||
ELF64_ST_TYPE(sym->st_info) == STT_OBJECT);
}