From 2f4a4c7b6f4e4836c7528f1d0ae2b35d06dd1a23 Mon Sep 17 00:00:00 2001 From: Richard Braun Date: Wed, 31 May 2017 19:23:51 +0200 Subject: Move limits.h to the include directory This turns limits.h into a standard header. --- kern/bitmap.c | 2 +- kern/bitmap.h | 2 +- kern/bitmap_i.h | 3 ++- kern/kmem.c | 2 +- kern/limits.h | 29 ----------------------------- kern/log2.h | 3 +-- kern/rdxtree.c | 2 +- kern/sprintf.c | 2 +- 8 files changed, 8 insertions(+), 37 deletions(-) delete mode 100644 kern/limits.h (limited to 'kern') 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 . */ +#include #include #include #include -#include 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 #include #include #include -#include #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 +#include + #include #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 +#include #include #include #include @@ -49,7 +50,6 @@ #include #include -#include #include #include #include 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 . - */ - -#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 - -#include +#include 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 +#include #include #include #include @@ -23,7 +24,6 @@ #include #include -#include #include #include #include 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 . */ +#include #include #include #include #include -#include #include /* -- cgit v1.2.3