Visual Studio 2012 Support
[xy_vsfilter.git] / src / thirdparty / VirtualDub / h / vd2 / system / win32 / intrin.h
blobd0597a2454453460d304834c6264e1abf1d39ef4
1 // VirtualDub - Video processing and capture application
2 // System library component
3 // Copyright (C) 1998-2011 Avery Lee, All Rights Reserved.
4 //
5 // Beginning with 1.6.0, the VirtualDub system library is licensed
6 // differently than the remainder of VirtualDub. This particular file is
7 // thus licensed as follows (the "zlib" license):
8 //
9 // This software is provided 'as-is', without any express or implied
10 // warranty. In no event will the authors be held liable for any
11 // damages arising from the use of this software.
13 // Permission is granted to anyone to use this software for any purpose,
14 // including commercial applications, and to alter it and redistribute it
15 // freely, subject to the following restrictions:
17 // 1. The origin of this software must not be misrepresented; you must
18 // not claim that you wrote the original software. If you use this
19 // software in a product, an acknowledgment in the product
20 // documentation would be appreciated but is not required.
21 // 2. Altered source versions must be plainly marked as such, and must
22 // not be misrepresented as being the original software.
23 // 3. This notice may not be removed or altered from any source
24 // distribution.
26 #ifndef f_VD2_SYSTEM_WIN32_INTRIN_H
27 #define f_VD2_SYSTEM_WIN32_INTRIN_H
29 #pragma once
31 // The Windows SDK conflicts with the VS2005 declaration of a couple
32 // of intrinsics starting with the Vista SDK. The conflict is between
33 // intrin.h and winnt.h. To work around this, we wrap intrin.h and
34 // rename its declaration.
35 #pragma push_macro("_interlockedbittestandset")
36 #pragma push_macro("_interlockedbittestandreset")
37 #pragma push_macro("_interlockedbittestandset64")
38 #pragma push_macro("_interlockedbittestandreset64")
40 #define _interlockedbittestandset _interlockedbittestandset_vc
41 #define _interlockedbittestandreset _interlockedbittestandreset_vc
42 #define _interlockedbittestandset64 _interlockedbittestandset64_vc
43 #define _interlockedbittestandreset64 _interlockedbittestandreset64_vc
45 #ifdef _MSC_VER
46 #include <intrin.h>
47 #else
48 #include <emmintrin.h>
49 #endif
51 #pragma pop_macro("_interlockedbittestandreset64")
52 #pragma pop_macro("_interlockedbittestandset64")
53 #pragma pop_macro("_interlockedbittestandreset")
54 #pragma pop_macro("_interlockedbittestandset")
56 #endif