Module: xenomai-forge
Branch: next
Commit: 568da95deb5af5dd5618ea413d14922dfdbd767d
URL:    
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=568da95deb5af5dd5618ea413d14922dfdbd767d

Author: Philippe Gerum <r...@xenomai.org>
Date:   Sun Jul  7 18:05:30 2013 +0200

include/cobalt: merge rtdk.h into stdio.h

---

 include/Makefile.am         |    1 -
 include/Makefile.in         |   14 +++----
 include/cobalt/stdio.h      |   46 +++++++++++++++++++++++-
 include/rtdk.h              |   84 -------------------------------------------
 lib/cobalt/assert_context.c |    2 +-
 lib/cobalt/init.c           |    1 -
 lib/cobalt/printf.c         |    1 -
 7 files changed, 52 insertions(+), 97 deletions(-)

diff --git a/include/Makefile.am b/include/Makefile.am
index da58ec0..9eb5001 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -10,7 +10,6 @@ SUBDIRS =             \
        vxworks
 
 if XENO_COBALT
-include_HEADERS += rtdk.h
 SUBDIRS +=             \
        analogy         \
        cobalt          \
diff --git a/include/Makefile.in b/include/Makefile.in
index 1cc2419..76e549a 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -51,15 +51,14 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 target_triplet = @target@
-@XENO_COBALT_TRUE@am__append_1 = rtdk.h
-@XENO_COBALT_TRUE@am__append_2 = \
+@XENO_COBALT_TRUE@am__append_1 = \
 @XENO_COBALT_TRUE@     analogy         \
 @XENO_COBALT_TRUE@     cobalt          \
 @XENO_COBALT_TRUE@     rtdm
 
-@XENO_COBALT_FALSE@am__append_3 = mercury
+@XENO_COBALT_FALSE@am__append_2 = mercury
 subdir = include
-DIST_COMMON = $(am__include_HEADERS_DIST) $(srcdir)/Makefile.am \
+DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \
        $(srcdir)/Makefile.in $(srcdir)/xeno_config.h.in COPYING
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/config/ac_prog_cc_for_build.m4 \
@@ -90,7 +89,6 @@ am__can_run_installinfo = \
     n|no|NO) false;; \
     *) (install-info --version) >/dev/null 2>&1;; \
   esac
-am__include_HEADERS_DIST = version.h rtdk.h
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
 am__vpath_adj = case $$p in \
     $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@@ -321,9 +319,9 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 nodist_include_HEADERS = $(CONFIG_HEADER)
-include_HEADERS = version.h $(am__append_1)
-SUBDIRS = nocore copperplate alchemy psos vxworks $(am__append_2) \
-       $(am__append_3)
+include_HEADERS = version.h
+SUBDIRS = nocore copperplate alchemy psos vxworks $(am__append_1) \
+       $(am__append_2)
 EXTRA_DIST = testing
 all: xeno_config.h
        $(MAKE) $(AM_MAKEFLAGS) all-recursive
diff --git a/include/cobalt/stdio.h b/include/cobalt/stdio.h
index 2af2265..c806e8e 100644
--- a/include/cobalt/stdio.h
+++ b/include/cobalt/stdio.h
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2006 Gilles Chanteperdrix <gilles.chanteperd...@xenomai.org>.
+ * Copyright (C) 2007 Jan Kiszka <jan.kis...@web.de>.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -43,6 +44,12 @@ COBALT_DECL(int, __printf_chk(int flag, const char *fmt, 
...));
 
 COBALT_DECL(int, __fprintf_chk(FILE *fp, int flag, const char *fmt, ...));
 
+int __rt_vfprintf_chk(FILE *stream, int level,
+                     const char *fmt, va_list args);
+
+void __rt_vsyslog_chk(int priority, int level,
+                     const char *fmt, va_list args);
+
 #endif /* CONFIG_XENO_FORTIFY */
 
 COBALT_DECL(int, vprintf(const char *fmt, va_list args));
@@ -71,7 +78,44 @@ int __wrap_putchar(int c);
 
 #endif
 
-COBALT_DECL(size_t, fwrite(const void *ptr, size_t sz, size_t nmemb, FILE 
*stream));
+COBALT_DECL(size_t,
+           fwrite(const void *ptr, size_t sz, size_t nmemb, FILE *stream));
+
+int rt_vfprintf(FILE *stream, const char *format, va_list args);
+
+int rt_vprintf(const char *format, va_list args);
+
+int rt_fprintf(FILE *stream, const char *format, ...);
+
+int rt_printf(const char *format, ...);
+
+int rt_puts(const char *s);
+
+int rt_fputs(const char *s, FILE *stream);
+
+int rt_fputc(int c, FILE *stream);
+
+int rt_putchar(int c);
+
+size_t rt_fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream);
+
+void rt_syslog(int priority, const char *format, ...);
+
+void rt_vsyslog(int priority, const char *format, va_list args);
+
+int rt_print_init(size_t buffer_size, const char *name);
+
+void rt_print_cleanup(void);
+
+void rt_print_auto_init(int enable);
+
+const char *rt_print_buffer_name(void);
+
+void rt_print_flush_buffers(void);
+
+void assert_nrt(void);
+
+void assert_nrt_fast(void);
 
 #ifdef __cplusplus
 }
diff --git a/include/rtdk.h b/include/rtdk.h
deleted file mode 100644
index ecebbff..0000000
--- a/include/rtdk.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (C) 2007 Jan Kiszka <jan.kis...@web.de>.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
-
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.
- */
-
-#ifndef _RTUTILS_H
-#define _RTUTILS_H
-
-#ifdef __KERNEL__
-
-#define rt_printf(format, ...) printk(format __VA_ARGS__)
-
-static inline int rt_print_init(size_t buffer_size, const char *buffer_name)
-{
-       return 0;
-}
-
-#define rt_print_cleanup()     do { } while (0)
-
-static inline void rt_print_auto_init(int enable)
-{
-}
-
-static inline const char *rt_print_buffer_name(void)
-{
-       return "<unknown>";
-}
-
-#else /* !__KERNEL__ */
-
-#include <stdio.h>
-#include <stdarg.h>
-#include <xeno_config.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-int rt_vfprintf(FILE *stream, const char *format, va_list args);
-int rt_vprintf(const char *format, va_list args);
-int rt_fprintf(FILE *stream, const char *format, ...);
-int rt_printf(const char *format, ...);
-int rt_puts(const char *s);
-int rt_fputs(const char *s, FILE *stream);
-int rt_fputc(int c, FILE *stream);
-int rt_putchar(int c);
-size_t rt_fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream);
-void rt_syslog(int priority, const char *format, ...);
-void rt_vsyslog(int priority, const char *format, va_list args);
-
-int rt_print_init(size_t buffer_size, const char *name);
-void rt_print_cleanup(void);
-void rt_print_auto_init(int enable);
-const char *rt_print_buffer_name(void);
-void rt_print_flush_buffers(void);
-#ifdef CONFIG_XENO_FORTIFY
-int __rt_vfprintf_chk(FILE *stream, int level, const char *fmt, va_list args);
-void __rt_vsyslog_chk(int priority, int level, const char *fmt, va_list args);
-#endif
-
-void assert_nrt(void);
-
-void assert_nrt_fast(void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* !KERNEL */
-
-#endif /* !_RTUTILS_H */
diff --git a/lib/cobalt/assert_context.c b/lib/cobalt/assert_context.c
index f2bf7cd..66d6010 100644
--- a/lib/cobalt/assert_context.c
+++ b/lib/cobalt/assert_context.c
@@ -21,8 +21,8 @@
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
+#include <stdio.h>
 #include <errno.h>
-#include <rtdk.h>
 #include <cobalt/uapi/thread.h>
 #include <asm/xenomai/syscall.h>
 #include "current.h"
diff --git a/lib/cobalt/init.c b/lib/cobalt/init.c
index d807b13..6070555 100644
--- a/lib/cobalt/init.c
+++ b/lib/cobalt/init.c
@@ -29,7 +29,6 @@
 #include <cobalt/uapi/rtdm/syscall.h>
 #include <cobalt/ticks.h>
 #include <asm/xenomai/syscall.h>
-#include <rtdk.h>
 #include "sem_heap.h"
 #include "internal.h"
 
diff --git a/lib/cobalt/printf.c b/lib/cobalt/printf.c
index d48ec6a..6df1389 100644
--- a/lib/cobalt/printf.c
+++ b/lib/cobalt/printf.c
@@ -26,7 +26,6 @@
 #include <string.h>
 #include <unistd.h>
 #include <syslog.h>
-#include <rtdk.h>
 #include <nocore/atomic.h>
 #include "current.h"
 #include "internal.h"


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai-git

Reply via email to