From 8569c9140bd41089f9b6be8837ca421102714a90 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sun, 17 Aug 2008 13:48:37 -0400 Subject: x86, um: take arch/um/include/* out of the way We can't just plop asm/* into it - userland helpers are built with it in search path and seeing asm/* show up there suddenly would be a bad idea. Signed-off-by: Al Viro Signed-off-by: H. Peter Anvin --- arch/um/include/shared/user.h | 45 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 arch/um/include/shared/user.h (limited to 'arch/um/include/shared/user.h') diff --git a/arch/um/include/shared/user.h b/arch/um/include/shared/user.h new file mode 100644 index 000000000000..1723fac6f40d --- /dev/null +++ b/arch/um/include/shared/user.h @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) + * Licensed under the GPL + */ + +#ifndef __USER_H__ +#define __USER_H__ + +#include "uml-config.h" + +/* + * The usual definition - copied here because the kernel provides its own, + * fancier, type-safe, definition. Using that one would require + * copying too much infrastructure for my taste, so userspace files + * get less checking than kernel files. + */ +#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) + +/* This is to get size_t */ +#ifdef __KERNEL__ +#include +#else +#include +#endif + +extern void panic(const char *fmt, ...) + __attribute__ ((format (printf, 1, 2))); + +#ifdef UML_CONFIG_PRINTK +extern int printk(const char *fmt, ...) + __attribute__ ((format (printf, 1, 2))); +#else +static inline int printk(const char *fmt, ...) +{ + return 0; +} +#endif + +extern void schedule(void); +extern int in_aton(char *str); +extern int open_gdb_chan(void); +extern size_t strlcpy(char *, const char *, size_t); +extern size_t strlcat(char *, const char *, size_t); + +#endif -- cgit v1.2.3-59-g8ed1b