MagickCore
6.9.12-38
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 #if !defined(_CRT_SECURE_NO_DEPRECATE)
33 # define _CRT_SECURE_NO_DEPRECATE 1
43 #include <sys/utime.h>
44 #if defined(_DEBUG) && !defined(__MINGW32__)
48 #define PROT_READ 0x01
49 #define PROT_WRITE 0x02
50 #define MAP_SHARED 0x01
51 #define MAP_PRIVATE 0x02
52 #define MAP_ANONYMOUS 0x20
57 #define _SC_PAGE_SIZE 1
58 #define _SC_PHYS_PAGES 2
59 #define _SC_OPEN_MAX 3
60 #if !defined(SSIZE_MAX)
62 # define SSIZE_MAX LLONG_MAX
64 # define SSIZE_MAX LONG_MAX
68 # define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
72 # if defined(__BORLANDC__)
73 # define chsize(file,length) chsize(file,length)
75 # define chsize(file,length) _chsize(file,length)
80 #if defined(_VISUALC_) && (_MSC_VER >= 1400)
81 # define access(path,mode) _access_s(path,mode)
90 #if !defined(closedir)
91 # define closedir(directory) NTCloseDirectory(directory)
94 # define fdopen _fdopen
97 # define fileno _fileno
99 #if !defined(freelocale)
100 # define freelocale _free_locale
102 #if !defined(fseek) && !defined(__MINGW32__)
103 #if defined(MAGICKCORE_WINDOWS_SUPPORT) && \
104 !(defined(_MSC_VER) && (_MSC_VER < 1400)) && \
105 !(defined(__MSVCRT_VERSION__) && (__MSVCRT_VERSION__ < 0x800))
106 # define fseek _fseeki64
109 #if !defined(fstat) && !defined(__BORLANDC__)
110 #if defined(MAGICKCORE_WINDOWS_SUPPORT) && \
111 !(defined(_MSC_VER) && (_MSC_VER < 1400)) && \
112 !(defined(__MSVCRT_VERSION__) && (__MSVCRT_VERSION__ < 0x800))
113 # define fstat _fstati64
115 # define fstat _fstat
119 # define fsync _commit
121 #if !defined(ftell) && !defined(__MINGW32__)
122 #if defined(MAGICKCORE_WINDOWS_SUPPORT) && \
123 !(defined(_MSC_VER) && (_MSC_VER < 1400)) && \
124 !(defined(__MSVCRT_VERSION__) && (__MSVCRT_VERSION__ < 0x800))
125 # define ftell _ftelli64
128 #if !defined(ftruncate)
129 # define ftruncate(file,length) NTTruncateFile(file,length)
132 # define getcwd _getcwd
135 # define getpid _getpid
138 # define hypot _hypot
141 # define inline __inline
144 # define isatty _isatty
146 #if !defined(locale_t)
147 #define locale_t _locale_t
149 #if defined(MAGICKCORE_WINDOWS_SUPPORT) && \
150 !(defined(_MSC_VER) && (_MSC_VER < 1400)) && \
151 !(defined(__MSVCRT_VERSION__) && (__MSVCRT_VERSION__ < 0x800))
153 # define lseek _lseeki64
157 # define lseek _lseek
160 #if !defined(MAGICKCORE_LTDL_DELEGATE)
161 #if !defined(lt_dlclose)
162 # define lt_dlclose(handle) NTCloseLibrary(handle)
164 #if !defined(lt_dlerror)
165 # define lt_dlerror() NTGetLibraryError()
167 #if !defined(lt_dlexit)
168 # define lt_dlexit() NTExitLibrary()
170 #if !defined(lt_dlinit)
171 # define lt_dlinit() NTInitializeLibrary()
173 #if !defined(lt_dlopen)
174 # define lt_dlopen(filename) NTOpenLibrary(filename)
176 #if !defined(lt_dlsetsearchpath)
177 # define lt_dlsetsearchpath(path) NTSetSearchPath(path)
179 #if !defined(lt_dlsym)
180 # define lt_dlsym(handle,name) NTGetLibrarySymbol(handle,name)
184 # define mkdir _mkdir
187 # define MAGICKCORE_HAVE_MMAP 1
188 # define mmap(address,length,protection,access,file,offset) \
189 NTMapMemory(address,length,protection,access,file,offset)
192 # define munmap(address,length) NTUnmapMemory(address,length)
194 #if !defined(opendir)
195 # define opendir(directory) NTOpenDirectory(directory)
201 # define pclose _pclose
204 # define popen _popen
207 # define putenv _putenv
209 #if !defined(fprintf_l)
210 #define fprintf_l _fprintf_s_l
213 # define read(fd,buffer,count) _read(fd,buffer,(unsigned int) count)
215 #if !defined(readdir)
216 # define readdir(directory) NTReadDirectory(directory)
218 #if !defined(setmode)
219 # define setmode _setmode
221 #if !defined(spawnvp)
222 # define spawnvp _spawnvp
224 #if !defined(strtod_l)
225 #define strtod_l _strtod_l
227 #if !defined(stat) && !defined(__BORLANDC__)
228 #if defined(MAGICKCORE_WINDOWS_SUPPORT) && \
229 !(defined(_MSC_VER) && (_MSC_VER < 1400)) && \
230 !(defined(__MSVCRT_VERSION__) && (__MSVCRT_VERSION__ < 0x800))
231 # define stat _stati64
236 #if !defined(strcasecmp)
237 # define strcasecmp _stricmp
239 #if !defined(strncasecmp)
240 # define strncasecmp _strnicmp
242 #if !defined(sysconf)
243 # define sysconf(name) NTSystemConfiguration(name)
244 # define MAGICKCORE_HAVE_SYSCONF 1
246 #if defined(MAGICKCORE_WINDOWS_SUPPORT) && \
247 !(defined(_MSC_VER) && (_MSC_VER < 1400)) && \
248 !(defined(__MSVCRT_VERSION__) && (__MSVCRT_VERSION__ < 0x800))
249 # define tell _telli64
253 #if !defined(tempnam)
254 # define tempnam _tempnam_s
256 #if !defined(tolower_l)
257 #define tolower_l _tolower_l
259 #if !defined(toupper_l)
260 #define toupper_l _toupper_l
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) && \
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 *);
326 #if defined(__cplusplus) || defined(c_plusplus)
#define DirectorySeparator
Definition: studio.h:270
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:1458
#define DirectoryListSeparator
Definition: studio.h:271
Definition: delegate-private.h:55
MagickExport void AsynchronousResourceComponentTerminus(void)
Definition: resource.c:466
MagickExport char * DestroyString(char *string)
Definition: string.c:821
MagickExport void GetPathComponent(const char *path, PathType type, char *component)
Definition: utility.c:1218
@ MagickTrue
Definition: magick-type.h:201
@ 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:426
#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:200
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:199
MagickExport void * RelinquishMagickMemory(void *memory)
Definition: memory.c:1162
MagickExport MagickBooleanType IsPathAccessible(const char *path)
Definition: utility.c:1489
#define MAGICKCORE_PACKAGE_NAME
Definition: magick-baseconfig.h:1284
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:1163
#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:764
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:1374
#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:126
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:135
#define MagickPathExtent
Definition: magick-type.h:31