Source-Changes-HG archive

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

[src/trunk]: src/sys/lib/libkern Slightly reorder for clarity, and add header.



details:   https://anonhg.NetBSD.org/src/rev/f1d3fcd0a611
branches:  trunk
changeset: 1009235:f1d3fcd0a611
user:      maxv <maxv%NetBSD.org@localhost>
date:      Fri Apr 17 17:24:46 2020 +0000

description:
Slightly reorder for clarity, and add header.

diffstat:

 sys/lib/libkern/libkern.h |  15 ++++++---------
 1 files changed, 6 insertions(+), 9 deletions(-)

diffs (70 lines):

diff -r cf76b3b7f5ae -r f1d3fcd0a611 sys/lib/libkern/libkern.h
--- a/sys/lib/libkern/libkern.h Fri Apr 17 15:22:34 2020 +0000
+++ b/sys/lib/libkern/libkern.h Fri Apr 17 17:24:46 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: libkern.h,v 1.139 2020/04/07 08:07:58 skrll Exp $      */
+/*     $NetBSD: libkern.h,v 1.140 2020/04/17 17:24:46 maxv Exp $       */
 
 /*-
  * Copyright (c) 1992, 1993
@@ -38,6 +38,7 @@
 #include "opt_diagnostic.h"
 #include "opt_kasan.h"
 #include "opt_kcsan.h"
+#include "opt_kmsan.h"
 #endif
 
 #include <sys/types.h>
@@ -360,7 +361,6 @@
 void   *memcpy(void *, const void *, size_t);
 int     memcmp(const void *, const void *, size_t);
 void   *memset(void *, int, size_t);
-void   *memmem(const void *, size_t, const void *, size_t);
 #if __GNUC_PREREQ__(2, 95) && !defined(_STANDALONE)
 #if defined(_KERNEL) && defined(KASAN)
 void   *kasan_memcpy(void *, const void *, size_t);
@@ -389,12 +389,11 @@
 #define        memset(d, v, l)         __builtin_memset(d, v, l)
 #endif
 #endif
+void   *memmem(const void *, size_t, const void *, size_t);
 
 char   *strcpy(char *, const char *);
 int     strcmp(const char *, const char *);
 size_t  strlen(const char *);
-size_t  strnlen(const char *, size_t);
-char   *strsep(char **, const char *);
 #if __GNUC_PREREQ__(2, 95) && !defined(_STANDALONE)
 #if defined(_KERNEL) && defined(KASAN)
 char   *kasan_strcpy(char *, const char *);
@@ -423,16 +422,18 @@
 #define        strlen(a)               __builtin_strlen(a)
 #endif
 #endif
+size_t  strnlen(const char *, size_t);
+char   *strsep(char **, const char *);
 
 /* Functions for which we always use built-ins. */
 #ifdef __GNUC__
 #define        alloca(s)               __builtin_alloca(s)
 #endif
 
+/* These exist in GCC 3.x, but we don't bother. */
 char   *strcat(char *, const char *);
 char   *strchr(const char *, int);
 char   *strrchr(const char *, int);
-/* These exist in GCC 3.x, but we don't bother. */
 #if defined(_KERNEL) && defined(KASAN)
 char   *kasan_strcat(char *, const char *);
 char   *kasan_strchr(const char *, int);
@@ -447,10 +448,6 @@
 #define        strcat(d, s)            kmsan_strcat(d, s)
 #define        strchr(s, c)            kmsan_strchr(s, c)
 #define        strrchr(s, c)           kmsan_strrchr(s, c)
-#else
-char   *strcat(char *, const char *);
-char   *strchr(const char *, int);
-char   *strrchr(const char *, int);
 #endif
 size_t  strcspn(const char *, const char *);
 char   *strncpy(char *, const char *, size_t);



Home | Main Index | Thread Index | Old Index