Merging r37048, r37051, r37052, r37055 from the-real-msvc branch
[reactos.git] / reactos / drivers / bus / acpi / include / platform / acwin.h
1 /******************************************************************************
2 *
3 * Name: aclinux.h - OS specific defines, etc.
4 * $Revision: 1.1 $
5 *
6 *****************************************************************************/
7
8 /*
9 * Copyright (C) 2000, 2001 R. Byron Moore
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 */
25
26 #ifndef __ACWIN_H__
27 #define __ACWIN_H__
28
29 #define ACPI_OS_NAME "ReactOS"
30 #define DEFINE_ALTERNATE_TYPES
31
32 #undef ACPI_USE_SYSTEM_CLIBRARY
33
34 #ifdef __KERNEL__
35
36 #include <linux/config.h>
37 #include <linux/string.h>
38 #include <linux/kernel.h>
39 #include <linux/ctype.h>
40 #include <asm/system.h>
41 #include <asm/atomic.h>
42 #include <asm/div64.h>
43
44 #else
45
46 #include <stdarg.h>
47
48 #endif
49
50 #if defined(__GNUC__)
51
52 #include "acgcc.h"
53
54 #undef disable
55 #define disable() __asm__("cli\n\t")
56 #undef enable
57 #define enable() __asm__("sti\n\t")
58
59 #elif defined(_MSC_VER)
60
61 #include "acmsc.h"
62
63 #undef disable
64 #define disable() __asm { cli }
65 #undef enable
66 #define enable() __asm { sti }
67
68 #endif
69
70 #undef DEBUGGER_THREADING
71 #define DEBUGGER_THREADING DEBUGGER_SINGLE_THREADED
72
73 #ifndef _IA64
74 /* Linux ia32 can't do int64 well */
75 #define ACPI_NO_INTEGER64_SUPPORT
76 /* And the ia32 kernel doesn't include 64-bit divide support */
77 #define ACPI_DIV64(dividend, divisor) do_div(dividend, divisor)
78 #else
79 #define ACPI_DIV64(dividend, divisor) ACPI_DIVIDE(dividend, divisor)
80 #endif
81
82 #endif /* __ACWIN_H__ */