diff options
| author | Anton Altaparmakov <aia21@cantab.net> | 2005-05-21 22:00:02 +0100 |
|---|---|---|
| committer | Anton Altaparmakov <aia21@cantab.net> | 2005-05-21 22:00:02 +0100 |
| commit | 67394f8f069c2fdf90f3b6d851824c07815442af (patch) | |
| tree | 0c33e62d34dbaecea434ae9ece3cc0c56db8b1f7 /include/linux/patchkey.h | |
| parent | 450cbfbbbd88876e3ccec1d277f613221ca82bb7 (diff) | |
| parent | 9636273dae265b9354b861b373cd43cd76a6d0fe (diff) | |
Merge with /usr/src/ntfs-2.6.git
Diffstat (limited to 'include/linux/patchkey.h')
| -rw-r--r-- | include/linux/patchkey.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/include/linux/patchkey.h b/include/linux/patchkey.h new file mode 100644 index 000000000000..d974a6e92372 --- /dev/null +++ b/include/linux/patchkey.h @@ -0,0 +1,45 @@ +/* + * <linux/patchkey.h> -- definition of _PATCHKEY macro + * + * Copyright (C) 2005 Stuart Brady + * + * This exists because awe_voice.h defined its own _PATCHKEY and it wasn't + * clear whether removing this would break anything in userspace. + * + * Do not include this file directly. Please use <sys/soundcard.h> instead. + * For kernel code, use <linux/soundcard.h> + */ + +#ifndef _LINUX_PATCHKEY_H_INDIRECT +#error "patchkey.h included directly" +#endif + +#ifndef _LINUX_PATCHKEY_H +#define _LINUX_PATCHKEY_H + +/* Endian macros. */ +#ifdef __KERNEL__ +# include <asm/byteorder.h> +#else +# include <endian.h> +#endif + +#if defined(__KERNEL__) +# if defined(__BIG_ENDIAN) +# define _PATCHKEY(id) (0xfd00|id) +# elif defined(__LITTLE_ENDIAN) +# define _PATCHKEY(id) ((id<<8)|0x00fd) +# else +# error "could not determine byte order" +# endif +#elif defined(__BYTE_ORDER) +# if __BYTE_ORDER == __BIG_ENDIAN +# define _PATCHKEY(id) (0xfd00|id) +# elif __BYTE_ORDER == __LITTLE_ENDIAN +# define _PATCHKEY(id) ((id<<8)|0x00fd) +# else +# error "could not determine byte order" +# endif +#endif + +#endif /* _LINUX_PATCHKEY_H */ |
