summaryrefslogtreecommitdiff
path: root/src/string
diff options
context:
space:
mode:
Diffstat (limited to 'src/string')
-rw-r--r--src/string/bcmp.c1
-rw-r--r--src/string/bcopy.c1
-rw-r--r--src/string/bzero.c1
-rw-r--r--src/string/index.c1
-rw-r--r--src/string/memccpy.c1
-rw-r--r--src/string/memchr.c1
-rw-r--r--src/string/memmem.c1
-rw-r--r--src/string/mempcpy.c1
-rw-r--r--src/string/rindex.c1
-rw-r--r--src/string/stpcpy.c1
-rw-r--r--src/string/stpncpy.c1
-rw-r--r--src/string/strchrnul.c1
-rw-r--r--src/string/strlcpy.c2
-rw-r--r--src/string/strlen.c1
-rw-r--r--src/string/strstr.c1
-rw-r--r--src/string/strverscmp.c1
-rw-r--r--src/string/wcsstr.c3
-rw-r--r--src/string/wmemchr.c1
-rw-r--r--src/string/wmemcmp.c1
-rw-r--r--src/string/wmemcpy.c1
-rw-r--r--src/string/wmemmove.c1
-rw-r--r--src/string/wmemset.c1
22 files changed, 7 insertions, 18 deletions
diff --git a/src/string/bcmp.c b/src/string/bcmp.c
index 5d6a388b..87c6007e 100644
--- a/src/string/bcmp.c
+++ b/src/string/bcmp.c
@@ -1,3 +1,4 @@
+#define _BSD_SOURCE
#include <string.h>
#include <strings.h>
diff --git a/src/string/bcopy.c b/src/string/bcopy.c
index e76272fc..a07129f5 100644
--- a/src/string/bcopy.c
+++ b/src/string/bcopy.c
@@ -1,3 +1,4 @@
+#define _BSD_SOURCE
#include <string.h>
#include <strings.h>
diff --git a/src/string/bzero.c b/src/string/bzero.c
index 0f98b4a5..ba536b07 100644
--- a/src/string/bzero.c
+++ b/src/string/bzero.c
@@ -1,3 +1,4 @@
+#define _BSD_SOURCE
#include <string.h>
#include <strings.h>
diff --git a/src/string/index.c b/src/string/index.c
index dd611251..252948f9 100644
--- a/src/string/index.c
+++ b/src/string/index.c
@@ -1,3 +1,4 @@
+#define _BSD_SOURCE
#include <string.h>
#include <strings.h>
diff --git a/src/string/memccpy.c b/src/string/memccpy.c
index b85009c8..7c233d5e 100644
--- a/src/string/memccpy.c
+++ b/src/string/memccpy.c
@@ -1,5 +1,4 @@
#include <string.h>
-#include <stdlib.h>
#include <stdint.h>
#include <limits.h>
diff --git a/src/string/memchr.c b/src/string/memchr.c
index a0472f78..4daff7bb 100644
--- a/src/string/memchr.c
+++ b/src/string/memchr.c
@@ -1,5 +1,4 @@
#include <string.h>
-#include <stdlib.h>
#include <stdint.h>
#include <limits.h>
diff --git a/src/string/memmem.c b/src/string/memmem.c
index 861fef2f..5211d759 100644
--- a/src/string/memmem.c
+++ b/src/string/memmem.c
@@ -1,6 +1,5 @@
#define _GNU_SOURCE
#include <string.h>
-#include <stdlib.h>
#include <stdint.h>
static char *twobyte_memmem(const unsigned char *h, size_t k, const unsigned char *n)
diff --git a/src/string/mempcpy.c b/src/string/mempcpy.c
index c23ca69e..a297985e 100644
--- a/src/string/mempcpy.c
+++ b/src/string/mempcpy.c
@@ -1,3 +1,4 @@
+#define _GNU_SOURCE
#include <string.h>
void *mempcpy(void *dest, const void *src, size_t n)
diff --git a/src/string/rindex.c b/src/string/rindex.c
index 17df2bf2..693c750b 100644
--- a/src/string/rindex.c
+++ b/src/string/rindex.c
@@ -1,3 +1,4 @@
+#define _BSD_SOURCE
#include <string.h>
#include <strings.h>
diff --git a/src/string/stpcpy.c b/src/string/stpcpy.c
index feb9eb81..06623c44 100644
--- a/src/string/stpcpy.c
+++ b/src/string/stpcpy.c
@@ -1,5 +1,4 @@
#include <string.h>
-#include <stdlib.h>
#include <stdint.h>
#include <limits.h>
#include "libc.h"
diff --git a/src/string/stpncpy.c b/src/string/stpncpy.c
index 0a2c2a9d..1f57a4dd 100644
--- a/src/string/stpncpy.c
+++ b/src/string/stpncpy.c
@@ -1,5 +1,4 @@
#include <string.h>
-#include <stdlib.h>
#include <stdint.h>
#include <limits.h>
#include "libc.h"
diff --git a/src/string/strchrnul.c b/src/string/strchrnul.c
index ceae4d45..05700ad6 100644
--- a/src/string/strchrnul.c
+++ b/src/string/strchrnul.c
@@ -1,5 +1,4 @@
#include <string.h>
-#include <stdlib.h>
#include <stdint.h>
#include <limits.h>
#include "libc.h"
diff --git a/src/string/strlcpy.c b/src/string/strlcpy.c
index 4d3ff92a..193d7241 100644
--- a/src/string/strlcpy.c
+++ b/src/string/strlcpy.c
@@ -1,5 +1,5 @@
+#define _BSD_SOURCE
#include <string.h>
-#include <stdlib.h>
#include <stdint.h>
#include <limits.h>
#include "libc.h"
diff --git a/src/string/strlen.c b/src/string/strlen.c
index d6f8631d..929ddcbc 100644
--- a/src/string/strlen.c
+++ b/src/string/strlen.c
@@ -1,5 +1,4 @@
#include <string.h>
-#include <stdlib.h>
#include <stdint.h>
#include <limits.h>
diff --git a/src/string/strstr.c b/src/string/strstr.c
index 06491748..915c0a22 100644
--- a/src/string/strstr.c
+++ b/src/string/strstr.c
@@ -1,5 +1,4 @@
#include <string.h>
-#include <stdlib.h>
#include <stdint.h>
static char *twobyte_strstr(const unsigned char *h, const unsigned char *n)
diff --git a/src/string/strverscmp.c b/src/string/strverscmp.c
index 94d2e15c..6f37cc68 100644
--- a/src/string/strverscmp.c
+++ b/src/string/strverscmp.c
@@ -1,7 +1,6 @@
#define _GNU_SOURCE
#include <ctype.h>
#include <string.h>
-#include <sys/types.h>
int strverscmp(const char *l, const char *r)
{
diff --git a/src/string/wcsstr.c b/src/string/wcsstr.c
index 037d0965..3e28e287 100644
--- a/src/string/wcsstr.c
+++ b/src/string/wcsstr.c
@@ -1,7 +1,4 @@
#include <wchar.h>
-#include <string.h>
-#include <stdlib.h>
-#include <stdint.h>
#define MAX(a,b) ((a)>(b)?(a):(b))
#define MIN(a,b) ((a)<(b)?(a):(b))
diff --git a/src/string/wmemchr.c b/src/string/wmemchr.c
index 37d69629..2bc2c270 100644
--- a/src/string/wmemchr.c
+++ b/src/string/wmemchr.c
@@ -1,4 +1,3 @@
-#include <string.h>
#include <wchar.h>
wchar_t *wmemchr(const wchar_t *s, wchar_t c, size_t n)
diff --git a/src/string/wmemcmp.c b/src/string/wmemcmp.c
index 6788a383..2a193263 100644
--- a/src/string/wmemcmp.c
+++ b/src/string/wmemcmp.c
@@ -1,4 +1,3 @@
-#include <string.h>
#include <wchar.h>
int wmemcmp(const wchar_t *l, const wchar_t *r, size_t n)
diff --git a/src/string/wmemcpy.c b/src/string/wmemcpy.c
index 55a8e1d8..52e6e6e0 100644
--- a/src/string/wmemcpy.c
+++ b/src/string/wmemcpy.c
@@ -1,4 +1,3 @@
-#include <string.h>
#include <wchar.h>
wchar_t *wmemcpy(wchar_t *restrict d, const wchar_t *restrict s, size_t n)
diff --git a/src/string/wmemmove.c b/src/string/wmemmove.c
index cde4feec..e406f3d5 100644
--- a/src/string/wmemmove.c
+++ b/src/string/wmemmove.c
@@ -1,4 +1,3 @@
-#include <string.h>
#include <wchar.h>
wchar_t *wmemmove(wchar_t *d, const wchar_t *s, size_t n)
diff --git a/src/string/wmemset.c b/src/string/wmemset.c
index 1a2a8618..07a037a0 100644
--- a/src/string/wmemset.c
+++ b/src/string/wmemset.c
@@ -1,4 +1,3 @@
-#include <string.h>
#include <wchar.h>
wchar_t *wmemset(wchar_t *d, wchar_t c, size_t n)