OSDN Git Service

dl-string.h: include dl-defs.h instead of dl-sysdep.h
authorPeter S. Mazinger <ps.m@gmx.net>
Sat, 26 Mar 2011 20:43:16 +0000 (21:43 +0100)
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Fri, 15 Jun 2012 12:00:34 +0000 (14:00 +0200)
Include stddef.h instead of defining NULL
Adapt guard to file name.
Reorder includes a bit.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
ldso/include/dl-string.h

index c01881c..aacad10 100644 (file)
@@ -5,12 +5,16 @@
  * GNU Lesser General Public License version 2.1 or later.
  */
 
-#ifndef _LINUX_STRING_H_
-#define _LINUX_STRING_H_
+#ifndef _DL_STRING_H
+#define _DL_STRING_H
 
-#include <dl-sysdep.h> /* for do_rem */
 #include <features.h>
 
+#define __need_NULL
+#include <stddef.h>
+
+#include <dl-defs.h> /* for do_rem by dl-sysdep.h */
+
 /* provide some sane defaults */
 #ifndef do_rem
 # define do_rem(result, n, base) ((result) = (n) % (base))
 # define do_div_10(result, remain) ((result) /= 10)
 #endif
 
-#ifndef NULL
-#define NULL ((void *) 0)
-#endif
-
 #ifdef IS_IN_rtld
 static __always_inline size_t _dl_strlen(const char *str)
 {
@@ -345,4 +345,4 @@ static __always_inline char * _dl_simple_ltoahex(char *local, unsigned long i)
 
 #endif /* IS_IN_rtld */
 
-#endif
+#endif /* _DL_STRING_H */