Skip to content
Snippets Groups Projects
Verified Commit 334e33cf authored by Jeremy Soller's avatar Jeremy Soller
Browse files

Fix abort definition for C++

parent 2b3e9a3b
No related branches found
No related tags found
No related merge requests found
#ifndef _BITS_STDLIB_H #ifndef _BITS_STDLIB_H
#define _BITS_STDLIB_H #define _BITS_STDLIB_H
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus #ifdef __cplusplus
// C++ needs abort to be a function, define backup function // C++ needs abort to be a function, define backup function
void abort(void); void abort(void);
...@@ -9,10 +13,6 @@ void abort(void); ...@@ -9,10 +13,6 @@ void abort(void);
#define abort() __abort(__func__, __FILE__, __LINE__) #define abort() __abort(__func__, __FILE__, __LINE__)
#endif #endif
#ifdef __cplusplus
extern "C" {
#endif
long double strtold(const char *nptr, char **endptr); long double strtold(const char *nptr, char **endptr);
#ifdef __cplusplus #ifdef __cplusplus
......
...@@ -8,7 +8,7 @@ long double strtold(const char *nptr, char **endptr) { ...@@ -8,7 +8,7 @@ long double strtold(const char *nptr, char **endptr) {
void __abort(const char *func, const char *file, int line); void __abort(const char *func, const char *file, int line);
// backup definition of abort for programs that link it directly // backup definition of abort for programs that link it directly
void abort() { void abort(void) {
// call detailed abort function // call detailed abort function
__abort(__func__, __FILE__, __LINE__); __abort(__func__, __FILE__, __LINE__);
} }
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