diff options
author | Richard Braun <rbraun@sceen.net> | 2017-05-31 19:23:51 +0200 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2017-05-31 19:23:51 +0200 |
commit | 2f4a4c7b6f4e4836c7528f1d0ae2b35d06dd1a23 (patch) | |
tree | 1897d3b30822aeeb6ee238f65a1f34cc356a76dd /kern | |
parent | 436fe6cb9711401fcc1f1d8fc29025f1aec5b774 (diff) |
Move limits.h to the include directory
This turns limits.h into a standard header.
Diffstat (limited to 'kern')
-rw-r--r-- | kern/bitmap.c | 2 | ||||
-rw-r--r-- | kern/bitmap.h | 2 | ||||
-rw-r--r-- | kern/bitmap_i.h | 3 | ||||
-rw-r--r-- | kern/kmem.c | 2 | ||||
-rw-r--r-- | kern/limits.h | 29 | ||||
-rw-r--r-- | kern/log2.h | 3 | ||||
-rw-r--r-- | kern/rdxtree.c | 2 | ||||
-rw-r--r-- | kern/sprintf.c | 2 |
8 files changed, 8 insertions, 37 deletions
diff --git a/kern/bitmap.c b/kern/bitmap.c index d270b9f5..0e13ef55 100644 --- a/kern/bitmap.c +++ b/kern/bitmap.c @@ -15,11 +15,11 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#include <limits.h> #include <string.h> #include <kern/bitmap.h> #include <kern/bitmap_i.h> -#include <kern/limits.h> int bitmap_cmp(const unsigned long *a, const unsigned long *b, int nr_bits) diff --git a/kern/bitmap.h b/kern/bitmap.h index a10fb512..a604d17c 100644 --- a/kern/bitmap.h +++ b/kern/bitmap.h @@ -24,11 +24,11 @@ #ifndef _KERN_BITMAP_H #define _KERN_BITMAP_H +#include <limits.h> #include <string.h> #include <kern/atomic.h> #include <kern/bitmap_i.h> -#include <kern/limits.h> #define BITMAP_DECLARE(name, nr_bits) unsigned long name[BITMAP_LONGS(nr_bits)] diff --git a/kern/bitmap_i.h b/kern/bitmap_i.h index 39a330c9..9b79d3ce 100644 --- a/kern/bitmap_i.h +++ b/kern/bitmap_i.h @@ -18,7 +18,8 @@ #ifndef _KERN_BITMAP_I_H #define _KERN_BITMAP_I_H -#include <kern/limits.h> +#include <limits.h> + #include <kern/macros.h> #define BITMAP_LONGS(nr_bits) DIV_CEIL(nr_bits, LONG_BIT) diff --git a/kern/kmem.c b/kern/kmem.c index 1f822b8a..7c94cb17 100644 --- a/kern/kmem.c +++ b/kern/kmem.c @@ -42,6 +42,7 @@ */ #include <assert.h> +#include <limits.h> #include <stdbool.h> #include <stddef.h> #include <stdint.h> @@ -49,7 +50,6 @@ #include <string.h> #include <kern/init.h> -#include <kern/limits.h> #include <kern/list.h> #include <kern/log2.h> #include <kern/kmem.h> diff --git a/kern/limits.h b/kern/limits.h deleted file mode 100644 index fa468537..00000000 --- a/kern/limits.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 2010-2014 Richard Braun. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#ifndef _KERN_LIMITS_H -#define _KERN_LIMITS_H - -#define CHAR_BIT 8 - -#ifdef __LP64__ -#define LONG_BIT 64 -#else /* __LP64__ */ -#define LONG_BIT 32 -#endif /* __LP64__ */ - -#endif /* _KERN_LIMITS_H */ diff --git a/kern/log2.h b/kern/log2.h index ebcf2f38..ed12b441 100644 --- a/kern/log2.h +++ b/kern/log2.h @@ -22,8 +22,7 @@ #define _KERN_LOG2_H #include <assert.h> - -#include <kern/limits.h> +#include <limits.h> static inline unsigned int ilog2(unsigned long x) diff --git a/kern/rdxtree.c b/kern/rdxtree.c index b518c7f6..9d124393 100644 --- a/kern/rdxtree.c +++ b/kern/rdxtree.c @@ -16,6 +16,7 @@ */ #include <assert.h> +#include <limits.h> #include <stdbool.h> #include <stddef.h> #include <stdint.h> @@ -23,7 +24,6 @@ #include <kern/error.h> #include <kern/kmem.h> -#include <kern/limits.h> #include <kern/llsync.h> #include <kern/macros.h> #include <kern/rdxtree.h> diff --git a/kern/sprintf.c b/kern/sprintf.c index a606d866..f6346e99 100644 --- a/kern/sprintf.c +++ b/kern/sprintf.c @@ -15,12 +15,12 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#include <limits.h> #include <stdarg.h> #include <stddef.h> #include <stdint.h> #include <stdio.h> -#include <kern/limits.h> #include <kern/types.h> /* |