18 #ifndef MAGICKCORE_NT_BASE_PRIVATE_H
19 #define MAGICKCORE_NT_BASE_PRIVATE_H
21 #include "MagickCore/delegate.h"
22 #include "MagickCore/delegate-private.h"
23 #include "MagickCore/exception.h"
24 #include "MagickCore/memory_.h"
25 #include "MagickCore/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__)
124 static inline void *NTAcquireQuantumMemory(
const size_t count,
125 const size_t quantum)
130 if (HeapOverflowSanityCheckGetSize(count,quantum,&size) != MagickFalse)
135 return(AcquireMagickMemory(size));
138 extern MagickExport
char
139 *NTRealPathWide(
const char *);
141 extern MagickPrivate
char
142 *NTGetEnvironmentValue(
const char *);
144 #if !defined(MAGICKCORE_LTDL_DELEGATE)
145 extern MagickPrivate
const char
146 *NTGetLibraryError(
void);
149 #if !defined(XS_VERSION)
150 extern MagickPrivate
const char
151 *NTGetLibraryError(
void);
153 extern MagickPrivate DIR
154 *NTOpenDirectory(
const char *);
156 extern MagickPrivate
double
160 extern MagickExport FILE
161 *NTOpenFileWide(
const char *,
const char *),
162 *NTOpenPipeWide(
const char *,
const char *);
164 extern MagickExport
int
165 NTAccessWide(
const char *,
int),
166 NTOpenWide(
const char *,
int,mode_t),
167 NTRemoveWide(
const char *),
168 NTRenameWide(
const char *,
const char *),
169 NTSetFileTimestamp(
const char *,
struct stat *),
170 NTStatWide(
const char *,
struct stat *);
172 extern MagickPrivate
int
173 #if !defined(__MINGW32__)
174 gettimeofday(
struct timeval *,
struct timezone *),
176 NTCloseDirectory(DIR *),
177 NTCloseLibrary(
void *),
178 NTTruncateFile(
int,off_t),
179 NTUnmapMemory(
void *,
size_t),
180 NTSystemCommand(
const char *,
char *);
182 extern MagickPrivate ssize_t
183 NTSystemConfiguration(
int);
185 extern MagickPrivate MagickBooleanType
186 NTGatherRandomData(
const size_t,
unsigned char *),
187 NTGetExecutionPath(
char *,
const size_t),
188 NTGetModulePath(
const char *,
char *),
189 NTGhostscriptFonts(
char *,
int),
190 NTReportEvent(
const char *,
const MagickBooleanType);
192 extern MagickExport MagickBooleanType
193 NTIsSymlinkWide(
const char *),
194 NTLongPathsEnabled(
void);
196 extern MagickPrivate
struct dirent
197 *NTReadDirectory(DIR *);
199 extern MagickPrivate
unsigned char
200 *NTRegistryKeyLookup(
const char *),
201 *NTResourceToBlob(
const char *);
203 extern MagickPrivate
void
204 *NTGetLibrarySymbol(
void *,
const char *),
205 NTGhostscriptEXE(
char *,
int),
206 *NTMapMemory(
char *,
size_t,
int,
int,
int,MagickOffsetType),
207 *NTOpenLibrary(
const char *),
208 NTWindowsGenesis(
void),
209 NTWindowsTerminus(
void);
211 extern MagickExport
wchar_t
212 *NTCreateWidePath(
const char *);
218 #if defined(__cplusplus) || defined(c_plusplus)