Skip to content

Commit

Permalink
Adding missing windows includes
Browse files Browse the repository at this point in the history
  • Loading branch information
msoos committed Oct 22, 2023
1 parent 9432416 commit a4f83f5
Showing 1 changed file with 65 additions and 0 deletions.
65 changes: 65 additions & 0 deletions src/cms_windows_includes.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
/******************************************
Copyright (C) 2022 Axel Kemper (27-Sep-2022)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
***********************************************/

#pragma once

#if _MSC_VER
#define _CRT_SECURE_NO_WARNINGS
#define _SCL_SECURE_NO_WARNINGS

#include <intrin.h>
#include "stdint.h"

#if !defined(INTMAX_MAX)
#define INTMAX_MAX _I32_MAX
#endif

#pragma warning(disable : 4244) // C4244 : 'Argument': Konvertierung von 'const uint64_t' in 'double', möglicher Datenverlust
#pragma warning(disable : 4267) // C4267 : 'return': Konvertierung von 'size_t' nach 'uint32_t', Datenverlust möglich
#pragma warning(disable : 4302) // C4302 : truncation
#pragma warning(disable : 4305) // C4302 : truncation double to float
#pragma warning(disable : 4311) // C4311 : pointer truncation
#pragma warning(disable : 4312) // C4312 : conversion from .. of greater size
#pragma warning(disable : 4789) // C4789 : buffer '' of size xx bytes will be overrun;

#pragma warning(disable : 4800) // C4800 : 'const uint32_t' : Variable wird auf booleschen Wert('True' oder 'False') gesetzt(Auswirkungen auf Leistungsverhalten möglich)
#pragma warning(disable : 4805) // C4805 : '==' : unsichere Kombination von Typ 'unsigned short' mit Typ 'bool' in einer Operation
#pragma warning(disable : 4996) // C4996 : deprecated
#pragma warning(disable : 26495) // Always initialize a member variable
#pragma warning(disable : 26819) // Unannotated fallthrough between switch labels



#if !defined(__PRETTY_FUNCTION__) && !defined(__GNUC__)
#define __PRETTY_FUNCTION__ __FUNCSIG__
#endif

#define __builtin_popcountll __popcnt64
#define NO_DLL_EXPORT 1

// picosat
#define isatty(x) _isatty(x)
#define NO_USE_GZ 1
#define NO_USE_PIPES 1
#define NALLSIGNALS 1

#endif

0 comments on commit a4f83f5

Please sign in to comment.