diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | win/tclWin32Dll.c | 80 | ||||
-rw-r--r-- | win/tclWinInt.h | 86 |
3 files changed, 6 insertions, 166 deletions
@@ -1,4 +1,10 @@ +2011-10-05 Jan Nijtmans <nijtmans@users.sf.net> + + * generic/tclWinInt.h: Remove tclWinProcs, as it is no longer + * generic/tclWin32Dll.c: being used. + 2011-10-03 Venkat Iyer <venkat@comit.com> + * library/tzdata/Africa/Dar_es_Salaam: Update to Olson's tzdata2011k * library/tzdata/Africa/Kampala * library/tzdata/Africa/Nairobi diff --git a/win/tclWin32Dll.c b/win/tclWin32Dll.c index 7972862..019d76f 100644 --- a/win/tclWin32Dll.c +++ b/win/tclWin32Dll.c @@ -17,20 +17,6 @@ #endif /* - * The following data structures are used when loading the thunking library - * for execing child processes under Win32s. - */ - -typedef DWORD (WINAPI UT32PROC)(LPVOID lpBuff, DWORD dwUserDefined, - LPVOID *lpTranslationList); - -typedef BOOL (WINAPI UTREGISTER)(HANDLE hModule, LPCSTR SixteenBitDLL, - LPCSTR InitName, LPCSTR ProcName, UT32PROC **ThirtyTwoBitThunk, - FARPROC UT32Callback, LPVOID Buff); - -typedef void (WINAPI UTUNREGISTER)(HANDLE hModule); - -/* * The following variables keep track of information about this DLL on a * per-instance basis. Each time this DLL is loaded, it gets its own new data * segment with its own copy of all static and global information. @@ -67,72 +53,6 @@ typedef struct EXCEPTION_REGISTRATION { static Tcl_Encoding winTCharEncoding = NULL; /* - * The following function table is used to dispatch to wide-character - * versions of the operating system calls. - */ - -static const TclWinProcs winProcs = { - 1, - (BOOL (WINAPI *)(const TCHAR *, LPDCB)) BuildCommDCB, - (TCHAR *(WINAPI *)(TCHAR *)) CharLower, - (BOOL (WINAPI *)(const TCHAR *, const TCHAR *, BOOL)) CopyFile, - (BOOL (WINAPI *)(const TCHAR *, LPSECURITY_ATTRIBUTES)) CreateDirectory, - (HANDLE (WINAPI *)(const TCHAR *, DWORD, DWORD, SECURITY_ATTRIBUTES *, - DWORD, DWORD, HANDLE)) CreateFile, - (BOOL (WINAPI *)(const TCHAR *, TCHAR *, LPSECURITY_ATTRIBUTES, - LPSECURITY_ATTRIBUTES, BOOL, DWORD, LPVOID, const TCHAR *, - LPSTARTUPINFO, LPPROCESS_INFORMATION)) CreateProcess, - (BOOL (WINAPI *)(const TCHAR *)) DeleteFile, - (HANDLE (WINAPI *)(const TCHAR *, WIN32_FIND_DATAT *)) FindFirstFile, - (BOOL (WINAPI *)(HANDLE, WIN32_FIND_DATAT *)) FindNextFile, - (BOOL (WINAPI *)(TCHAR *, LPDWORD)) GetComputerName, - (DWORD (WINAPI *)(DWORD, TCHAR *)) GetCurrentDirectory, - (DWORD (WINAPI *)(const TCHAR *)) GetFileAttributes, - (DWORD (WINAPI *)(const TCHAR *, DWORD nBufferLength, TCHAR *, - TCHAR **)) GetFullPathName, - (DWORD (WINAPI *)(const TCHAR *, TCHAR *, DWORD)) GetShortPathName, - (UINT (WINAPI *)(const TCHAR *, const TCHAR *, UINT uUnique, - TCHAR *)) GetTempFileName, - (DWORD (WINAPI *)(DWORD, TCHAR *)) GetTempPath, - (BOOL (WINAPI *)(const TCHAR *, TCHAR *, DWORD, LPDWORD, LPDWORD, LPDWORD, - TCHAR *, DWORD)) GetVolumeInformation, - (HINSTANCE (WINAPI *)(const TCHAR *, HANDLE, DWORD)) LoadLibraryEx, - (BOOL (WINAPI *)(const TCHAR *, const TCHAR *)) MoveFile, - (BOOL (WINAPI *)(const TCHAR *)) RemoveDirectory, - (DWORD (WINAPI *)(const TCHAR *, const TCHAR *, const TCHAR *, DWORD, - TCHAR *, TCHAR **)) SearchPath, - (BOOL (WINAPI *)(const TCHAR *)) SetCurrentDirectory, - (BOOL (WINAPI *)(const TCHAR *, DWORD)) SetFileAttributes, - (BOOL (WINAPI *)(const TCHAR *, GET_FILEEX_INFO_LEVELS, - LPVOID)) GetFileAttributesEx, - (BOOL (WINAPI *)(const TCHAR *, const TCHAR*, - LPSECURITY_ATTRIBUTES)) CreateHardLink, - (HANDLE (WINAPI *)(const TCHAR*, UINT, LPVOID, UINT, - LPVOID, DWORD)) FindFirstFileEx, - (BOOL (WINAPI *)(const TCHAR*, TCHAR*, - DWORD)) GetVolumeNameForVolumeMountPoint, - (DWORD (WINAPI *)(const TCHAR*, TCHAR*, - DWORD)) GetLongPathName, - /* Security SDK */ - (BOOL (WINAPI *)(LPCTSTR, SECURITY_INFORMATION, - PSECURITY_DESCRIPTOR, DWORD, LPDWORD)) GetFileSecurity, - (BOOL (WINAPI *) (SECURITY_IMPERSONATION_LEVEL)) ImpersonateSelf, - (BOOL (WINAPI *) (HANDLE, DWORD, BOOL, PHANDLE)) OpenThreadToken, - (BOOL (WINAPI *) (void)) RevertToSelf, - (void (WINAPI *) (PDWORD, PGENERIC_MAPPING)) MapGenericMask, - (BOOL (WINAPI *)(PSECURITY_DESCRIPTOR, HANDLE, DWORD, - PGENERIC_MAPPING, PPRIVILEGE_SET, LPDWORD, LPDWORD, LPBOOL)) AccessCheck, - /* ReadConsole and WriteConsole */ - (BOOL (WINAPI *)(HANDLE, LPVOID, DWORD, LPDWORD, LPVOID)) ReadConsole, - (BOOL (WINAPI *)(HANDLE, const void*, DWORD, LPDWORD, LPVOID)) WriteConsole, - (BOOL (WINAPI *)(LPTSTR, LPDWORD)) GetUserName, - (const TCHAR *(*)(const char *, int, Tcl_DString *)) Tcl_WinUtfToTChar, - (const char *(*)(const TCHAR *, int, Tcl_DString *)) Tcl_WinTCharToUtf -}; - -const TclWinProcs *const tclWinProcs = &winProcs; - -/* * The following declaration is for the VC++ DLL entry point. */ diff --git a/win/tclWinInt.h b/win/tclWinInt.h index c75084a..882b811 100644 --- a/win/tclWinInt.h +++ b/win/tclWinInt.h @@ -34,92 +34,6 @@ #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; - -MODULE_SCOPE const TclWinProcs *const tclWinProcs; - -/* * Declarations of functions that are not accessible by way of the * stubs table. */ |