[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[tyndur-devel] [PATCH 2/2] libc: stdio.h braucht keine string.h



! libc: Genausowenig gibt es einen vernuenftigen Grund, warum stdio.h
  die string.h nachziehe sollte.

Signed-off-by: Kevin Wolf <kevin@xxxxxxxxxx>
---
 src/modules/c/getterm/main.c       |    1 +
 src/modules/c/shell/cmds/bench.c   |    1 +
 src/modules/c/shell/cmds/dbg_st.c  |    1 +
 src/modules/c/shell/cmds/kill.c    |    1 +
 src/modules/c/shell/cmds/pipe.c    |    9 +++---
 src/modules/c/shell/cmds/sleep.c   |    1 +
 src/modules/c/shell/cmds/symlink.c |   11 ++++---
 src/modules/cdi/lib/fs/lostio_if.c |    1 +
 src/modules/file/client.c          |    1 +
 src/modules/file/server.c          |    1 +
 src/modules/include/stdio.h        |    1 -
 src/modules/init/init.c            |    1 +
 src/modules/kbc/keyboard.c         |    1 +
 src/modules/lib/gui/gui.c          |    1 +
 src/modules/lib/lostio/handler.c   |    1 +
 src/modules/lib/network.c          |    1 +
 src/modules/lib/posix/posix_dir.c  |    1 +
 src/modules/lib/posix/signal.c     |    1 +
 src/modules/lib/posix/socket.c     |    1 +
 src/modules/lib/posix/stat.c       |    1 +
 src/modules/lib/readline.c         |    1 +
 src/modules/lib/stdlibc/exit.c     |    1 +
 src/modules/lib/stdlibc/fprintf.c  |    3 +-
 src/modules/lib/stdlibc/printf.c   |    8 +++--
 src/modules/lib/stdlibc/time.c     |    1 +
 src/modules/lib/video/video.c      |    1 +
 src/modules/pci/pci.c              |    1 +
 src/modules/rpcbench/rpcbench.c    |   48 +++++++++++++++++++++++++++++++----
 src/modules/servmgr/servio.c       |    1 +
 src/modules/tcpip/checksum.c       |   13 +++++----
 src/modules/tcpip/ip.c             |    1 +
 src/modules/tcpip/main.c           |    1 +
 src/modules/tcpip/tcp.c            |    1 +
 src/modules/testlib/test_printf.c  |    1 +
 src/modules/testlib/test_tree.c    |    1 +
 src/modules/vterm/lostio.c         |    1 +
 src/modules/vterm/vt100.c          |    1 +
 37 files changed, 97 insertions(+), 26 deletions(-)

diff --git a/src/modules/c/getterm/main.c b/src/modules/c/getterm/main.c
index e8de4af..4218f30 100644
--- a/src/modules/c/getterm/main.c
+++ b/src/modules/c/getterm/main.c
@@ -38,6 +38,7 @@
 #include <stdlib.h>
 #include <stdint.h>
 #include <sleep.h>
+#include <string.h>
 #include <sys/wait.h>
 #include <init.h>
 
diff --git a/src/modules/c/shell/cmds/bench.c b/src/modules/c/shell/cmds/bench.c
index 0752dbc..6f134ed 100644
--- a/src/modules/c/shell/cmds/bench.c
+++ b/src/modules/c/shell/cmds/bench.c
@@ -37,6 +37,7 @@
 #include <lost/config.h>
 #include <stdlib.h>
 #include <stdio.h>
+#include <string.h>
 
 #define MAX_BLOCK_SIZE 524288
 
diff --git a/src/modules/c/shell/cmds/dbg_st.c b/src/modules/c/shell/cmds/dbg_st.c
index 53e2246..d5ea7ba 100644
--- a/src/modules/c/shell/cmds/dbg_st.c
+++ b/src/modules/c/shell/cmds/dbg_st.c
@@ -40,6 +40,7 @@
 #include <io.h>
 #include <lost/config.h>
 #include <syscall.h>
+#include <string.h>
 
 void dbg_st_display_usage(void);
 
diff --git a/src/modules/c/shell/cmds/kill.c b/src/modules/c/shell/cmds/kill.c
index 97e5258..48f60d8 100644
--- a/src/modules/c/shell/cmds/kill.c
+++ b/src/modules/c/shell/cmds/kill.c
@@ -35,6 +35,7 @@
 
 #include <stdlib.h>
 #include <stdio.h>
+#include <string.h>
 #include <lost/config.h>
 
 #include <errno.h>
diff --git a/src/modules/c/shell/cmds/pipe.c b/src/modules/c/shell/cmds/pipe.c
index 4c1162a..698cbf0 100644
--- a/src/modules/c/shell/cmds/pipe.c
+++ b/src/modules/c/shell/cmds/pipe.c
@@ -33,10 +33,11 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include "types.h"
-#include "stdlib.h"
-#include "stdio.h"
-#include "unistd.h"
+#include <types.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <string.h>
 #include <lost/config.h>
 
 void pipe_display_usage(void);
diff --git a/src/modules/c/shell/cmds/sleep.c b/src/modules/c/shell/cmds/sleep.c
index 7b88141..04087d4 100644
--- a/src/modules/c/shell/cmds/sleep.c
+++ b/src/modules/c/shell/cmds/sleep.c
@@ -36,6 +36,7 @@
 #include <types.h>
 #include <stdlib.h>
 #include <stdio.h>
+#include <string.h>
 #include <lost/config.h>
 #include <unistd.h>
 
diff --git a/src/modules/c/shell/cmds/symlink.c b/src/modules/c/shell/cmds/symlink.c
index 01e40a6..c1dcc43 100644
--- a/src/modules/c/shell/cmds/symlink.c
+++ b/src/modules/c/shell/cmds/symlink.c
@@ -33,11 +33,12 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include "types.h"
-#include "stdlib.h"
-#include "stdio.h"
-#include "unistd.h"
-#include "io.h"
+#include <types.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+#include <io.h>
 #include <lost/config.h>
 
 void symlink_display_usage(void);
diff --git a/src/modules/cdi/lib/fs/lostio_if.c b/src/modules/cdi/lib/fs/lostio_if.c
index 36e3a11..f12881c 100644
--- a/src/modules/cdi/lib/fs/lostio_if.c
+++ b/src/modules/cdi/lib/fs/lostio_if.c
@@ -36,6 +36,7 @@
 #include <lostio.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 #include <syscall.h>
 
 #include "cdi/fs.h"
diff --git a/src/modules/file/client.c b/src/modules/file/client.c
index 26569b4..f15e416 100644
--- a/src/modules/file/client.c
+++ b/src/modules/file/client.c
@@ -35,6 +35,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 #include <syscall.h>
 #include <rpc.h>
 
diff --git a/src/modules/file/server.c b/src/modules/file/server.c
index 1531c0b..2b1e728 100644
--- a/src/modules/file/server.c
+++ b/src/modules/file/server.c
@@ -35,6 +35,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 #include <syscall.h>
 #include <rpc.h>
 #include <init.h>
diff --git a/src/modules/include/stdio.h b/src/modules/include/stdio.h
index ca29d26..b3375f2 100644
--- a/src/modules/include/stdio.h
+++ b/src/modules/include/stdio.h
@@ -29,7 +29,6 @@
 #ifndef _STDIO_H_
 #define _STDIO_H_
 
-#include <string.h>
 #include <stdarg.h>
 #include <lost/config.h>
 #include <io_struct.h>
diff --git a/src/modules/init/init.c b/src/modules/init/init.c
index 03d6b98..8a7c30d 100644
--- a/src/modules/init/init.c
+++ b/src/modules/init/init.c
@@ -40,6 +40,7 @@
 #include "collections.h"
 #include "stdlib.h"
 #include "stdio.h"
+#include <string.h>
 #include "elf32.h"
 #include "elf_common.h"
 #include "io.h"
diff --git a/src/modules/kbc/keyboard.c b/src/modules/kbc/keyboard.c
index 62eb658..2303228 100644
--- a/src/modules/kbc/keyboard.c
+++ b/src/modules/kbc/keyboard.c
@@ -36,6 +36,7 @@
 #include <rpc.h>
 #include <stdlib.h>
 #include <stdio.h>
+#include <string.h>
 #include <lostio.h>
 #include <ports.h>
 #include <collections.h>
diff --git a/src/modules/lib/gui/gui.c b/src/modules/lib/gui/gui.c
index 875454e..7ff6f15 100644
--- a/src/modules/lib/gui/gui.c
+++ b/src/modules/lib/gui/gui.c
@@ -38,6 +38,7 @@
 #include "init.h"
 #include "stdlib.h"
 #include <syscall.h>
+#include <string.h>
 
 FILE *gui_control = 0;
 int gui_command_data[10];
diff --git a/src/modules/lib/lostio/handler.c b/src/modules/lib/lostio/handler.c
index 2f067d7..7f27df9 100644
--- a/src/modules/lib/lostio/handler.c
+++ b/src/modules/lib/lostio/handler.c
@@ -38,6 +38,7 @@
 #include "io.h"
 #include "stdio.h"
 #include "stdlib.h"
+#include <string.h>
 
 
 ///Handler zum oeffnen einer Datei
diff --git a/src/modules/lib/network.c b/src/modules/lib/network.c
index ac32ef4..ec1bee3 100644
--- a/src/modules/lib/network.c
+++ b/src/modules/lib/network.c
@@ -29,6 +29,7 @@
 #include <network.h>
 #include <syscall.h>
 #include <stdlib.h>
+#include <string.h>
 #include <init.h>
 #include <rpc.h>
 
diff --git a/src/modules/lib/posix/posix_dir.c b/src/modules/lib/posix/posix_dir.c
index 5a3f912..5e2cc8e 100644
--- a/src/modules/lib/posix/posix_dir.c
+++ b/src/modules/lib/posix/posix_dir.c
@@ -30,6 +30,7 @@
 #include "dirent.h"
 #include "stdlib.h"
 #include "dir.h"
+#include <string.h>
 
 /**
  * Öffnet ein Verzeichnis zum Auslesen der Verzeichniseinträge
diff --git a/src/modules/lib/posix/signal.c b/src/modules/lib/posix/signal.c
index ef95739..3f2ad0d 100644
--- a/src/modules/lib/posix/signal.c
+++ b/src/modules/lib/posix/signal.c
@@ -35,6 +35,7 @@
 #include <unistd.h>
 #include <errno.h>
 #include <sleep.h>
+#include <string.h>
 
 /// Array mit Pointern auf die Signal-Handler
 static struct sigaction sigactions[_SIGNO_MAX];
diff --git a/src/modules/lib/posix/socket.c b/src/modules/lib/posix/socket.c
index 0616c2b..462c41c 100644
--- a/src/modules/lib/posix/socket.c
+++ b/src/modules/lib/posix/socket.c
@@ -33,6 +33,7 @@
 
 #include <stdlib.h>
 #include <stdio.h>
+#include <string.h>
 #include <errno.h>
 
 #include <network.h>
diff --git a/src/modules/lib/posix/stat.c b/src/modules/lib/posix/stat.c
index 9033c76..6a22fe4 100644
--- a/src/modules/lib/posix/stat.c
+++ b/src/modules/lib/posix/stat.c
@@ -28,6 +28,7 @@
 
 #include <sys/stat.h>
 #include <stdio.h>
+#include <string.h>
 #include <dir.h>
 #include <errno.h>
 
diff --git a/src/modules/lib/readline.c b/src/modules/lib/readline.c
index 3f3c401..30d7115 100644
--- a/src/modules/lib/readline.c
+++ b/src/modules/lib/readline.c
@@ -30,6 +30,7 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <stdint.h>
+#include <string.h>
 #include <collections.h>
 #include <wchar.h>
 #include <wctype.h>
diff --git a/src/modules/lib/stdlibc/exit.c b/src/modules/lib/stdlibc/exit.c
index cb1a42b..b5a5396 100644
--- a/src/modules/lib/stdlibc/exit.c
+++ b/src/modules/lib/stdlibc/exit.c
@@ -29,6 +29,7 @@
 #include <syscall.h>
 #include <stdlib.h>
 #include <stdint.h>
+#include <string.h>
 #include <unistd.h>
 #include <collections.h>
 #include <errno.h>
diff --git a/src/modules/lib/stdlibc/fprintf.c b/src/modules/lib/stdlibc/fprintf.c
index add857f..85218e0 100644
--- a/src/modules/lib/stdlibc/fprintf.c
+++ b/src/modules/lib/stdlibc/fprintf.c
@@ -26,7 +26,8 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include "stdio.h"
+#include <stdio.h>
+#include <string.h>
 
 #include "jprintf.h"
 
diff --git a/src/modules/lib/stdlibc/printf.c b/src/modules/lib/stdlibc/printf.c
index d454d9f..ec36e7f 100644
--- a/src/modules/lib/stdlibc/printf.c
+++ b/src/modules/lib/stdlibc/printf.c
@@ -26,9 +26,11 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include "jprintf.h"
-#include "stdio.h"
-
+#include <stdio.h>
+#include <string.h>
+
+#include "jprintf.h"
+
 extern int putsn(unsigned int, const char* str);
 
 int printf_putc(void * arg, char c)
diff --git a/src/modules/lib/stdlibc/time.c b/src/modules/lib/stdlibc/time.c
index 509ec05..b05933b 100644
--- a/src/modules/lib/stdlibc/time.c
+++ b/src/modules/lib/stdlibc/time.c
@@ -28,6 +28,7 @@
 
 #include <time.h>
 #include <stdio.h>
+#include <string.h>
 #include <lost/config.h>
 
 static struct tm tm;
diff --git a/src/modules/lib/video/video.c b/src/modules/lib/video/video.c
index a7689a0..0643dd8 100644
--- a/src/modules/lib/video/video.c
+++ b/src/modules/lib/video/video.c
@@ -34,6 +34,7 @@
 #include "stdlib.h"
 #include "rpc.h"
 #include <syscall.h>
+#include <string.h>
 #include "init.h"
 
 FILE *video_driver_control = 0;
diff --git a/src/modules/pci/pci.c b/src/modules/pci/pci.c
index 07c5026..75227fe 100644
--- a/src/modules/pci/pci.c
+++ b/src/modules/pci/pci.c
@@ -35,6 +35,7 @@
 
 #include <init.h>
 #include <syscall.h>
+#include <string.h>
 #include "stdio.h"
 #include "types.h"
 #include "ports.h"
diff --git a/src/modules/rpcbench/rpcbench.c b/src/modules/rpcbench/rpcbench.c
index f5a81c1..4251cc9 100644
--- a/src/modules/rpcbench/rpcbench.c
+++ b/src/modules/rpcbench/rpcbench.c
@@ -1,9 +1,45 @@
-#include "types.h"
-#include "syscall.h"
-#include "rpc.h"
-#include "stdlib.h"
-#include "stdio.h"
-#include "init.h"
+/*
+ * Copyright (c) 2007 The tyndur Project. All rights reserved.
+ *
+ * This code is derived from software contributed to the tyndur Project
+ * by Antoine Kaufmann.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *     This product includes software developed by the tyndur Project
+ *     and its contributors.
+ * 4. Neither the name of the tyndur Project nor the names of its
+ *    contributors may be used to endorse or promote products derived
+ *    from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+
+#include <syscall.h>
+#include <rpc.h>
+#include <init.h>
 
 #define BLOCK_SIZE 512
 
diff --git a/src/modules/servmgr/servio.c b/src/modules/servmgr/servio.c
index 55a3c8c..27156ec 100644
--- a/src/modules/servmgr/servio.c
+++ b/src/modules/servmgr/servio.c
@@ -35,6 +35,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 #include <rpc.h>
 #include <syscall.h>
 
diff --git a/src/modules/tcpip/checksum.c b/src/modules/tcpip/checksum.c
index 248cbdc..ded743c 100644
--- a/src/modules/tcpip/checksum.c
+++ b/src/modules/tcpip/checksum.c
@@ -33,13 +33,14 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include "types.h"
-#include "syscall.h"
-#include "rpc.h"
-#include "stdlib.h"
-#include "stdio.h"
+#include <types.h>
+#include <syscall.h>
+#include <rpc.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <network.h>
 
-#include "network.h"
 #include "ip.h"
 #include "tcp.h"
 
diff --git a/src/modules/tcpip/ip.c b/src/modules/tcpip/ip.c
index 8a1b975..cad9da9 100644
--- a/src/modules/tcpip/ip.c
+++ b/src/modules/tcpip/ip.c
@@ -38,6 +38,7 @@
 #include "rpc.h"
 #include "stdlib.h"
 #include "stdio.h"
+#include <string.h>
 #include "collections.h"
 
 #include "network.h"
diff --git a/src/modules/tcpip/main.c b/src/modules/tcpip/main.c
index 1a99014..d553bb5 100644
--- a/src/modules/tcpip/main.c
+++ b/src/modules/tcpip/main.c
@@ -34,6 +34,7 @@
  */
 
 #include <init.h>
+#include <string.h>
 #include "types.h"
 #include "syscall.h"
 #include "rpc.h"
diff --git a/src/modules/tcpip/tcp.c b/src/modules/tcpip/tcp.c
index 79febba..b8a7f0f 100644
--- a/src/modules/tcpip/tcp.c
+++ b/src/modules/tcpip/tcp.c
@@ -41,6 +41,7 @@
 #include "collections.h"
 #include "network.h"
 #include <errno.h>
+#include <string.h>
 
 #include "ip.h"
 #include "tcp.h"
diff --git a/src/modules/testlib/test_printf.c b/src/modules/testlib/test_printf.c
index 6d3ddfd..b7b4815 100644
--- a/src/modules/testlib/test_printf.c
+++ b/src/modules/testlib/test_printf.c
@@ -1,4 +1,5 @@
 #include "stdio.h"
+#include <string.h>
 
 // toter code. tests.c entsprechend modifizieren.
 void test_printf(void)
diff --git a/src/modules/testlib/test_tree.c b/src/modules/testlib/test_tree.c
index 085c3cc..9367704 100644
--- a/src/modules/testlib/test_tree.c
+++ b/src/modules/testlib/test_tree.c
@@ -3,6 +3,7 @@
 #include "test.h"
 #include "collections.h"
 #include <stdlib.h>
+#include <string.h>
 
 struct tree {
     struct tree_item titem;
diff --git a/src/modules/vterm/lostio.c b/src/modules/vterm/lostio.c
index 428d339..a835d6a 100644
--- a/src/modules/vterm/lostio.c
+++ b/src/modules/vterm/lostio.c
@@ -34,6 +34,7 @@
  */
 #include <stdlib.h>
 #include <syscall.h>
+#include <string.h>
 #include "vterm.h"
 #include "lostio.h"
 /// Handler fuer Lesen aus in
diff --git a/src/modules/vterm/vt100.c b/src/modules/vterm/vt100.c
index 78644a1..e1176a4 100644
--- a/src/modules/vterm/vt100.c
+++ b/src/modules/vterm/vt100.c
@@ -37,6 +37,7 @@
 #include <syscall.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 #include <rpc.h>
 #include <lostio.h>
 #include "vterm.h"
-- 
1.6.0.2