MagickCore
6.9.11-60
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_PAGE_SIZE 1
56 #define _SC_PHYS_PAGES 2
57 #define _SC_OPEN_MAX 3
58 #if !defined(SSIZE_MAX)
60 # define SSIZE_MAX LLONG_MAX
62 # define SSIZE_MAX LONG_MAX
81 # if defined(__BORLANDC__)
82 # define chsize(file,length) chsize(file,length)
84 # define chsize(file,length) _chsize(file,length)
89 #if defined(_VISUALC_) && (_MSC_VER >= 1400)
90 # define access(path,mode) _access_s(path,mode)
99 #if !defined(closedir)
100 # define closedir(directory) NTCloseDirectory(directory)
103 # define fdopen _fdopen
106 # define fileno _fileno
108 #if !defined(freelocale)
109 # define freelocale _free_locale
111 #if !defined(fseek) && !defined(__MINGW32__)
112 #if defined(MAGICKCORE_WINDOWS_SUPPORT) && \
113 !(defined(_MSC_VER) && (_MSC_VER < 1400)) && \
114 !(defined(__MSVCRT_VERSION__) && (__MSVCRT_VERSION__ < 0x800))
115 # define fseek _fseeki64
118 #if !defined(fstat) && !defined(__BORLANDC__)
119 #if defined(MAGICKCORE_WINDOWS_SUPPORT) && \
120 !(defined(_MSC_VER) && (_MSC_VER < 1400)) && \
121 !(defined(__MSVCRT_VERSION__) && (__MSVCRT_VERSION__ < 0x800))
122 # define fstat _fstati64
124 # define fstat _fstat
128 # define fsync _commit
130 #if !defined(ftell) && !defined(__MINGW32__)
131 #if defined(MAGICKCORE_WINDOWS_SUPPORT) && \
132 !(defined(_MSC_VER) && (_MSC_VER < 1400)) && \
133 !(defined(__MSVCRT_VERSION__) && (__MSVCRT_VERSION__ < 0x800))
134 # define ftell _ftelli64
137 #if !defined(ftruncate)
138 # define ftruncate(file,length) NTTruncateFile(file,length)
141 # define getcwd _getcwd
144 # define getpid _getpid
147 # define hypot _hypot
150 # define inline __inline
153 # define isatty _isatty
155 #if !defined(locale_t)
156 #define locale_t _locale_t
158 #if defined(MAGICKCORE_WINDOWS_SUPPORT) && \
159 !(defined(_MSC_VER) && (_MSC_VER < 1400)) && \
160 !(defined(__MSVCRT_VERSION__) && (__MSVCRT_VERSION__ < 0x800))
162 # define lseek _lseeki64
166 # define lseek _lseek
169 #if !defined(MAGICKCORE_LTDL_DELEGATE)
170 #if !defined(lt_dlclose)
171 # define lt_dlclose(handle) NTCloseLibrary(handle)
173 #if !defined(lt_dlerror)
174 # define lt_dlerror() NTGetLibraryError()
176 #if !defined(lt_dlexit)
177 # define lt_dlexit() NTExitLibrary()
179 #if !defined(lt_dlinit)
180 # define lt_dlinit() NTInitializeLibrary()
182 #if !defined(lt_dlopen)
183 # define lt_dlopen(filename) NTOpenLibrary(filename)
185 #if !defined(lt_dlsetsearchpath)
186 # define lt_dlsetsearchpath(path) NTSetSearchPath(path)
188 #if !defined(lt_dlsym)
189 # define lt_dlsym(handle,name) NTGetLibrarySymbol(handle,name)
193 # define mkdir _mkdir
196 # define mmap(address,length,protection,access,file,offset) \
197 NTMapMemory(address,length,protection,access,file,offset)
200 # define munmap(address,length) NTUnmapMemory(address,length)
202 #if !defined(opendir)
203 # define opendir(directory) NTOpenDirectory(directory)
209 # define pclose _pclose
212 # define popen _popen
214 #if !defined(fprintf_l)
215 #define fprintf_l _fprintf_s_l
218 # define read(fd,buffer,count) _read(fd,buffer,(unsigned int) count)
220 #if !defined(readdir)
221 # define readdir(directory) NTReadDirectory(directory)
223 #if !defined(setmode)
224 # define setmode _setmode
226 #if !defined(spawnvp)
227 # define spawnvp _spawnvp
229 #if !defined(strtod_l)
230 #define strtod_l _strtod_l
232 #if !defined(stat) && !defined(__BORLANDC__)
233 #if defined(MAGICKCORE_WINDOWS_SUPPORT) && \
234 !(defined(_MSC_VER) && (_MSC_VER < 1400)) && \
235 !(defined(__MSVCRT_VERSION__) && (__MSVCRT_VERSION__ < 0x800))
236 # define stat _stati64
241 #if !defined(strcasecmp)
242 # define strcasecmp _stricmp
244 #if !defined(strncasecmp)
245 # define strncasecmp _strnicmp
247 #if !defined(sysconf)
248 # define sysconf(name) NTSystemConfiguration(name)
250 #if defined(MAGICKCORE_WINDOWS_SUPPORT) && \
251 !(defined(_MSC_VER) && (_MSC_VER < 1400)) && \
252 !(defined(__MSVCRT_VERSION__) && (__MSVCRT_VERSION__ < 0x800))
253 # define tell _telli64
257 #if !defined(tempnam)
258 # define tempnam _tempnam_s
260 #if !defined(tolower_l)
261 #define tolower_l _tolower_l
263 #if !defined(toupper_l)
264 #define toupper_l _toupper_l
267 # define umask _umask
270 # define unlink _unlink
273 # define utime _utime
275 #if !defined(vfprintf_l)
276 #define vfprintf_l _vfprintf_l
278 #if !defined(vsnprintf)
279 #if !defined(_MSC_VER) || (defined(_MSC_VER) && _MSC_VER < 1500)
280 #define vsnprintf _vsnprintf
283 #if !defined(vsnprintf_l)
284 #define vsnprintf_l _vsnprintf_l
287 # define write(fd,buffer,count) _write(fd,buffer,(unsigned int) count)
289 #if !defined(wstat) && !defined(__BORLANDC__)
290 #if defined(MAGICKCORE_WINDOWS_SUPPORT) && \
291 !(defined(_MSC_VER) && (_MSC_VER < 1400)) && \
292 !(defined(__MSVCRT_VERSION__) && (__MSVCRT_VERSION__ < 0x800))
293 # define wstat _wstati64
295 # define wstat _wstat
299 #if defined(__BORLANDC__)
303 #define _O_SEQUENTIAL 0
304 #undef _O_SHORT_LIVED
305 #define _O_SHORT_LIVED 0
307 #define _O_TEMPORARY 0
316 **NTArgvToUTF8(
const int argc,
wchar_t **);
319 *NTGhostscriptDLLVectors(
void);
322 NTGhostscriptUnLoadDLL(
void);
325 NTErrorHandler(
const ExceptionType,
const char *,
const char *),
326 NTWarningHandler(
const ExceptionType,
const char *,
const char *);
330 #if defined(__cplusplus) || defined(c_plusplus)
#define DirectorySeparator
Definition: studio.h:274
MagickExport void LockSemaphoreInfo(SemaphoreInfo *semaphore_info)
Definition: semaphore.c:293
#define MagickExport
Definition: method-attribute.h:80
Definition: delegate-private.h:28
#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:497
MagickExport const char * GetClientPath(void)
Definition: client.c:88
MagickExport void * ResizeQuantumMemory(void *memory, const size_t count, const size_t quantum)
Definition: memory.c:1447
#define DirectoryListSeparator
Definition: studio.h:275
Definition: delegate-private.h:55
MagickExport void AsynchronousResourceComponentTerminus(void)
Definition: resource.c:466
MagickExport char * DestroyString(char *string)
Definition: string.c:808
MagickExport void GetPathComponent(const char *path, PathType type, char *component)
Definition: utility.c:1218
@ MagickTrue
Definition: magick-type.h:205
@ TraceEvent
Definition: log.h:38
MagickExport void * AcquireMagickMemory(const size_t size)
Definition: memory.c:552
Definition: semaphore.c:61
MagickExport size_t ConcatenateMagickString(char *magick_restrict destination, const char *magick_restrict source, const size_t length)
Definition: string.c:425
#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:1435
#define MagickPrivate
Definition: method-attribute.h:81
@ MagickFalse
Definition: magick-type.h:204
MagickExport MagickBooleanType IsEventLogging(void)
Definition: log.c:725
MagickExport char * GetExceptionMessage(const int error)
Definition: exception.c:530
MagickExport const char * GetClientName(void)
Definition: client.c:65
ExceptionType
Definition: exception.h:29
MagickExport void ActivateSemaphoreInfo(SemaphoreInfo **semaphore_info)
Definition: semaphore.c:98
MagickExport void DestroySemaphoreInfo(SemaphoreInfo **semaphore_info)
Definition: semaphore.c:351
static int StringToInteger(const char *magick_restrict value)
Definition: string-private.h:103
MagickBooleanType
Definition: magick-type.h:203
MagickExport void * RelinquishMagickMemory(void *memory)
Definition: memory.c:1162
MagickExport MagickBooleanType IsPathAccessible(const char *path)
Definition: utility.c:1472
#define MAGICKCORE_PACKAGE_NAME
Definition: magick-baseconfig.h:1246
MagickExport void * AcquireCriticalMemory(const size_t size)
Definition: memory.c:626
#define MAGICKCORE_QUANTUM_DEPTH
Definition: magick-type.h:28
#define MagickDLLCall
Definition: delegate-private.h:50
MagickExport char * GetEnvironmentValue(const char *name)
Definition: string.c:1150
#define ThrowFatalException(severity, tag)
Definition: exception-private.h:42
MagickExport void UnlockSemaphoreInfo(SemaphoreInfo *semaphore_info)
Definition: semaphore.c:449
MagickExport size_t CopyMagickString(char *magick_restrict destination, const char *magick_restrict source, const size_t length)
Definition: string.c:751
MagickExport MagickBooleanType LogMagickEvent(const LogEventType type, const char *module, const char *function, const size_t line, const char *format,...)
Definition: log.c:1420
MagickExport void MagickCoreGenesis(const char *path, const MagickBooleanType establish_signal_handlers)
Definition: magick.c:1230
MagickExport void MagickCoreTerminus(void)
Definition: magick.c:1369
#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:42
#define MagickMin(x, y)
Definition: image-private.h:37
#define MagickLibVersionText
Definition: version.h:31
#define MAP_FAILED
Definition: blob.c:89
MagickExport void * AcquireQuantumMemory(const size_t count, const size_t quantum)
Definition: memory.c:665
ssize_t MagickOffsetType
Definition: magick-type.h:139
#define MagickPathExtent
Definition: magick-type.h:31