commit ec9e043ec5301497d5dfb5323316204ee6a73a4c
parent 4d9f0c75b9c7828f3e8317a86deebd5debd174ff
Author: Roberto E. Vargas Caballero <roberto@clue.aero>
Date: Wed, 29 Apr 2020 12:07:17 +0200
Merge remote-tracking branch 'origin/master' into HEAD
Diffstat:
4 files changed, 16 insertions(+), 15 deletions(-)
diff --git a/include/iso646.h b/include/iso646.h
@@ -0,0 +1,16 @@
+#ifndef _ISO646_H
+#define _ISO646_H
+
+#define and &&
+#define and_eq &=
+#define bitand &
+#define bitor |
+#define compl ~
+#define not !
+#define not_eq !=
+#define or ||
+#define or_eq |=
+#define xor ^
+#define xor_eq ^=
+
+#endif
diff --git a/include/string.h b/include/string.h
@@ -29,6 +29,5 @@ extern char *strtok(char * restrict s1, const char * restrict s2);
extern void *memset(void *s, int c, size_t n);
extern char *strerror(int errnum);
extern size_t strlen(const char *s);
-extern size_t strnlen(const char *s, size_t maxlen);
#endif
diff --git a/src/libc/string/Makefile b/src/libc/string/Makefile
@@ -15,7 +15,6 @@ OBJS = \
strncat.$O\
strncmp.$O\
strncpy.$O\
- strnlen.$O\
strpbrk.$O\
strrchr.$O\
strspn.$O\
diff --git a/src/libc/string/strnlen.c b/src/libc/string/strnlen.c
@@ -1,13 +0,0 @@
-#include <string.h>
-
-#undef strnlen
-
-size_t
-strnlen(const char *s, size_t maxlen)
-{
- size_t n;
-
- for (n = 0; n < maxlen && *s++; ++n)
- ;
- return n;
-}