[rtems-libbsd commit] Remove #undefs and fix formatting.

Chris Johns chrisj at rtems.org
Fri Jun 19 06:07:37 UTC 2015


Module:    rtems-libbsd
Branch:    master
Commit:    59bc7c1f5f90500dbd7b419602cee84de0766e17
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=59bc7c1f5f90500dbd7b419602cee84de0766e17

Author:    Chris Johns <chrisj at rtems.org>
Date:      Fri Jun 19 16:07:32 2015 +1000

Remove #undefs and fix formatting.

---

 rtemsbsd/include/machine/rtems-bsd-program.h |  4 ----
 rtemsbsd/rtems/rtems-bsd-program.c           | 13 +++++++------
 2 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/rtemsbsd/include/machine/rtems-bsd-program.h b/rtemsbsd/include/machine/rtems-bsd-program.h
index 7c2837e..82830f5 100644
--- a/rtemsbsd/include/machine/rtems-bsd-program.h
+++ b/rtemsbsd/include/machine/rtems-bsd-program.h
@@ -72,22 +72,18 @@ void
 rtems_bsd_program_unlock(void);
 
 #ifndef RTEMS_BSD_PROGRAM_NO_EXIT_WRAP
-  #undef exit
   #define exit(code) rtems_bsd_program_exit(code)
 #endif
 
 #ifndef RTEMS_BSD_PROGRAM_NO_ERROR_WRAP
-  #undef error
   #define error(fmt, ...) rtems_bsd_program_error(fmt, ## __VA_ARGS__)
 #endif
 
 #ifndef RTEMS_BSD_PROGRAM_NO_GETPROGNAME_WRAP
-  #undef getprogname
   #define getprogname() rtems_bsd_program_get_name()
 #endif
 
 #ifndef RTEMS_BSD_PROGRAM_NO_PRINTF_WRAP
-  #undef printf
   #define printf(...) fprintf(stdout, __VA_ARGS__)
 #endif
 
diff --git a/rtemsbsd/rtems/rtems-bsd-program.c b/rtemsbsd/rtems/rtems-bsd-program.c
index 7b5920e..18b9a62 100644
--- a/rtemsbsd/rtems/rtems-bsd-program.c
+++ b/rtemsbsd/rtems/rtems-bsd-program.c
@@ -52,6 +52,7 @@
 #include <setjmp.h>
 #include <stdlib.h>
 
+#undef printf
 #include <machine/rtems-bsd-program.h>
 
 struct rtems_bsd_program_control {
@@ -121,12 +122,12 @@ rtems_bsd_program_exit(int exit_code)
 void
 rtems_bsd_program_error(const char *fmt, ...)
 {
-  va_list list;
-  va_start(list, fmt);
-  vfprintf(stderr, fmt, list);
-  fprintf(stderr, "\n");
-  va_end(list);
-  rtems_bsd_program_exit(1);
+	va_list list;
+	va_start(list, fmt);
+	vfprintf(stderr, fmt, list);
+	fprintf(stderr, "\n");
+	va_end(list);
+	rtems_bsd_program_exit(1);
 }
 
 const char *



More information about the vc mailing list