~ubuntu-branches/ubuntu/quantal/open-vm-tools/quantal-201207201942

« back to all changes in this revision

Viewing changes to modules/solaris/vmxnet/includeCheck.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Baumann
  • Date: 2009-03-20 10:19:00 UTC
  • mfrom: (1.1.4 upstream) (2.4.3 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090320101900-1o604camiubq2de8
Tags: 2009.03.18-154848-2
Correcting patch system depends (Closes: #520493).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*********************************************************
 
2
 * Copyright (C) 1998 VMware, Inc. All rights reserved.
 
3
 *
 
4
 * The contents of this file are subject to the terms of the Common
 
5
 * Development and Distribution License (the "License") version 1.0
 
6
 * and no later version.  You may not use this file except in
 
7
 * compliance with the License.
 
8
 *
 
9
 * You can obtain a copy of the License at
 
10
 *         http://www.opensource.org/licenses/cddl1.php
 
11
 *
 
12
 * See the License for the specific language governing permissions
 
13
 * and limitations under the License.
 
14
 *
 
15
 *********************************************************/
 
16
 
 
17
/*
 
18
 * includeCheck.h --
 
19
 *
 
20
 *      Restrict include file use.
 
21
 *
 
22
 * In every .h file, define one or more of these
 
23
 *
 
24
 *      INCLUDE_ALLOW_VMX 
 
25
 *      INCLUDE_ALLOW_USERLEVEL 
 
26
 *      INCLUDE_ALLOW_VMMEXT
 
27
 *      INCLUDE_ALLOW_VMCORE
 
28
 *      INCLUDE_ALLOW_MODULE
 
29
 *      INCLUDE_ALLOW_VMNIXMOD 
 
30
 *      INCLUDE_ALLOW_VMKERNEL 
 
31
 *      INCLUDE_ALLOW_DISTRIBUTE
 
32
 *      INCLUDE_ALLOW_VMK_MODULE
 
33
 *      INCLUDE_ALLOW_VMKDRIVERS
 
34
 *      INCLUDE_ALLOW_VMIROM
 
35
 *
 
36
 * Then include this file.
 
37
 *
 
38
 * Any file that has INCLUDE_ALLOW_DISTRIBUTE defined will potentially
 
39
 * be distributed in source form along with GPLed code.  Ensure
 
40
 * that this is acceptable.
 
41
 */
 
42
 
 
43
 
 
44
/*
 
45
 * Declare a VMCORE-only variable to help classify object
 
46
 * files.  The variable goes in the common block and does
 
47
 * not create multiple definition link-time conflicts.
 
48
 */
 
49
 
 
50
#if defined VMCORE && defined VMX86_DEVEL && defined VMX86_DEBUG && \
 
51
    defined linux && !defined MODULE && \
 
52
    !defined COMPILED_WITH_VMCORE
 
53
#define COMPILED_WITH_VMCORE compiled_with_vmcore
 
54
#ifdef ASM
 
55
        .comm   compiled_with_vmcore, 0
 
56
#else
 
57
        asm(".comm compiled_with_vmcore, 0");
 
58
#endif /* ASM */
 
59
#endif
 
60
 
 
61
 
 
62
#if defined VMCORE && \
 
63
    !(defined VMX86_VMX || defined VMM || \
 
64
      defined MONITOR_APP || defined VMMON)
 
65
#error "Makefile problem: VMCORE without VMX86_VMX or \
 
66
        VMM or MONITOR_APP or MODULE."
 
67
#endif
 
68
 
 
69
#if defined VMCORE && !defined INCLUDE_ALLOW_VMCORE
 
70
#error "The surrounding include file is not allowed in vmcore."
 
71
#endif
 
72
#undef INCLUDE_ALLOW_VMCORE
 
73
 
 
74
#if defined VMX86_VMX && !defined VMCORE && \
 
75
    !(defined INCLUDE_ALLOW_VMX || defined INCLUDE_ALLOW_USERLEVEL)
 
76
#error "The surrounding include file is not allowed in the VMX."
 
77
#endif
 
78
#undef INCLUDE_ALLOW_VMX
 
79
 
 
80
#if defined USERLEVEL && !defined VMX86_VMX && !defined VMCORE && \
 
81
    !defined INCLUDE_ALLOW_USERLEVEL
 
82
#error "The surrounding include file is not allowed at userlevel."
 
83
#endif
 
84
#undef INCLUDE_ALLOW_USERLEVEL
 
85
 
 
86
#if defined VMM && !defined VMCORE && \
 
87
    !defined INCLUDE_ALLOW_VMMEXT
 
88
#error "The surrounding include file is not allowed in the monitor."
 
89
#endif
 
90
#undef INCLUDE_ALLOW_VMMEXT
 
91
 
 
92
#if defined MODULE && !defined VMKERNEL_MODULE && !defined VMNIXMOD && \
 
93
    !defined VMMON && !defined INCLUDE_ALLOW_MODULE
 
94
#error "The surrounding include file is not allowed in driver modules."
 
95
#endif
 
96
#undef INCLUDE_ALLOW_MODULE
 
97
 
 
98
#if defined VMMON && !defined INCLUDE_ALLOW_VMMON
 
99
#error "The surrounding include file is not allowed in vmmon."
 
100
#endif
 
101
#undef INCLUDE_ALLOW_VMMON
 
102
 
 
103
#if defined VMKERNEL && !defined INCLUDE_ALLOW_VMKERNEL
 
104
#error "The surrounding include file is not allowed in the vmkernel."
 
105
#endif
 
106
#undef INCLUDE_ALLOW_VMKERNEL
 
107
 
 
108
#if defined GPLED_CODE && !defined INCLUDE_ALLOW_DISTRIBUTE
 
109
#error "The surrounding include file is not allowed in GPL code."
 
110
#endif
 
111
#undef INCLUDE_ALLOW_DISTRIBUTE
 
112
 
 
113
#if defined VMKERNEL_MODULE && !defined VMKERNEL && \
 
114
    !defined INCLUDE_ALLOW_VMK_MODULE && !defined INCLUDE_ALLOW_VMKDRIVERS
 
115
#error "The surrounding include file is not allowed in vmkernel modules."
 
116
#endif
 
117
#undef INCLUDE_ALLOW_VMK_MODULE
 
118
#undef INCLUDE_ALLOW_VMKDRIVERS
 
119
 
 
120
#if defined VMNIXMOD && !defined INCLUDE_ALLOW_VMNIXMOD
 
121
#ifndef VMNIXMOD_VM
 
122
#error "The surrounding include file is not allowed in vmnixmod."
 
123
#endif
 
124
#endif
 
125
#undef INCLUDE_ALLOW_VMNIXMOD
 
126
 
 
127
#if defined VMIROM && ! defined INCLUDE_ALLOW_VMIROM
 
128
#error "The surrounding include file is not allowed in vmirom."
 
129
#endif
 
130
#undef INCLUDE_ALLOW_VMIROM