18 #ifndef MAGICKCORE_NT_BASE_PRIVATE_H
19 #define MAGICKCORE_NT_BASE_PRIVATE_H
21 #include "magick/delegate.h"
22 #include "magick/delegate-private.h"
23 #include "magick/exception.h"
24 #include "magick/memory_.h"
25 #include "magick/splay-tree.h"
27 #if defined(__cplusplus) || defined(c_plusplus)
31 #if defined(MAGICKCORE_WINDOWS_SUPPORT)
33 #if !defined(closedir)
34 # define closedir(directory) NTCloseDirectory(directory)
36 #if !defined(MAGICKCORE_LTDL_DELEGATE)
37 #if !defined(lt_dlclose)
38 # define lt_dlclose(handle) NTCloseLibrary(handle)
40 #if !defined(lt_dlerror)
41 # define lt_dlerror() NTGetLibraryError()
43 #if !defined(lt_dlopen)
44 # define lt_dlopen(filename) NTOpenLibrary(filename)
46 #if !defined(lt_dlsym)
47 # define lt_dlsym(handle,name) NTGetLibrarySymbol(handle,name)
51 # define opendir(directory) NTOpenDirectory(directory)
54 # define read(fd,buffer,count) _read(fd,buffer,(unsigned int) count)
57 # define readdir(directory) NTReadDirectory(directory)
60 # define sysconf(name) NTSystemConfiguration(name)
61 # define MAGICKCORE_HAVE_SYSCONF 1
64 # define write(fd,buffer,count) _write(fd,buffer,(unsigned int) count)
66 #if !defined(__MINGW32__)
67 # define fdopen _fdopen
68 # define fileno _fileno
69 # define fseek _fseeki64
70 # define ftell _ftelli64
71 # define getpid _getpid
73 # define getcwd _getcwd
75 # define lseek _lseeki64
76 # define fstat _fstat64
77 # define setmode _setmode
79 # define tell _telli64
80 # define wstat _wstat64
83 #if !defined(XS_VERSION)
108 #if !defined(__MINGW32__)
122 #if defined(MAGICKCORE_BZLIB_DELEGATE)
128 static inline void *NTAcquireQuantumMemory(
const size_t count,
129 const size_t quantum)
134 if (HeapOverflowSanityCheckGetSize(count,quantum,&size) != MagickFalse)
139 return(AcquireMagickMemory(size));
142 extern MagickExport
char
143 *NTRealPathWide(
const char *);
145 extern MagickPrivate
char
146 *NTGetEnvironmentValue(
const char *);
148 #if !defined(MAGICKCORE_LTDL_DELEGATE)
149 extern MagickPrivate
const char
150 *NTGetLibraryError(
void);
153 #if !defined(XS_VERSION)
154 extern MagickPrivate
const char
155 *NTGetLibraryError(
void);
157 extern MagickPrivate
DIR
158 *NTOpenDirectory(
const char *);
160 extern MagickPrivate
double
164 extern MagickExport FILE
165 *NTOpenFileWide(
const char *,
const char *),
166 *NTOpenPipeWide(
const char *,
const char *);
168 extern MagickExport
int
169 NTAccessWide(
const char *,
int),
170 NTOpenWide(
const char *,
int,mode_t),
171 NTRemoveWide(
const char *),
172 NTRenameWide(
const char *,
const char *),
173 NTSetFileTimestamp(
const char *,
struct stat *),
174 NTStatWide(
const char *,
struct stat *);
176 extern MagickPrivate
int
177 #if !defined(__MINGW32__)
178 gettimeofday(
struct timeval *,
struct timezone *),
180 NTCloseDirectory(
DIR *),
181 NTCloseLibrary(
void *),
182 NTControlHandler(
void),
184 NTTruncateFile(
int,off_t),
185 NTGhostscriptEXE(
char *,
int),
186 NTGhostscriptFonts(
char *,
int),
187 NTInitializeLibrary(
void),
188 NTSetSearchPath(
const char *),
189 NTUnmapMemory(
void *,
size_t),
190 NTSystemCommand(
const char *,
char *);
192 extern MagickPrivate ssize_t
193 NTSystemConfiguration(
int);
195 extern MagickPrivate MagickBooleanType
196 NTGatherRandomData(
const size_t,
unsigned char *),
197 NTGetExecutionPath(
char *,
const size_t),
198 NTGetModulePath(
const char *,
char *),
199 NTReportEvent(
const char *,
const MagickBooleanType);
201 extern MagickExport MagickBooleanType
202 NTLongPathsEnabled(
void);
204 extern MagickPrivate
struct dirent
205 *NTReadDirectory(
DIR *);
207 extern MagickPrivate
unsigned char
208 *NTRegistryKeyLookup(
const char *),
209 *NTResourceToBlob(
const char *);
211 extern MagickPrivate
void
212 *NTGetLibrarySymbol(
void *,
const char *),
213 NTInitializeWinsock(MagickBooleanType),
214 *NTMapMemory(
char *,
size_t,
int,
int,
int,MagickOffsetType),
215 *NTOpenLibrary(
const char *),
216 NTWindowsGenesis(
void),
217 NTWindowsTerminus(
void);
219 extern MagickExport
wchar_t
220 *NTCreateWidePath(
const char *);
226 #if defined(__cplusplus) || defined(c_plusplus)