MagickCore 7.1.1
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 >= 1930)
76# define MAGICKCORE_MSC_VER 2022
77# elif (_MSC_VER >= 1920)
78# define MAGICKCORE_MSC_VER 2019
79# elif (_MSC_VER >= 1910)
80# define MAGICKCORE_MSC_VER 2017
81# endif
82# endif
83#endif
84
85typedef struct _GhostInfo
86 GhostInfo_;
87
88extern MagickExport char
89 **NTArgvToUTF8(const int argc,wchar_t **);
90
91extern MagickExport const GhostInfo_
92 *NTGhostscriptDLLVectors(void);
93
94extern MagickExport void
95 NTErrorHandler(const ExceptionType,const char *,const char *),
96 NTGhostscriptUnLoadDLL(void),
97 NTWarningHandler(const ExceptionType,const char *,const char *);
98
99#endif
100
101#if defined(__cplusplus) || defined(c_plusplus)
102}
103#endif
104
105#endif