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)
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)
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 fseek _fseeki64
68# define ftell _ftelli64
69# define lseek _lseeki64
70# define fstat _fstat64
75#if !defined(XS_VERSION)
100#if !defined(__MINGW32__)
113static inline void *NTAcquireQuantumMemory(
const size_t count,
114 const size_t quantum)
119 if (HeapOverflowSanityCheckGetSize(count,quantum,&size) != MagickFalse)
124 return(AcquireMagickMemory(size));
127extern MagickPrivate
char
128 *NTGetEnvironmentValue(
const char *);
130#if !defined(MAGICKCORE_LTDL_DELEGATE)
131extern MagickPrivate
const char
132 *NTGetLibraryError(
void);
135#if !defined(XS_VERSION)
136extern MagickPrivate
const char
137 *NTGetLibraryError(
void);
139extern MagickPrivate
DIR
140 *NTOpenDirectory(
const char *);
142extern MagickPrivate
double
146extern MagickPrivate
int
147#if !defined(__MINGW32__)
148 gettimeofday(
struct timeval *,
struct timezone *),
150 NTCloseDirectory(
DIR *),
151 NTCloseLibrary(
void *),
152 NTTruncateFile(
int,off_t),
153 NTUnmapMemory(
void *,
size_t),
154 NTSystemCommand(
const char *,
char *);
156extern MagickPrivate ssize_t
157 NTSystemConfiguration(
int);
159extern MagickPrivate MagickBooleanType
160 NTGatherRandomData(
const size_t,
unsigned char *),
161 NTGetExecutionPath(
char *,
const size_t),
162 NTGetModulePath(
const char *,
char *),
163 NTGhostscriptFonts(
char *,
int),
164 NTReportEvent(
const char *,
const MagickBooleanType);
166extern MagickExport MagickBooleanType
167 NTLongPathsEnabled(
void);
169extern MagickPrivate
struct dirent
170 *NTReadDirectory(
DIR *);
172extern MagickPrivate
unsigned char
173 *NTRegistryKeyLookup(
const char *),
174 *NTResourceToBlob(
const char *);
176extern MagickPrivate
void
177 *NTGetLibrarySymbol(
void *,
const char *),
178 NTGhostscriptEXE(
char *,
int),
179 *NTMapMemory(
char *,
size_t,
int,
int,
int,MagickOffsetType),
180 *NTOpenLibrary(
const char *),
181 NTWindowsGenesis(
void),
182 NTWindowsTerminus(
void);
188#if defined(__cplusplus) || defined(c_plusplus)