MagickCore
6.9.10
Convert, Edit, Or Compose Bitmap Images
|
Go to the documentation of this file.
18 #ifndef MAGICKCORE_NT_BASE_H
19 #define MAGICKCORE_NT_BASE_H
24 #if defined(__cplusplus) || defined(c_plusplus)
28 #if defined(MAGICKCORE_WINDOWS_SUPPORT)
30 #define WIN32_LEAN_AND_MEAN
32 #define _CRT_SECURE_NO_DEPRECATE 1
41 #include <sys/utime.h>
42 #if defined(_DEBUG) && !defined(__MINGW32__)
46 #define PROT_READ 0x01
47 #define PROT_WRITE 0x02
48 #define MAP_SHARED 0x01
49 #define MAP_PRIVATE 0x02
50 #define MAP_ANONYMOUS 0x20
55 #define _SC_PAGESIZE 1
56 #define _SC_PHYS_PAGES 2
57 #define _SC_OPEN_MAX 3
58 #if !defined(SSIZE_MAX)
59 #define SSIZE_MAX 0x7fffffffL
77 # if defined(__BORLANDC__)
78 # define chsize(file,length) chsize(file,length)
80 # define chsize(file,length) _chsize(file,length)
85 #if defined(_VISUALC_) && (_MSC_VER >= 1400)
86 # define access(path,mode) _access_s(path,mode)
95 #if !defined(closedir)
96 # define closedir(directory) NTCloseDirectory(directory)
99 # define fdopen _fdopen
102 # define fileno _fileno
104 #if !defined(fseek) && !defined(__MINGW32__)
105 #if defined(MAGICKCORE_WINDOWS_SUPPORT) && !defined(Windows95) && \
106 !(defined(_MSC_VER) && (_MSC_VER < 1400)) && \
107 !(defined(__MSVCRT_VERSION__) && (__MSVCRT_VERSION__ < 0x800))
108 # define fseek _fseeki64
111 #if !defined(fstat) && !defined(__BORLANDC__)
112 #if defined(MAGICKCORE_WINDOWS_SUPPORT) && !defined(Windows95) && \
113 !(defined(_MSC_VER) && (_MSC_VER < 1400)) && \
114 !(defined(__MSVCRT_VERSION__) && (__MSVCRT_VERSION__ < 0x800))
115 # define fstat _fstati64
117 # define fstat _fstat
121 # define fsync _commit
123 #if !defined(ftell) && !defined(__MINGW32__)
124 #if defined(MAGICKCORE_WINDOWS_SUPPORT) && !defined(Windows95) && \
125 !(defined(_MSC_VER) && (_MSC_VER < 1400)) && \
126 !(defined(__MSVCRT_VERSION__) && (__MSVCRT_VERSION__ < 0x800))
127 # define ftell _ftelli64
130 #if !defined(ftruncate)
131 # define ftruncate(file,length) NTTruncateFile(file,length)
134 # define getcwd _getcwd
137 # define getpid _getpid
140 # define hypot _hypot
143 # define inline __inline
146 # define isatty _isatty
148 #if !defined(locale_t)
149 #define locale_t _locale_t
151 #if defined(MAGICKCORE_WINDOWS_SUPPORT) && !defined(Windows95) && \
152 !(defined(_MSC_VER) && (_MSC_VER < 1400)) && \
153 !(defined(__MSVCRT_VERSION__) && (__MSVCRT_VERSION__ < 0x800))
155 # define lseek _lseeki64
159 # define lseek _lseek
162 #if !defined(MAGICKCORE_LTDL_DELEGATE)
163 #if !defined(lt_dlclose)
164 # define lt_dlclose(handle) NTCloseLibrary(handle)
166 #if !defined(lt_dlerror)
167 # define lt_dlerror() NTGetLibraryError()
169 #if !defined(lt_dlexit)
170 # define lt_dlexit() NTExitLibrary()
172 #if !defined(lt_dlinit)
173 # define lt_dlinit() NTInitializeLibrary()
175 #if !defined(lt_dlopen)
176 # define lt_dlopen(filename) NTOpenLibrary(filename)
178 #if !defined(lt_dlsetsearchpath)
179 # define lt_dlsetsearchpath(path) NTSetSearchPath(path)
181 #if !defined(lt_dlsym)
182 # define lt_dlsym(handle,name) NTGetLibrarySymbol(handle,name)
186 # define mkdir _mkdir
189 # define mmap(address,length,protection,access,file,offset) \
190 NTMapMemory(address,length,protection,access,file,offset)
193 # define msync(address,length,flags) NTSyncMemory(address,length,flags)
196 # define munmap(address,length) NTUnmapMemory(address,length)
198 #if !defined(opendir)
199 # define opendir(directory) NTOpenDirectory(directory)
205 # define pclose _pclose
208 # define popen _popen
210 #if !defined(fprintf_l)
211 #define fprintf_l _fprintf_s_l
214 # define read(fd,buffer,count) _read(fd,buffer,(unsigned int) count)
216 #if !defined(readdir)
217 # define readdir(directory) NTReadDirectory(directory)
219 #if !defined(seekdir)
220 # define seekdir(directory,offset) NTSeekDirectory(directory,offset)
222 #if !defined(setmode)
223 # define setmode _setmode
225 #if !defined(spawnvp)
226 # define spawnvp _spawnvp
228 #if !defined(strtod_l)
229 #define strtod_l _strtod_l
231 #if !defined(stat) && !defined(__BORLANDC__)
232 #if defined(MAGICKCORE_WINDOWS_SUPPORT) && !defined(Windows95) && \
233 !(defined(_MSC_VER) && (_MSC_VER < 1400)) && \
234 !(defined(__MSVCRT_VERSION__) && (__MSVCRT_VERSION__ < 0x800))
235 # define stat _stati64
240 #if !defined(strcasecmp)
241 # define strcasecmp _stricmp
243 #if !defined(strncasecmp)
244 # define strncasecmp _strnicmp
246 #if !defined(sysconf)
247 # define sysconf(name) NTSystemConfiguration(name)
249 #if defined(MAGICKCORE_WINDOWS_SUPPORT) && !defined(Windows95) && \
250 !(defined(_MSC_VER) && (_MSC_VER < 1400)) && \
251 !(defined(__MSVCRT_VERSION__) && (__MSVCRT_VERSION__ < 0x800))
252 # define tell _telli64
256 #if !defined(telldir)
257 # define telldir(directory) NTTellDirectory(directory)
259 #if !defined(tempnam)
260 # define tempnam _tempnam_s
263 # define umask _umask
266 # define unlink _unlink
269 # define utime _utime
271 #if !defined(vfprintf_l)
272 #define vfprintf_l _vfprintf_l
274 #if !defined(vsnprintf)
275 #if !defined(_MSC_VER) || (defined(_MSC_VER) && _MSC_VER < 1500)
276 #define vsnprintf _vsnprintf
279 #if !defined(vsnprintf_l)
280 #define vsnprintf_l _vsnprintf_l
283 # define write(fd,buffer,count) _write(fd,buffer,(unsigned int) count)
285 #if !defined(wstat) && !defined(__BORLANDC__)
286 #if defined(MAGICKCORE_WINDOWS_SUPPORT) && !defined(Windows95) && \
287 !(defined(_MSC_VER) && (_MSC_VER < 1400)) && \
288 !(defined(__MSVCRT_VERSION__) && (__MSVCRT_VERSION__ < 0x800))
289 # define wstat _wstati64
291 # define wstat _wstat
295 #if defined(__BORLANDC__)
299 #define _O_SEQUENTIAL 0
300 #undef _O_SHORT_LIVED
301 #define _O_SHORT_LIVED 0
303 #define _O_TEMPORARY 0
312 **NTArgvToUTF8(
const int argc,
wchar_t **);
315 *NTGhostscriptDLLVectors(
void);
318 NTGhostscriptUnLoadDLL(
void);
321 NTErrorHandler(
const ExceptionType,
const char *,
const char *),
322 NTWarningHandler(
const ExceptionType,
const char *,
const char *);
325 #if defined(__cplusplus) || defined(c_plusplus)
#define DirectorySeparator
Definition: studio.h:266
MagickExport void LockSemaphoreInfo(SemaphoreInfo *semaphore_info)
Definition: semaphore.c:345
#define MagickExport
Definition: method-attribute.h:80
Definition: delegate-private.h:26
#define magick_unreferenced(x)
Definition: method-attribute.h:106
@ HeadPath
Definition: utility.h:30
#define GetMagickModule()
Definition: log.h:29
MagickExport ssize_t FormatLocaleString(char *magick_restrict string, const size_t length, const char *magick_restrict format,...)
Definition: locale.c:502
MagickExport const char * GetClientPath(void)
Definition: client.c:87
MagickExport void * ResizeQuantumMemory(void *memory, const size_t count, const size_t quantum)
Definition: memory.c:1316
#define DirectoryListSeparator
Definition: studio.h:267
MagickExport int Exit(int)
Definition: delegate-private.h:53
MagickExport void AsynchronousResourceComponentTerminus(void)
Definition: resource.c:422
MagickExport char * DestroyString(char *string)
Definition: string.c:820
MagickExport void GetPathComponent(const char *path, PathType type, char *component)
Definition: utility.c:1208
@ MagickTrue
Definition: magick-type.h:194
MagickExport size_t CopyMagickString(char *destination, const char *source, const size_t length)
Definition: string.c:752
@ TraceEvent
Definition: log.h:38
MagickExport void * AcquireMagickMemory(const size_t size)
Definition: memory.c:473
Definition: semaphore.c:60
#define MagickPackageName
Definition: version.h:28
@ CacheFatalError
Definition: exception.h:87
struct _GhostInfo GhostInfo
@ ConfigureEvent
Definition: log.h:43
MagickExport int LocaleCompare(const char *p, const char *q)
Definition: locale.c:1440
#define MagickPrivate
Definition: method-attribute.h:81
@ MagickFalse
Definition: magick-type.h:193
MagickExport MagickBooleanType IsEventLogging(void)
Definition: log.c:716
MagickExport char * GetExceptionMessage(const int error)
Definition: exception.c:471
MagickExport const char * GetClientName(void)
Definition: client.c:64
ExceptionType
Definition: exception.h:29
MagickExport void ActivateSemaphoreInfo(SemaphoreInfo **semaphore_info)
Definition: semaphore.c:97
MagickExport void DestroySemaphoreInfo(SemaphoreInfo **semaphore_info)
Definition: semaphore.c:293
static int StringToInteger(const char *magick_restrict value)
Definition: string-private.h:63
MagickBooleanType
Definition: magick-type.h:192
MagickExport size_t ConcatenateMagickString(char *destination, const char *source, const size_t length)
Definition: string.c:424
MagickExport void * RelinquishMagickMemory(void *memory)
Definition: memory.c:1077
MagickExport MagickBooleanType IsPathAccessible(const char *path)
Definition: utility.c:1460
#define MAGICKCORE_PACKAGE_NAME
Definition: magick-baseconfig.h:1233
#define MAGICKCORE_QUANTUM_DEPTH
Definition: magick-type.h:28
#define MagickDLLCall
Definition: delegate-private.h:48
MagickExport char * GetEnvironmentValue(const char *name)
Definition: string.c:1242
#define ThrowFatalException(severity, tag)
Definition: exception-private.h:42
MagickExport void UnlockSemaphoreInfo(SemaphoreInfo *semaphore_info)
Definition: semaphore.c:450
static void * AcquireCriticalMemory(const size_t size)
Definition: memory-private.h:52
MagickExport MagickBooleanType LogMagickEvent(const LogEventType type, const char *module, const char *function, const size_t line, const char *format,...)
Definition: log.c:1399
MagickExport void MagickCoreGenesis(const char *path, const MagickBooleanType establish_signal_handlers)
Definition: magick.c:1227
MagickExport void MagickCoreTerminus(void)
Definition: magick.c:1365
#define MaxTextExtent
Definition: method-attribute.h:89
const char * module
Definition: static.c:70
@ ResourceLimitFatalError
Definition: exception.h:78
MagickExport char * AcquireString(const char *source)
Definition: string.c:125
struct gs_main_instance_s gs_main_instance
Definition: delegate-private.h:40
#define MagickLibVersionText
Definition: version.h:31
#define MAP_FAILED
Definition: blob.c:88
MagickExport void * AcquireQuantumMemory(const size_t count, const size_t quantum)
Definition: memory.c:544
ssize_t MagickOffsetType
Definition: magick-type.h:135
#define MagickPathExtent
Definition: magick-type.h:31