@@ -1,6 +1,10 @@
#ifndef _BITS_STDLIB_H
#define _BITS_STDLIB_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#ifdef __cplusplus
// C++ needs abort to be a function, define backup function
void abort(void);
@@ -9,10 +13,6 @@ void abort(void);
#define abort() __abort(__func__, __FILE__, __LINE__)
#endif
-#ifdef __cplusplus
-extern "C" {
-#endif
-
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);
// backup definition of abort for programs that link it directly
-void abort() {
+void abort(void) {
// call detailed abort function
__abort(__func__, __FILE__, __LINE__);
}