From ede1a4182df68b1191b8ef2031f7a1f14813b525 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 21 Jun 2016 13:12:31 +0200 Subject: Make rtems/print.h independent of rtems/bspIo.h --- c/src/lib/libbsp/shared/src/irq-default-handler.c | 2 +- c/src/libchip/rtc/ds1375.c | 1 + cpukit/include/rtems/bspIo.h | 12 ------------ cpukit/include/rtems/print.h | 21 ++++++++++++++++----- cpukit/libcsupport/src/printk_plugin.c | 1 + cpukit/libdrvmgr/drvmgr_translate_check.c | 2 ++ cpukit/libfs/src/devfs/devfs_show.c | 2 ++ cpukit/libfs/src/jffs2/include/linux/kernel-rtems.h | 2 +- cpukit/libmisc/mouse/mouse_parser.c | 1 + cpukit/libmisc/mouse/serial_mouse.c | 1 + testsuites/libtests/block08/bdbuf_tests.h | 1 + testsuites/samples/cdtest/main.cc | 1 + testsuites/sptests/spprintk/init.c | 1 - testsuites/support/include/buffer_test_io.h | 1 + 14 files changed, 29 insertions(+), 20 deletions(-) diff --git a/c/src/lib/libbsp/shared/src/irq-default-handler.c b/c/src/lib/libbsp/shared/src/irq-default-handler.c index f1d1e38b0a..4f4b4be673 100644 --- a/c/src/lib/libbsp/shared/src/irq-default-handler.c +++ b/c/src/lib/libbsp/shared/src/irq-default-handler.c @@ -14,7 +14,7 @@ #include -#include +#include #include diff --git a/c/src/libchip/rtc/ds1375.c b/c/src/libchip/rtc/ds1375.c index f7e58f24a7..4a23a0044b 100644 --- a/c/src/libchip/rtc/ds1375.c +++ b/c/src/libchip/rtc/ds1375.c @@ -51,6 +51,7 @@ #include /* write, read, close */ #include +#include #include #include #include diff --git a/cpukit/include/rtems/bspIo.h b/cpukit/include/rtems/bspIo.h index 4b5b2a2bf7..d0d8f83dcd 100644 --- a/cpukit/include/rtems/bspIo.h +++ b/cpukit/include/rtems/bspIo.h @@ -122,18 +122,6 @@ extern int putk(const char *s); */ extern void rtems_putc(char c); -/** - * Type definition for function which can be plugged in to - * certain reporting routines to redirect the output. - * - * Use the RTEMS Print interface to call these functions. Do not - * directly use them. - * - * If the user provides their own "printf plugin", then they may - * redirect those reports as they see fit. - */ -typedef int (*rtems_print_plugin_t)(void *, const char *format, va_list ap); - /**@}*/ #ifdef __cplusplus diff --git a/cpukit/include/rtems/print.h b/cpukit/include/rtems/print.h index c4dacceccf..07e50d0948 100644 --- a/cpukit/include/rtems/print.h +++ b/cpukit/include/rtems/print.h @@ -18,11 +18,10 @@ #ifndef _RTEMS_PRINT_H #define _RTEMS_PRINT_H -#include -#include -#include +#include -#include +#include +#include #ifdef __cplusplus extern "C" { @@ -35,13 +34,25 @@ extern "C" { * with an interface to the kernel level print support. */ +/** + * Type definition for function which can be plugged in to certain reporting + * routines to redirect the output. + * + * Use the RTEMS Print interface to call these functions. Do not directly use + * them. + * + * If the user provides their own printer, then they may redirect those reports + * as they see fit. + */ +typedef int (*rtems_print_printer)(void *, const char *format, va_list ap); + /** * Type definition for the printer structure used to access the kernel print * support. */ typedef struct rtems_printer { void *context; - rtems_print_plugin_t printer; + rtems_print_printer printer; } rtems_printer; /** diff --git a/cpukit/libcsupport/src/printk_plugin.c b/cpukit/libcsupport/src/printk_plugin.c index 485346d2f6..38214f8018 100644 --- a/cpukit/libcsupport/src/printk_plugin.c +++ b/cpukit/libcsupport/src/printk_plugin.c @@ -19,6 +19,7 @@ #endif #include +#include static int printk_plugin( void *ignored, diff --git a/cpukit/libdrvmgr/drvmgr_translate_check.c b/cpukit/libdrvmgr/drvmgr_translate_check.c index e5f0b7aa30..5ee0930402 100644 --- a/cpukit/libdrvmgr/drvmgr_translate_check.c +++ b/cpukit/libdrvmgr/drvmgr_translate_check.c @@ -9,6 +9,8 @@ #include +#include + /* Calls drvmgr_translate() to translate an address range and check the result, * a printout is generated if the check fails. See paramters of * drvmgr_translate(). diff --git a/cpukit/libfs/src/devfs/devfs_show.c b/cpukit/libfs/src/devfs/devfs_show.c index b5984bde4c..0ea130686a 100644 --- a/cpukit/libfs/src/devfs/devfs_show.c +++ b/cpukit/libfs/src/devfs/devfs_show.c @@ -17,6 +17,8 @@ #include "devfs.h" +#include + void devFS_Show(void) { rtems_filesystem_location_info_t *rootloc = &rtems_filesystem_root->location; diff --git a/cpukit/libfs/src/jffs2/include/linux/kernel-rtems.h b/cpukit/libfs/src/jffs2/include/linux/kernel-rtems.h index 08520342f5..0550446915 100644 --- a/cpukit/libfs/src/jffs2/include/linux/kernel-rtems.h +++ b/cpukit/libfs/src/jffs2/include/linux/kernel-rtems.h @@ -18,7 +18,7 @@ #define __LINUX_RTEMS_IMPL_H__ #include -#include +#include static inline char *do_kmemdup(const char *s, size_t n) { diff --git a/cpukit/libmisc/mouse/mouse_parser.c b/cpukit/libmisc/mouse/mouse_parser.c index 2831f64b95..573e6cf5fd 100644 --- a/cpukit/libmisc/mouse/mouse_parser.c +++ b/cpukit/libmisc/mouse/mouse_parser.c @@ -40,6 +40,7 @@ #include #include +#include #include #include diff --git a/cpukit/libmisc/mouse/serial_mouse.c b/cpukit/libmisc/mouse/serial_mouse.c index eb993b419e..874903a607 100644 --- a/cpukit/libmisc/mouse/serial_mouse.c +++ b/cpukit/libmisc/mouse/serial_mouse.c @@ -20,6 +20,7 @@ #include #include +#include #include #include #include diff --git a/testsuites/libtests/block08/bdbuf_tests.h b/testsuites/libtests/block08/bdbuf_tests.h index 1a0703ffc9..b5d59673d1 100644 --- a/testsuites/libtests/block08/bdbuf_tests.h +++ b/testsuites/libtests/block08/bdbuf_tests.h @@ -16,6 +16,7 @@ #include #include #include +#include #include #include diff --git a/testsuites/samples/cdtest/main.cc b/testsuites/samples/cdtest/main.cc index 4274f65721..8aea62f495 100644 --- a/testsuites/samples/cdtest/main.cc +++ b/testsuites/samples/cdtest/main.cc @@ -23,6 +23,7 @@ */ #include +#include #include #include diff --git a/testsuites/sptests/spprintk/init.c b/testsuites/sptests/spprintk/init.c index 55e132d526..0f5c2a7e24 100644 --- a/testsuites/sptests/spprintk/init.c +++ b/testsuites/sptests/spprintk/init.c @@ -24,7 +24,6 @@ #define TESTS_USE_PRINTK #include -#include const char rtems_test_name[] = "SPPRINTK"; diff --git a/testsuites/support/include/buffer_test_io.h b/testsuites/support/include/buffer_test_io.h index 0ae3909d4d..ac73352768 100644 --- a/testsuites/support/include/buffer_test_io.h +++ b/testsuites/support/include/buffer_test_io.h @@ -5,6 +5,7 @@ #ifndef __BUFFER_TEST_IO_h #define __BUFFER_TEST_IO_h +#include #include #ifdef __cplusplus -- cgit v1.2.3