From b4b6116a13633898cf868f2f103c96a90c4c20f8 Mon Sep 17 00:00:00 2001 From: Anton Arapov Date: Mon, 16 Apr 2012 10:05:28 +0200 Subject: fedora kernel: d9aad82f3319f3cfd1aebc01234254ef0c37ad84 Signed-off-by: Anton Arapov --- arch/um/include/shared/user.h | 46 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 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 00000000000..4fa82c055aa --- /dev/null +++ b/arch/um/include/shared/user.h @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) + * Licensed under the GPL + */ + +#ifndef __USER_H__ +#define __USER_H__ + +#include + +/* + * 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 int in_aton(char *str); +extern size_t strlcpy(char *, const char *, size_t); +extern size_t strlcat(char *, const char *, size_t); + +/* Copied from linux/compiler-gcc.h since we can't include it directly */ +#define barrier() __asm__ __volatile__("": : :"memory") + +#endif -- cgit