summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorJoel Kitching <kitching@google.com>2019-06-16 16:09:42 +0800
committerJulius Werner <jwerner@chromium.org>2019-06-24 21:15:14 +0000
commit393c71c21300a088ff5c46ea263b3b2e28084ce6 (patch)
treea7c4846871c5d43e3b3af534eec943beb8a8a27f /src/lib
parent2d6ed31cbd1dfec38630df0f150c20b1e7db8de8 (diff)
add ctype.h header
Sometimes coreboot needs to compile external code (e.g. vboot_reference) using its own set of system header files. When these headers don't line up with C Standard Library, it causes problems. Create ctype.h header file. Relocate ctype.h functions from string.h into ctype.h. Update source files which call ctype.h functions accordingly. Note that ctype.h still lacks five functions which are not used in coreboot source: isalnum, isalpha, iscntrl, isgraph, ispunct BUG=b:124141368 TEST=make clean && make test-abuild BRANCH=none Change-Id: I31b5e8af49956ec024a392a73c3c9024b9a9c194 Signed-off-by: Joel Kitching <kitching@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/33525 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/device_tree.c1
-rw-r--r--src/lib/edid.c1
-rw-r--r--src/lib/fit.c1
-rw-r--r--src/lib/hexdump.c1
-rw-r--r--src/lib/hexstrtobin.c1
-rw-r--r--src/lib/string.c1
6 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/device_tree.c b/src/lib/device_tree.c
index 2e81a08779..b8faab53b8 100644
--- a/src/lib/device_tree.c
+++ b/src/lib/device_tree.c
@@ -18,6 +18,7 @@
#include <assert.h>
#include <commonlib/stdlib.h>
#include <console/console.h>
+#include <ctype.h>
#include <device_tree.h>
#include <endian.h>
#include <stdint.h>
diff --git a/src/lib/edid.c b/src/lib/edid.c
index 3087172952..e2f213c5b0 100644
--- a/src/lib/edid.c
+++ b/src/lib/edid.c
@@ -31,6 +31,7 @@
#include <assert.h>
#include <stddef.h>
#include <console/console.h>
+#include <ctype.h>
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
diff --git a/src/lib/fit.c b/src/lib/fit.c
index 045f52f408..f1052e8f23 100644
--- a/src/lib/fit.c
+++ b/src/lib/fit.c
@@ -17,6 +17,7 @@
#include <assert.h>
#include <console/console.h>
+#include <ctype.h>
#include <endian.h>
#include <stdint.h>
#include <bootmem.h>
diff --git a/src/lib/hexdump.c b/src/lib/hexdump.c
index ca36ddee0e..1e689e3e53 100644
--- a/src/lib/hexdump.c
+++ b/src/lib/hexdump.c
@@ -13,6 +13,7 @@
*/
#include <console/console.h>
+#include <ctype.h>
#include <lib.h>
#include <string.h>
diff --git a/src/lib/hexstrtobin.c b/src/lib/hexstrtobin.c
index ed2abc4e8b..61290b86d3 100644
--- a/src/lib/hexstrtobin.c
+++ b/src/lib/hexstrtobin.c
@@ -11,6 +11,7 @@
* GNU General Public License for more details.
*/
+#include <ctype.h>
#include <lib.h>
#include <string.h>
diff --git a/src/lib/string.c b/src/lib/string.c
index a19f017852..eb6adb67c7 100644
--- a/src/lib/string.c
+++ b/src/lib/string.c
@@ -1,4 +1,5 @@
#include <assert.h>
+#include <ctype.h>
#include <rules.h>
#include <string.h>
#include <stddef.h>