Skip to content
Snippets Groups Projects
Commit d4308c8a authored by Nagy Tibor's avatar Nagy Tibor
Browse files

Disable symbol mangling for C++

parent bfa068df
No related branches found
No related tags found
No related merge requests found
#ifndef _BITS_ERRNO_H #ifndef _BITS_ERRNO_H
#define _BITS_ERRNO_H #define _BITS_ERRNO_H
#ifdef __cplusplus
extern "C" {
#endif
//TODO extern __thread int errno; //TODO extern __thread int errno;
extern int errno; extern int errno;
#ifdef __cplusplus
} // extern "C"
#endif
#endif /* _BITS_ERRNO_H */ #endif /* _BITS_ERRNO_H */
#ifndef _BITS_FCNTL_H #ifndef _BITS_FCNTL_H
#define _BITS_FCNTL_H #define _BITS_FCNTL_H
#ifdef __cplusplus
extern "C" {
#endif
int open(const char* filename, int flags, ...); int open(const char* filename, int flags, ...);
int fcntl(int fildes, int cmd, ...); int fcntl(int fildes, int cmd, ...);
#ifdef __cplusplus
} // extern "C"
#endif
#endif #endif
...@@ -5,6 +5,10 @@ ...@@ -5,6 +5,10 @@
typedef struct FILE FILE; typedef struct FILE FILE;
#ifdef __cplusplus
extern "C" {
#endif
int fprintf(FILE * stream, const char * fmt, ...); int fprintf(FILE * stream, const char * fmt, ...);
int printf(const char * fmt, ...); int printf(const char * fmt, ...);
int snprintf(char *s, size_t n, const char * fmt, ...); int snprintf(char *s, size_t n, const char * fmt, ...);
...@@ -13,4 +17,8 @@ int fscanf(FILE * stream, const char * fmt, ...); ...@@ -13,4 +17,8 @@ int fscanf(FILE * stream, const char * fmt, ...);
int scanf(const char * fmt, ...); int scanf(const char * fmt, ...);
int sscanf(const char * input, const char * fmt, ...); int sscanf(const char * input, const char * fmt, ...);
#ifdef __cplusplus
} // extern "C"
#endif
#endif /* _BITS_STDIO_H */ #endif /* _BITS_STDIO_H */
...@@ -3,7 +3,15 @@ ...@@ -3,7 +3,15 @@
#define _POSIX_VERSION 200809L #define _POSIX_VERSION 200809L
#ifdef __cplusplus
extern "C" {
#endif
int execl(const char *path, const char* argv0, ...); int execl(const char *path, const char* argv0, ...);
int execle(const char *path, const char* argv0, ...); int execle(const char *path, const char* argv0, ...);
#ifdef __cplusplus
} // extern "C"
#endif
#endif #endif
...@@ -4,10 +4,18 @@ ...@@ -4,10 +4,18 @@
// Generated from: // Generated from:
// `grep "opt" target/include/unistd.h` // `grep "opt" target/include/unistd.h`
#ifdef __cplusplus
extern "C" {
#endif
extern char* optarg; extern char* optarg;
extern int opterr; extern int opterr;
extern int optind; extern int optind;
extern int optopt; extern int optopt;
int getopt(int argc, char *const *argv, const char *optstring); int getopt(int argc, char *const *argv, const char *optstring);
#ifdef __cplusplus
} // extern "C"
#endif
#endif #endif
...@@ -6,6 +6,10 @@ ...@@ -6,6 +6,10 @@
// Generated from: // Generated from:
// `grep "malloc\|calloc\|realloc\|free\|valloc\|memalign" target/include/stdlib.h` // `grep "malloc\|calloc\|realloc\|free\|valloc\|memalign" target/include/stdlib.h`
#ifdef __cplusplus
extern "C" {
#endif
void *calloc(size_t nelem, size_t elsize); void *calloc(size_t nelem, size_t elsize);
void free(void *ptr); void free(void *ptr);
void *malloc(size_t size); void *malloc(size_t size);
...@@ -13,4 +17,8 @@ void *memalign(size_t alignment, size_t size); ...@@ -13,4 +17,8 @@ void *memalign(size_t alignment, size_t size);
void *realloc(void *ptr, size_t size); void *realloc(void *ptr, size_t size);
void *valloc(size_t size); void *valloc(size_t size);
#ifdef __cplusplus
} // extern "C"
#endif
#endif #endif
...@@ -61,7 +61,15 @@ typedef unsigned long long jmp_buf[8]; ...@@ -61,7 +61,15 @@ typedef unsigned long long jmp_buf[8];
typedef unsigned long jmp_buf[8]; typedef unsigned long jmp_buf[8];
#endif #endif
#ifdef __cplusplus
extern "C" {
#endif
int setjmp(jmp_buf buf); int setjmp(jmp_buf buf);
void longjmp(jmp_buf buf, int value); void longjmp(jmp_buf buf, int value);
#ifdef __cplusplus
} // extern "C"
#endif
#endif /* _SETJMP_H */ #endif /* _SETJMP_H */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment