diff options
author | Richard Braun <rbraun@sceen.net> | 2017-04-29 22:58:33 +0200 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2017-04-29 22:58:33 +0200 |
commit | a0563b4eec601eadc89081eeb7e14edd193ef95d (patch) | |
tree | 84d47e08a0418b984311d8f7e7cc006b41a17a5d /kern | |
parent | fb13a50dca9a526c6a1666fefe123b58524040ff (diff) |
kern/{,s}printf: guard against direct inclusion
Diffstat (limited to 'kern')
-rw-r--r-- | kern/printf.h | 4 | ||||
-rw-r--r-- | kern/sprintf.h | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/kern/printf.h b/kern/printf.h index efaf2f9c..16a7b584 100644 --- a/kern/printf.h +++ b/kern/printf.h @@ -27,6 +27,10 @@ #ifndef _KERN_PRINTK_H #define _KERN_PRINTK_H +#ifndef _STDIO_H +#error "do not use <kern/printf.h> directly; include <stdio.h> instead" +#endif /* _STDIO_H */ + #include <stdarg.h> #include <kern/macros.h> diff --git a/kern/sprintf.h b/kern/sprintf.h index 0c097953..0c3fb839 100644 --- a/kern/sprintf.h +++ b/kern/sprintf.h @@ -28,6 +28,9 @@ #ifndef _KERN_SPRINTF_H #define _KERN_SPRINTF_H +#ifndef _STDIO_H +#error "do not use <kern/sprintf.h> directly; include <stdio.h> instead" +#endif /* _STDIO_H */ #include <stdarg.h> #include <kern/macros.h> |