diff options
author | dgp <dgp@users.sourceforge.net> | 2016-06-16 14:48:35 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2016-06-16 14:48:35 (GMT) |
commit | b700360ad9501defb0b1e2d86353ac8d0db8eef4 (patch) | |
tree | 8b3bcb3adb8bd2eb44bcf16bb091722274e03e9e /win/tclWinInt.h | |
parent | c755ef08151343eb145710489f8c999edbef15ff (diff) | |
parent | 296aebbd6ee092a25741684fa37ee31ef5a3e222 (diff) | |
download | tcl-b700360ad9501defb0b1e2d86353ac8d0db8eef4.zip tcl-b700360ad9501defb0b1e2d86353ac8d0db8eef4.tar.gz tcl-b700360ad9501defb0b1e2d86353ac8d0db8eef4.tar.bz2 |
Merge up to the 8.6.0 release.
Diffstat (limited to 'win/tclWinInt.h')
-rw-r--r-- | win/tclWinInt.h | 98 |
1 files changed, 11 insertions, 87 deletions
diff --git a/win/tclWinInt.h b/win/tclWinInt.h index 94aa045..22ad8e9 100644 --- a/win/tclWinInt.h +++ b/win/tclWinInt.h @@ -7,8 +7,6 @@ * * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. - * - * RCS: @(#) $Id: tclWinInt.h,v 1.37 2010/09/09 14:30:20 nijtmans Exp $ */ #ifndef _TCLWININT @@ -29,91 +27,17 @@ #define VER_PLATFORM_WIN32_CE 3 #endif -/* - * The following structure keeps track of whether we are using the - * multi-byte or the wide-character interfaces to the operating system. - * System calls should be made through the following function table. - */ - -typedef union { - WIN32_FIND_DATAA a; - WIN32_FIND_DATAW w; -} WIN32_FIND_DATAT; - -typedef struct TclWinProcs { - int useWide; - BOOL (WINAPI *buildCommDCBProc)(const TCHAR *, LPDCB); - TCHAR * (WINAPI *charLowerProc)(TCHAR *); - BOOL (WINAPI *copyFileProc)(const TCHAR *, const TCHAR *, BOOL); - BOOL (WINAPI *createDirectoryProc)(const TCHAR *, LPSECURITY_ATTRIBUTES); - HANDLE (WINAPI *createFileProc)(const TCHAR *, DWORD, DWORD, - LPSECURITY_ATTRIBUTES, DWORD, DWORD, HANDLE); - BOOL (WINAPI *createProcessProc)(const TCHAR *, TCHAR *, - LPSECURITY_ATTRIBUTES, LPSECURITY_ATTRIBUTES, BOOL, DWORD, - LPVOID, const TCHAR *, LPSTARTUPINFO, LPPROCESS_INFORMATION); - BOOL (WINAPI *deleteFileProc)(const TCHAR *); - HANDLE (WINAPI *findFirstFileProc)(const TCHAR *, WIN32_FIND_DATAT *); - BOOL (WINAPI *findNextFileProc)(HANDLE, WIN32_FIND_DATAT *); - BOOL (WINAPI *getComputerNameProc)(TCHAR *, LPDWORD); - DWORD (WINAPI *getCurrentDirectoryProc)(DWORD, TCHAR *); - DWORD (WINAPI *getFileAttributesProc)(const TCHAR *); - DWORD (WINAPI *getFullPathNameProc)(const TCHAR *, DWORD, TCHAR *, - TCHAR **); - DWORD (WINAPI *getShortPathNameProc)(const TCHAR *, TCHAR *, DWORD); - UINT (WINAPI *getTempFileNameProc)(const TCHAR *, const TCHAR *, UINT, - TCHAR *); - DWORD (WINAPI *getTempPathProc)(DWORD, TCHAR *); - BOOL (WINAPI *getVolumeInformationProc)(const TCHAR *, TCHAR *, DWORD, - LPDWORD, LPDWORD, LPDWORD, TCHAR *, DWORD); - HINSTANCE (WINAPI *loadLibraryExProc)(const TCHAR *, HANDLE, DWORD); - BOOL (WINAPI *moveFileProc)(const TCHAR *, const TCHAR *); - BOOL (WINAPI *removeDirectoryProc)(const TCHAR *); - DWORD (WINAPI *searchPathProc)(const TCHAR *, const TCHAR *, - const TCHAR *, DWORD, TCHAR *, TCHAR **); - BOOL (WINAPI *setCurrentDirectoryProc)(const TCHAR *); - BOOL (WINAPI *setFileAttributesProc)(const TCHAR *, DWORD); - /* - * These two function pointers will only be set when - * Tcl_FindExecutable is called. If you don't ever call that - * function, the application will crash whenever WinTcl tries to call - * functions through these null pointers. That is not a bug in Tcl - * -- Tcl_FindExecutable is obligatory in recent Tcl releases. - */ - BOOL (WINAPI *getFileAttributesExProc)(const TCHAR *, - GET_FILEEX_INFO_LEVELS, LPVOID); - BOOL (WINAPI *createHardLinkProc)(const TCHAR *, const TCHAR *, - LPSECURITY_ATTRIBUTES); - - /* These two are also NULL at start; see comment above */ - HANDLE (WINAPI *findFirstFileExProc)(const TCHAR *, UINT, - LPVOID, UINT, LPVOID, DWORD); - BOOL (WINAPI *getVolumeNameForVMPProc)(const TCHAR *, TCHAR *, DWORD); - DWORD (WINAPI *getLongPathNameProc)(const TCHAR *, TCHAR *, DWORD); - /* - * These six are for the security sdk to get correct file - * permissions on NT, 2000, XP, etc. On 95,98,ME they are - * always null. - */ - BOOL (WINAPI *getFileSecurityProc)(LPCTSTR, SECURITY_INFORMATION, - PSECURITY_DESCRIPTOR, DWORD, LPDWORD); - BOOL (WINAPI *impersonateSelfProc) (SECURITY_IMPERSONATION_LEVEL); - BOOL (WINAPI *openThreadTokenProc) (HANDLE, DWORD, BOOL, PHANDLE); - BOOL (WINAPI *revertToSelfProc) (void); - void (WINAPI *mapGenericMaskProc) (PDWORD, PGENERIC_MAPPING); - BOOL (WINAPI *accessCheckProc)(PSECURITY_DESCRIPTOR, HANDLE, DWORD, - PGENERIC_MAPPING, PPRIVILEGE_SET, LPDWORD, LPDWORD, LPBOOL); - /* - * Unicode console support. WriteConsole and ReadConsole - */ - BOOL (WINAPI *readConsoleProc)(HANDLE, LPVOID, DWORD, LPDWORD, LPVOID); - BOOL (WINAPI *writeConsoleProc)(HANDLE, const void *, DWORD, LPDWORD, - LPVOID); - BOOL (WINAPI *getUserName)(LPTSTR, LPDWORD); - const TCHAR *(*utf2tchar)(const char *, int, Tcl_DString *); - const char *(*tchar2utf)(const TCHAR *, int, Tcl_DString *); -} TclWinProcs; +#ifdef _WIN64 +# define TCL_I_MODIFIER "I" +#else +# define TCL_I_MODIFIER "" +#endif -MODULE_SCOPE const TclWinProcs *const tclWinProcs; +#ifdef _WIN64 +# define TCL_I_MODIFIER "I" +#else +# define TCL_I_MODIFIER "" +#endif /* * Declarations of functions that are not accessible by way of the @@ -121,7 +45,7 @@ MODULE_SCOPE const TclWinProcs *const tclWinProcs; */ MODULE_SCOPE char TclWinDriveLetterForVolMountPoint( - const WCHAR *mountPoint); + const TCHAR *mountPoint); MODULE_SCOPE void TclWinEncodingsCleanup(); MODULE_SCOPE void TclWinInit(HINSTANCE hInst); MODULE_SCOPE TclFile TclWinMakeFile(HANDLE handle); |