MagickCore  6.9.13-44
Convert, Edit, Or Compose Bitmap Images
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/license/
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 "magick/exception.h"
22 #include "magick/geometry.h"
23 
24 #if defined(__cplusplus) || defined(c_plusplus)
25 extern "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 typedef struct _GhostInfo
74  GhostInfo_;
75 
76 extern MagickExport char
77  **NTArgvToUTF8(const int argc,wchar_t **);
78 
79 extern MagickExport const GhostInfo_
80  *NTGhostscriptDLLVectors(void);
81 
82 extern MagickExport int
83  NTGhostscriptUnLoadDLL(void);
84 
85 extern MagickExport void
86  NTErrorHandler(const ExceptionType,const char *,const char *),
87  NTWarningHandler(const ExceptionType,const char *,const char *);
88 
89 #endif
90 
91 #if defined(__cplusplus) || defined(c_plusplus)
92 }
93 #endif
94 
95 #endif