初版适配和修改
This commit is contained in:
9
GCC_COMPAT/include/math.h
Normal file
9
GCC_COMPAT/include/math.h
Normal file
@@ -0,0 +1,9 @@
|
||||
#ifndef GCC_COMPAT_MATH_H
|
||||
#define GCC_COMPAT_MATH_H
|
||||
|
||||
double sqrt(double value);
|
||||
double pow(double base, double exponent);
|
||||
double atan(double value);
|
||||
double tan(double value);
|
||||
|
||||
#endif
|
||||
15
GCC_COMPAT/include/stdio.h
Normal file
15
GCC_COMPAT/include/stdio.h
Normal file
@@ -0,0 +1,15 @@
|
||||
#ifndef GCC_COMPAT_STDIO_H
|
||||
#define GCC_COMPAT_STDIO_H
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
|
||||
typedef struct __gcc_compat_file FILE;
|
||||
|
||||
int printf(const char *format, ...);
|
||||
int sprintf(char *buffer, const char *format, ...);
|
||||
int snprintf(char *buffer, size_t size, const char *format, ...);
|
||||
int vsnprintf(char *buffer, size_t size, const char *format, va_list args);
|
||||
int fputc(int ch, FILE *stream);
|
||||
|
||||
#endif
|
||||
8
GCC_COMPAT/include/stdlib.h
Normal file
8
GCC_COMPAT/include/stdlib.h
Normal file
@@ -0,0 +1,8 @@
|
||||
#ifndef GCC_COMPAT_STDLIB_H
|
||||
#define GCC_COMPAT_STDLIB_H
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
int abs(int value);
|
||||
|
||||
#endif
|
||||
12
GCC_COMPAT/include/string.h
Normal file
12
GCC_COMPAT/include/string.h
Normal file
@@ -0,0 +1,12 @@
|
||||
#ifndef GCC_COMPAT_STRING_H
|
||||
#define GCC_COMPAT_STRING_H
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
void *memcpy(void *destination, const void *source, size_t count);
|
||||
void *memset(void *destination, int value, size_t count);
|
||||
int memcmp(const void *left, const void *right, size_t count);
|
||||
size_t strlen(const char *string);
|
||||
char *strcpy(char *destination, const char *source);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user