[rtems-libbsd commit] Add wrapper for abort()
Sebastian Huber
sebh at rtems.org
Mon May 13 08:19:53 UTC 2019
Module: rtems-libbsd
Branch: 5-freebsd-12
Commit: 70769b8523fc1441d76699cdf810cc4888911df4
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=70769b8523fc1441d76699cdf810cc4888911df4
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Mon May 13 09:45:34 2019 +0200
Add wrapper for abort()
---
rtemsbsd/include/machine/rtems-bsd-program.h | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/rtemsbsd/include/machine/rtems-bsd-program.h b/rtemsbsd/include/machine/rtems-bsd-program.h
index e31c1a6..7003051 100644
--- a/rtemsbsd/include/machine/rtems-bsd-program.h
+++ b/rtemsbsd/include/machine/rtems-bsd-program.h
@@ -7,7 +7,7 @@
*/
/*
- * Copyright (c) 2013 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2013, 2019 embedded brains GmbH. All rights reserved.
*
* embedded brains GmbH
* Dornierstr. 4
@@ -41,9 +41,10 @@
#define _RTEMS_BSD_MACHINE_RTEMS_BSD_PROGRAM_H_
#include <sys/cdefs.h>
+#include <stdarg.h>
#include <stdbool.h>
#include <stdio.h>
-#include <stdarg.h>
+#include <stdlib.h>
__BEGIN_DECLS
@@ -117,6 +118,10 @@ rtems_bsd_program_asprintf(char **strp, const char *fmt, ...);
void
rtems_bsd_program_free(void *ptr);
+#ifndef RTEMS_BSD_PROGRAM_NO_ABORT_WRAP
+ #define abort() rtems_bsd_program_exit(1)
+#endif
+
#ifndef RTEMS_BSD_PROGRAM_NO_EXIT_WRAP
#define exit(code) rtems_bsd_program_exit(code)
#endif
More information about the vc
mailing list