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

« back to all changes in this revision

Viewing changes to modules/solaris/vmhgfs/vmware_pack_init.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) 2002 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
#ifndef __VMWARE_PACK_INIT_H__
 
18
#   define __VMWARE_PACK_INIT_H__
 
19
 
 
20
 
 
21
/*
 
22
 * vmware_pack_init.h --
 
23
 *
 
24
 *    Platform-independent code to make the compiler pack (i.e. have them
 
25
 *    occupy the smallest possible space) structure definitions. The following
 
26
 *    constructs are known to work --hpreg
 
27
 *
 
28
 *    #include "vmware_pack_begin.h"
 
29
 *    struct foo {
 
30
 *       ...
 
31
 *    }
 
32
 *    #include "vmware_pack_end.h"
 
33
 *    ;
 
34
 *
 
35
 *    typedef
 
36
 *    #include "vmware_pack_begin.h"
 
37
 *    struct foo {
 
38
 *       ...
 
39
 *    }
 
40
 *    #include "vmware_pack_end.h"
 
41
 *    foo;
 
42
 */
 
43
 
 
44
 
 
45
#ifdef _MSC_VER
 
46
/*
 
47
 * MSVC 6.0 emits warning 4103 when the pack push and pop pragma pairing is
 
48
 * not balanced within 1 included file. That is annoying because our scheme
 
49
 * is based on the pairing being balanced between 2 included files.
 
50
 *
 
51
 * So we disable this warning, but this is safe because the compiler will also
 
52
 * emit warning 4161 when there is more pops than pushes within 1 main
 
53
 * file --hpreg
 
54
 */
 
55
 
 
56
#   pragma warning(disable:4103)
 
57
#elif __GNUC__
 
58
#else
 
59
#   error Compiler packing...
 
60
#endif
 
61
 
 
62
 
 
63
#endif /* __VMWARE_PACK_INIT_H__ */