MagickCore 7.1.2
Convert, Edit, Or Compose Bitmap Images
Loading...
Searching...
No Matches
nt-base.h
1/*
2 Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization
3 dedicated to making software imaging solutions freely available.
4
5 You may not use this file except in compliance with the License. You may
6 obtain a copy of the License at
7
8 https://imagemagick.org/script/license.php
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15
16 MagickCore Windows NT utility methods.
17*/
18#ifndef MAGICKCORE_NT_BASE_H
19#define MAGICKCORE_NT_BASE_H
20
21#include "MagickCore/exception.h"
22#include "MagickCore/geometry.h"
23
24#if defined(__cplusplus) || defined(c_plusplus)
25extern "C" {
26#endif
27
28#if defined(MAGICKCORE_WINDOWS_SUPPORT)
29
30#define WIN32_LEAN_AND_MEAN
31#define VC_EXTRALEAN
32#if !defined(_CRT_SECURE_NO_DEPRECATE)
33# define _CRT_SECURE_NO_DEPRECATE 1
34#endif
35#include <windows.h>
36#include <wchar.h>
37#include <winuser.h>
38#include <wingdi.h>
39#include <io.h>
40#include <process.h>
41#include <errno.h>
42#include <malloc.h>
43#include <sys/utime.h>
44#if defined(_DEBUG) && !defined(__MINGW32__)
45#include <crtdbg.h>
46#endif
47
48#define PROT_READ 0x01
49#define PROT_WRITE 0x02
50#define MAP_SHARED 0x01
51#define MAP_PRIVATE 0x02
52#define MAP_ANONYMOUS 0x20
53#define F_OK 0
54#define R_OK 4
55#define W_OK 2
56#define RW_OK 6
57#define _SC_PAGE_SIZE 1
58#define _SC_PHYS_PAGES 2
59#define _SC_OPEN_MAX 3
60#ifdef _WIN64
61# if !defined(SSIZE_MAX)
62# define SSIZE_MAX LLONG_MAX
63# endif
64#else
65# if !defined(SSIZE_MAX)
66# define SSIZE_MAX LONG_MAX
67# endif
68#endif
69#ifndef S_ISCHR
70# define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
71#endif
72
73#if defined(_MSC_VER)
74# if !defined(MAGICKCORE_MSC_VER)
75# if (_MSC_VER >= 1950)
76# define MAGICKCORE_MSC_VER 2026
77# elif (_MSC_VER >= 1930)
78# define MAGICKCORE_MSC_VER 2022
79# elif (_MSC_VER >= 1920)
80# define MAGICKCORE_MSC_VER 2019
81# elif (_MSC_VER >= 1910)
82# define MAGICKCORE_MSC_VER 2017
83# endif
84# endif
85#endif
86
87typedef struct _GhostInfo
88 GhostInfo_;
89
90extern MagickExport char
91 **NTArgvToUTF8(const int argc,wchar_t **);
92
93extern MagickExport const GhostInfo_
94 *NTGhostscriptDLLVectors(void);
95
96extern MagickExport void
97 NTErrorHandler(const ExceptionType,const char *,const char *),
98 NTGhostscriptUnLoadDLL(void),
99 NTWarningHandler(const ExceptionType,const char *,const char *);
100
101#endif
102
103#if defined(__cplusplus) || defined(c_plusplus)
104}
105#endif
106
107#endif