1 /* 2 Copyright 1999-2021 ImageMagick Studio LLC, a non-profit organization 3 dedicated to making software imaging solutions freely available. 4 5 You may not use this file except in compliance with the License. You may 6 obtain a copy of the License at 7 8 https://imagemagick.org/script/license.php 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15 16 MagickCore Windows NT private methods. 17 */ 18 #ifndef MAGICKCORE_NT_BASE_PRIVATE_H 19 #define MAGICKCORE_NT_BASE_PRIVATE_H 20 21 #include "MagickCore/delegate.h" 22 #include "MagickCore/delegate-private.h" 23 #include "MagickCore/exception.h" 24 #include "MagickCore/splay-tree.h" 25 26 #if defined(__cplusplus) || defined(c_plusplus) 27 extern "C" { 28 #endif 29 30 #if defined(MAGICKCORE_WINDOWS_SUPPORT) 31 32 #if !defined(XS_VERSION) 33 struct dirent 34 { 35 char 36 d_name[2048]; 37 38 int 39 d_namlen; 40 }; 41 42 typedef struct _DIR 43 { 44 HANDLE 45 hSearch; 46 47 WIN32_FIND_DATAW 48 Win32FindData; 49 50 BOOL 51 firsttime; 52 53 struct dirent 54 file_info; 55 } DIR; 56 57 #if !defined(__MINGW32__) 58 struct timeval; 59 60 struct timezone 61 { 62 int 63 tz_minuteswest, 64 tz_dsttime; 65 }; 66 #endif 67 68 #endif 69 70 #if defined(MAGICKCORE_BZLIB_DELEGATE) 71 # if defined(_WIN32) 72 # define BZ_IMPORT 1 73 # endif 74 #endif 75 76 extern MagickPrivate char 77 *NTGetLastError(void); 78 79 #if !defined(MAGICKCORE_LTDL_DELEGATE) 80 extern MagickPrivate const char 81 *NTGetLibraryError(void); 82 #endif 83 84 #if !defined(XS_VERSION) 85 extern MagickPrivate const char 86 *NTGetLibraryError(void); 87 88 extern MagickPrivate DIR 89 *NTOpenDirectory(const char *); 90 91 extern MagickPrivate double 92 NTElapsedTime(void), 93 NTErf(double), 94 NTUserTime(void); 95 96 extern MagickPrivate int 97 #if !defined(__MINGW32__) 98 gettimeofday(struct timeval *,struct timezone *), 99 #endif 100 NTCloseDirectory(DIR *), 101 NTCloseLibrary(void *), 102 NTControlHandler(void), 103 NTExitLibrary(void), 104 NTTruncateFile(int,off_t), 105 NTGhostscriptDLL(char *,int), 106 NTGhostscriptFonts(char *,int), 107 NTGhostscriptLoadDLL(void), 108 NTInitializeLibrary(void), 109 NTSetSearchPath(const char *), 110 NTUnmapMemory(void *,size_t), 111 NTSystemCommand(const char *,char *); 112 113 extern MagickPrivate ssize_t 114 NTSystemConfiguration(int); 115 116 extern MagickPrivate MagickBooleanType 117 NTGatherRandomData(const size_t,unsigned char *), 118 NTGetExecutionPath(char *,const size_t), 119 NTGetModulePath(const char *,char *), 120 NTReportEvent(const char *,const MagickBooleanType); 121 122 extern MagickExport MagickBooleanType 123 NTLongPathsEnabled(); 124 125 extern MagickPrivate struct dirent 126 *NTReadDirectory(DIR *); 127 128 extern MagickPrivate unsigned char 129 *NTRegistryKeyLookup(const char *), 130 *NTResourceToBlob(const char *); 131 132 extern MagickPrivate void 133 *NTGetLibrarySymbol(void *,const char *), 134 NTGhostscriptEXE(char *,int), 135 NTInitializeWinsock(MagickBooleanType), 136 *NTMapMemory(char *,size_t,int,int,int,MagickOffsetType), 137 *NTOpenLibrary(const char *), 138 NTWindowsGenesis(void), 139 NTWindowsTerminus(void); 140 141 #endif /* !XS_VERSION */ 142 143 #endif /* MAGICKCORE_WINDOWS_SUPPORT */ 144 145 #if defined(__cplusplus) || defined(c_plusplus) 146 } 147 #endif /* !C++ */ 148 149 #endif /* !MAGICKCORE_NT_BASE_H */ 150