/*
- Copyright 1999-2014 ImageMagick Studio LLC, a non-profit organization
+ Copyright 1999-2017 ImageMagick Studio LLC, a non-profit organization
dedicated to making software imaging solutions freely available.
You may not use this file except in compliance with the License.
obtain a copy of the License at
- http://www.imagemagick.org/script/license.php
+ https://www.imagemagick.org/script/license.php
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
MagickCore Windows NT utility methods.
*/
-#ifndef _MAGICKCORE_NT_BASE_H
-#define _MAGICKCORE_NT_BASE_H
+#ifndef MAGICKCORE_NT_BASE_H
+#define MAGICKCORE_NT_BASE_H
#include "MagickCore/exception.h"
#include "MagickCore/geometry.h"
#include <io.h>
#include <process.h>
#include <errno.h>
+#include <malloc.h>
+#include <sys/utime.h>
#if defined(_DEBUG) && !defined(__MINGW32__) && !defined(__MINGW64__)
#include <crtdbg.h>
#endif
1310 Visual c++ .NET 2003
1400 Visual C++ 2005
1500 Visual C++ 2008
+ 1600 Visual C++ 2010
+ 1700 Visual C++ 2012
+ 1800 Visual C++ 2013
+ 1900 Visual C++ 2015
*/
#if !defined(chsize)
#if !defined(closedir)
# define closedir(directory) NTCloseDirectory(directory)
#endif
+#define MAGICKCORE_HAVE_ERF
+#if defined(_VISUALC_) && (_MSC_VER < 1700)
+# define erf(x) NTErf(x)
+#endif
#if !defined(fdopen)
# define fdopen _fdopen
#endif
#endif
#if !defined(fseek) && !defined(__MINGW32__) && !defined(__MINGW64__)
#if defined(MAGICKCORE_WINDOWS_SUPPORT) && !defined(Windows95) && \
- !(defined(_MSC_VER) && (_MSC_VER < 1400)) && (__MSVCRT_VERSION__ < 0x800)
+ !(defined(_MSC_VER) && (_MSC_VER < 1400)) && \
+ !(defined(__MSVCRT_VERSION__) && (__MSVCRT_VERSION__ < 0x800))
# define fseek _fseeki64
#endif
#endif
#if !defined(fstat) && !defined(__BORLANDC__)
#if defined(MAGICKCORE_WINDOWS_SUPPORT) && !defined(Windows95) && \
- !(defined(_MSC_VER) && (_MSC_VER < 1400)) && (__MSVCRT_VERSION__ < 0x800)
+ !(defined(_MSC_VER) && (_MSC_VER < 1400)) && \
+ !(defined(__MSVCRT_VERSION__) && (__MSVCRT_VERSION__ < 0x800))
# define fstat _fstati64
#else
# define fstat _fstat
#endif
#if !defined(ftell) && !defined(__MINGW32__) && !defined(__MINGW64__)
#if defined(MAGICKCORE_WINDOWS_SUPPORT) && !defined(Windows95) && \
- !(defined(_MSC_VER) && (_MSC_VER < 1400)) && (__MSVCRT_VERSION__ < 0x800)
+ !(defined(_MSC_VER) && (_MSC_VER < 1400)) && \
+ !(defined(__MSVCRT_VERSION__) && (__MSVCRT_VERSION__ < 0x800))
# define ftell _ftelli64
#endif
#endif
#if !defined(hypot)
# define hypot _hypot
#endif
-#if !defined(inline)
-# define inline __inline
-#endif
#if !defined(isatty)
# define isatty _isatty
#endif
#define locale_t _locale_t
#endif
#if defined(MAGICKCORE_WINDOWS_SUPPORT) && !defined(Windows95) && \
- !(defined(_MSC_VER) && (_MSC_VER < 1400)) && (__MSVCRT_VERSION__ < 0x800)
+ !(defined(_MSC_VER) && (_MSC_VER < 1400)) && \
+ !(defined(__MSVCRT_VERSION__) && (__MSVCRT_VERSION__ < 0x800))
+#if !defined(lseek)
# define lseek _lseeki64
+#endif
#else
+#if !defined(lseek)
# define lseek _lseek
#endif
+#endif
#if !defined(MAGICKCORE_LTDL_DELEGATE)
#if !defined(lt_dlclose)
# define lt_dlclose(handle) NTCloseLibrary(handle)
#define fprintf_l _fprintf_s_l
#endif
#if !defined(read)
-# define read _read
+# define read(fd,buffer,count) _read(fd,buffer,(unsigned int) count)
#endif
#if !defined(readdir)
# define readdir(directory) NTReadDirectory(directory)
#endif
#if !defined(stat) && !defined(__BORLANDC__)
#if defined(MAGICKCORE_WINDOWS_SUPPORT) && !defined(Windows95) && \
- !(defined(_MSC_VER) && (_MSC_VER < 1400)) && (__MSVCRT_VERSION__ < 0x800)
+ !(defined(_MSC_VER) && (_MSC_VER < 1400)) && \
+ !(defined(__MSVCRT_VERSION__) && (__MSVCRT_VERSION__ < 0x800))
# define stat _stati64
#else
# define stat _stat
# define sysconf(name) NTSystemConfiguration(name)
#endif
#if defined(MAGICKCORE_WINDOWS_SUPPORT) && !defined(Windows95) && \
- !(defined(_MSC_VER) && (_MSC_VER < 1400)) && (__MSVCRT_VERSION__ < 0x800)
+ !(defined(_MSC_VER) && (_MSC_VER < 1400)) && \
+ !(defined(__MSVCRT_VERSION__) && (__MSVCRT_VERSION__ < 0x800))
# define tell _telli64
#else
# define tell _tell
#if !defined(tempnam)
# define tempnam _tempnam_s
#endif
+#if !defined(umask)
+# define umask _umask
+#endif
+#if !defined(unlink)
+# define unlink _unlink
+#endif
+#if !defined(utime)
+# define utime(filename,time) _utime(filename,(struct _utimbuf*) time)
+#endif
#if !defined(vfprintf_l)
#define vfprintf_l _vfprintf_l
#endif
#define vsnprintf_l _vsnprintf_l
#endif
#if !defined(write)
-# define write _write
+# define write(fd,buffer,count) _write(fd,buffer,(unsigned int) count)
#endif
#if !defined(wstat) && !defined(__BORLANDC__)
#if defined(MAGICKCORE_WINDOWS_SUPPORT) && !defined(Windows95) && \
- !(defined(_MSC_VER) && (_MSC_VER < 1400)) && (__MSVCRT_VERSION__ < 0x800)
+ !(defined(_MSC_VER) && (_MSC_VER < 1400)) && \
+ !(defined(__MSVCRT_VERSION__) && (__MSVCRT_VERSION__ < 0x800))
# define wstat _wstati64
#else
# define wstat _wstat
#endif
#endif
-#if defined(_MT) && defined(MAGICKCORE_WINDOWS_SUPPORT)
-# define SAFE_GLOBAL __declspec(thread)
-#else
-# define SAFE_GLOBAL
-#endif
-
#if defined(__BORLANDC__)
#undef _O_RANDOM
#define _O_RANDOM 0
extern MagickExport const GhostInfo_
*NTGhostscriptDLLVectors(void);
-extern MagickExport int
- NTGhostscriptUnLoadDLL(void);
-
extern MagickExport void
NTErrorHandler(const ExceptionType,const char *,const char *),
+ NTGhostscriptUnLoadDLL(void),
NTWarningHandler(const ExceptionType,const char *,const char *);
#endif