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 NTIsSymlinkWide(
const char *),
203 NTLongPathsEnabled(
void);
205 extern MagickPrivate
struct dirent 206 *NTReadDirectory(
DIR *);
208 extern MagickPrivate
unsigned char 209 *NTRegistryKeyLookup(
const char *),
210 *NTResourceToBlob(
const char *);
212 extern MagickPrivate
void 213 *NTGetLibrarySymbol(
void *,
const char *),
214 NTInitializeWinsock(MagickBooleanType),
215 *NTMapMemory(
char *,
size_t,
int,
int,
int,MagickOffsetType),
216 *NTOpenLibrary(
const char *),
217 NTWindowsGenesis(
void),
218 NTWindowsTerminus(
void);
220 extern MagickExport
wchar_t 221 *NTCreateWidePath(
const char *);
227 #if defined(__cplusplus) || defined(c_plusplus)