some stuff to get further in python builds
This commit is contained in:
parent
643049ff32
commit
b23d7a2930
@ -13,3 +13,6 @@ extern int isupper(int c);
|
||||
extern int isxdigit(int c);
|
||||
|
||||
extern int isascii(int c);
|
||||
|
||||
extern int tolower(int c);
|
||||
extern int toupper(int c);
|
||||
|
@ -9,3 +9,5 @@ extern double sqrt(double x);
|
||||
extern double fabs(double x);
|
||||
extern double sin(double x);
|
||||
extern double cos(double x);
|
||||
|
||||
#define HUGE_VAL (__builtin_huge_val())
|
||||
|
@ -48,3 +48,6 @@ extern void perror(const char *s);
|
||||
extern int ungetc(int c, FILE * stream);
|
||||
|
||||
extern int feof(FILE * stream);
|
||||
extern void clearerr(FILE * stream);
|
||||
|
||||
#define getc(s) fgetc(s)
|
||||
|
6
libc/ctype/tolower.c
Normal file
6
libc/ctype/tolower.c
Normal file
@ -0,0 +1,6 @@
|
||||
int tolower(int c) {
|
||||
if (c >= 'A' && c <= 'Z') {
|
||||
return c - 'A' + 'a';
|
||||
}
|
||||
return c;
|
||||
}
|
7
libc/ctype/toupper.c
Normal file
7
libc/ctype/toupper.c
Normal file
@ -0,0 +1,7 @@
|
||||
int toupper(int c) {
|
||||
if (c >= 'a' && c <= 'z') {
|
||||
return c - 'a' + 'A';
|
||||
}
|
||||
return c;
|
||||
}
|
||||
|
@ -331,3 +331,7 @@ void setbuf(FILE * stream, char * buf) {
|
||||
int feof(FILE * stream) {
|
||||
return stream->eof;
|
||||
}
|
||||
|
||||
void clearerr(FILE * stream) {
|
||||
stream->eof = 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user