~ubuntu-branches/ubuntu/vivid/freerdp/vivid

« back to all changes in this revision

Viewing changes to winpr/include/winpr/spec.h

  • Committer: Package Import Robot
  • Author(s): Iain Lane
  • Date: 2014-11-11 12:20:50 UTC
  • mfrom: (1.2.5)
  • mto: This revision was merged to the branch mainline in revision 24.
  • Revision ID: package-import@ubuntu.com-20141111122050-7z628f4ab38qxad5
Tags: upstream-1.1.0~git20140921.1.440916e+dfsg1
ImportĀ upstreamĀ versionĀ 1.1.0~git20140921.1.440916e+dfsg1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**
 
2
 * WinPR: Windows Portable Runtime
 
3
 * Compiler Specification Strings
 
4
 *
 
5
 * Copyright 2012 Marc-Andre Moreau <marcandre.moreau@gmail.com>
 
6
 *
 
7
 * Licensed under the Apache License, Version 2.0 (the "License");
 
8
 * you may not use this file except in compliance with the License.
 
9
 * You may obtain a copy of the License at
 
10
 *
 
11
 *     http://www.apache.org/licenses/LICENSE-2.0
 
12
 *
 
13
 * Unless required by applicable law or agreed to in writing, software
 
14
 * distributed under the License is distributed on an "AS IS" BASIS,
 
15
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 
16
 * See the License for the specific language governing permissions and
 
17
 * limitations under the License.
 
18
 */
 
19
 
 
20
#ifndef WINPR_SPEC_H
 
21
#define WINPR_SPEC_H
 
22
 
 
23
#include <winpr/platform.h>
 
24
 
 
25
#ifdef _WIN32
 
26
 
 
27
#include <specstrings.h>
 
28
 
 
29
#else
 
30
 
 
31
#ifndef DECLSPEC_ALIGN
 
32
#if defined(_MSC_VER) && (_MSC_VER >= 1300) && !defined(MIDL_PASS)
 
33
#define DECLSPEC_ALIGN(x) __declspec(align(x))
 
34
#elif defined(__GNUC__)
 
35
#define DECLSPEC_ALIGN(x) __attribute__ ((__aligned__ (x)))
 
36
#else
 
37
#define DECLSPEC_ALIGN(x)
 
38
#endif
 
39
#endif /* DECLSPEC_ALIGN */
 
40
 
 
41
#ifdef _M_AMD64
 
42
#define MEMORY_ALLOCATION_ALIGNMENT 16
 
43
#else
 
44
#define MEMORY_ALLOCATION_ALIGNMENT 8
 
45
#endif
 
46
 
 
47
#define DUMMYSTRUCTNAME         s
 
48
 
 
49
#ifdef __GNUC__
 
50
#ifndef __declspec
 
51
#define __declspec(e) __attribute__((e))
 
52
#endif
 
53
#endif
 
54
 
 
55
#ifndef DECLSPEC_NORETURN
 
56
#if (defined(__GNUC__) || defined(_MSC_VER))
 
57
#define DECLSPEC_NORETURN __declspec(noreturn)
 
58
#else
 
59
#define DECLSPEC_NORETURN
 
60
#endif
 
61
#endif /* DECLSPEC_NORETURN */
 
62
 
 
63
#endif
 
64
 
 
65
#endif /* WINPR_SPEC_H */
 
66