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

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



! libc: Es gibt keinen Grund, warum stdlib.h ausgerechnet string.h
  includen sollte.

Signed-off-by: Kevin Wolf <kevin@xxxxxxxxxx>
---
 src/include/stdlib.h           |    1 -
 src/kernel/src/io.c            |    4 +++-
 src/kernel/src/task.c          |    5 +++--
 src/lib/collections/tree.c     |    1 +
 src/lib/sort.c                 |    3 ++-
 src/lib/string/multibyte.c     |    1 +
 src/modules/lib/video/bitmap.c |    5 +++--
 7 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/src/include/stdlib.h b/src/include/stdlib.h
index 3abf331..f5f446e 100644
--- a/src/include/stdlib.h
+++ b/src/include/stdlib.h
@@ -30,7 +30,6 @@
 #define _STDLIB_H_
 
 #include <stddef.h>
-#include "string.h"
 #include <lost/config.h>
 
 #define EXIT_SUCCESS 0
diff --git a/src/kernel/src/io.c b/src/kernel/src/io.c
index e655491..c46bfef 100644
--- a/src/kernel/src/io.c
+++ b/src/kernel/src/io.c
@@ -33,10 +33,12 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */  
 
+#include <stdlib.h>
+#include <string.h>
+
 #include "types.h"
 #include "tasks.h"
 #include "tss.h"
-#include "stdlib.h"
 #include "kernel.h"
 
 /* Gesetztes Bit: Port wird benutzt */
diff --git a/src/kernel/src/task.c b/src/kernel/src/task.c
index a86abab..fce02cd 100644
--- a/src/kernel/src/task.c
+++ b/src/kernel/src/task.c
@@ -33,8 +33,9 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */  
 
-#include "types.h"
-#include "stdlib.h"
+#include <types.h>
+#include <stdlib.h>
+#include <string.h>
 
 #include "vmm.h"
 #include "kmm.h"
diff --git a/src/lib/collections/tree.c b/src/lib/collections/tree.c
index d565fa8..6bb3c63 100644
--- a/src/lib/collections/tree.c
+++ b/src/lib/collections/tree.c
@@ -28,6 +28,7 @@
 
 #include <collections.h>
 #include <stdlib.h>
+#include <string.h>
 
 #ifdef DEBUG_TREE
 #include <stdio.h>
diff --git a/src/lib/sort.c b/src/lib/sort.c
index f882ac9..bb813c4 100644
--- a/src/lib/sort.c
+++ b/src/lib/sort.c
@@ -26,7 +26,8 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include "stdlib.h"
+#include <stdlib.h>
+#include <string.h>
 
 void qsort(void *base, size_t num, size_t size, int (*comparator)(const void *, const void *))
 {
diff --git a/src/lib/string/multibyte.c b/src/lib/string/multibyte.c
index a791d5f..ef00f7f 100644
--- a/src/lib/string/multibyte.c
+++ b/src/lib/string/multibyte.c
@@ -27,6 +27,7 @@
  */
 
 #include <stdlib.h>
+#include <string.h>
 
 
 /**
diff --git a/src/modules/lib/video/bitmap.c b/src/modules/lib/video/bitmap.c
index 676858e..1471b9c 100644
--- a/src/modules/lib/video/bitmap.c
+++ b/src/modules/lib/video/bitmap.c
@@ -26,11 +26,12 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include <stdlib.h>
+#include <string.h>
+
 #include "video/bitmap.h"
 #include "video/color.h"
 
-#include "stdlib.h"
-
 void copy_shifted(byte *dest, byte *src, byte shift, dword length)
 {
     //TODO: Kann weiter optimiert werden (größere Datentypen)
-- 
1.6.0.2