2
* WinPR: Windows Portable Runtime
3
* Compiler Specification Strings
5
* Copyright 2012 Marc-Andre Moreau <marcandre.moreau@gmail.com>
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
11
* http://www.apache.org/licenses/LICENSE-2.0
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.
23
#include <winpr/platform.h>
27
#include <specstrings.h>
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)))
37
#define DECLSPEC_ALIGN(x)
39
#endif /* DECLSPEC_ALIGN */
42
#define MEMORY_ALLOCATION_ALIGNMENT 16
44
#define MEMORY_ALLOCATION_ALIGNMENT 8
47
#define DUMMYSTRUCTNAME s
51
#define __declspec(e) __attribute__((e))
55
#ifndef DECLSPEC_NORETURN
56
#if (defined(__GNUC__) || defined(_MSC_VER))
57
#define DECLSPEC_NORETURN __declspec(noreturn)
59
#define DECLSPEC_NORETURN
61
#endif /* DECLSPEC_NORETURN */
65
#endif /* WINPR_SPEC_H */