aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/include/user.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/um/include/user.h')
-rw-r--r--arch/um/include/user.h29
1 files changed, 15 insertions, 14 deletions
diff --git a/arch/um/include/user.h b/arch/um/include/user.h
index acadce3f271f..d380e6d91a90 100644
--- a/arch/um/include/user.h
+++ b/arch/um/include/user.h
@@ -6,6 +6,19 @@
6#ifndef __USER_H__ 6#ifndef __USER_H__
7#define __USER_H__ 7#define __USER_H__
8 8
9/*
10 * The usual definition - copied here because the kernel provides its own,
11 * fancier, type-safe, definition. Using that one would require
12 * copying too much infrastructure for my taste, so userspace files
13 * get less checking than kernel files.
14 */
15#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
16
17/*
18 * This will provide the size_t definition in both kernel and userspace builds
19 */
20#include <linux/types.h>
21
9extern void panic(const char *fmt, ...) 22extern void panic(const char *fmt, ...)
10 __attribute__ ((format (printf, 1, 2))); 23 __attribute__ ((format (printf, 1, 2)));
11extern int printk(const char *fmt, ...) 24extern int printk(const char *fmt, ...)
@@ -13,19 +26,7 @@ extern int printk(const char *fmt, ...)
13extern void schedule(void); 26extern void schedule(void);
14extern int in_aton(char *str); 27extern int in_aton(char *str);
15extern int open_gdb_chan(void); 28extern int open_gdb_chan(void);
16/* These use size_t, however unsigned long is correct on both i386 and x86_64. */ 29extern size_t strlcpy(char *, const char *, size_t);
17extern unsigned long strlcpy(char *, const char *, unsigned long); 30extern size_t strlcat(char *, const char *, size_t);
18extern unsigned long strlcat(char *, const char *, unsigned long);
19 31
20#endif 32#endif
21
22/*
23 * Overrides for Emacs so that we follow Linus's tabbing style.
24 * Emacs will notice this stuff at the end of the file and automatically
25 * adjust the settings for this buffer only. This must remain at the end
26 * of the file.
27 * ---------------------------------------------------------------------------
28 * Local variables:
29 * c-file-style: "linux"
30 * End:
31 */