forked from SerenityOS/serenity
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
A bunch of LibC boilerplate stuff added while trying to get figlet to…
… build.
- Loading branch information
1 parent
511ed4c
commit bb90c8e
Showing
23 changed files
with
117 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#pragma once | ||
|
||
#define isascii(c) (((c) & ~0x7f) == 0) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
#pragma once | ||
|
||
#include "types.h" | ||
#include <sys/cdefs.h> | ||
#include <sys/types.h> | ||
|
||
extern "C" { | ||
__BEGIN_DECLS | ||
|
||
void* mmap(void*, size_t); | ||
int munmap(void*, size_t); | ||
int set_mmap_name(void*, size_t, const char*); | ||
|
||
} | ||
__END_DECLS | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
#pragma once | ||
|
||
extern "C" { | ||
#include <sys/cdefs.h> | ||
|
||
__BEGIN_DECLS | ||
|
||
int spawn(const char* path, const char** args); | ||
|
||
} | ||
__END_DECLS | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
#pragma once | ||
|
||
extern "C" { | ||
#include <sys/cdefs.h> | ||
|
||
__BEGIN_DECLS | ||
|
||
typedef char* va_list; | ||
|
||
#define va_start(ap, v) ap = (va_list)&v + sizeof(v) | ||
#define va_arg(ap, t) ((t*)(ap += sizeof(t)))[-1] | ||
#define va_end(ap) ap = nullptr | ||
|
||
} | ||
__END_DECLS | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,28 @@ | ||
#pragma once | ||
|
||
extern "C" { | ||
#include <sys/cdefs.h> | ||
|
||
__BEGIN_DECLS | ||
|
||
#ifndef EOF | ||
#define EOF (-1) | ||
#endif | ||
|
||
struct __STDIO_FILE { | ||
int fd; | ||
}; | ||
|
||
typedef struct __STDIO_FILE FILE; | ||
|
||
extern FILE* stdin; | ||
extern FILE* stdout; | ||
extern FILE* stderr; | ||
|
||
int fprintf(FILE*, const char* fmt, ...); | ||
int printf(const char* fmt, ...); | ||
int sprintf(char* buffer, const char* fmt, ...); | ||
int putchar(int ch); | ||
void perror(const char*); | ||
|
||
} | ||
__END_DECLS | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
#pragma once | ||
|
||
#include "types.h" | ||
#include <sys/cdefs.h> | ||
#include <sys/types.h> | ||
|
||
extern "C" { | ||
__BEGIN_DECLS | ||
|
||
size_t strlen(const char*); | ||
int strcmp(const char*, const char*); | ||
int memcmp(const void*, const void*, size_t); | ||
void memcpy(void*, const void*, size_t); | ||
const char* strerror(int errnum); | ||
|
||
} | ||
__END_DECLS | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#pragma once | ||
|
||
#ifdef __cplusplus | ||
#define __BEGIN_DECLS extern "C" { | ||
#define __END_DECLS } | ||
#else | ||
#define __BEGIN_DECLS | ||
#define __END_DECLS | ||
#endif | ||
|
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
#pragma once | ||
|
||
#include "types.h" | ||
#include <sys/cdefs.h> | ||
#include <sys/types.h> | ||
|
||
extern "C" { | ||
__BEGIN_DECLS | ||
|
||
int gettimeofday(timeval*); | ||
time_t time(time_t*); | ||
|
||
} | ||
__END_DECLS | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters