Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | avoid dual init of stubs (possible race condition, 8.5th only) |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | sebres-bug-9e6b569963-8-5-branch |
Files: | files | file ages | folders |
SHA3-256: |
81426bb3cdc7cef87fe144a32396773d |
User & Date: | sebres 2018-05-25 15:48:50.271 |
Context
2018-05-25
| ||
15:51 | minor indentation fix (no functional changes) Closed-Leaf check-in: aafdcb52e3 user: sebres tags: sebres-bug-9e6b569963-8-5-branch | |
15:48 | avoid dual init of stubs (possible race condition, 8.5th only) check-in: 81426bb3cd user: sebres tags: sebres-bug-9e6b569963-8-5-branch | |
15:04 | optimized winapi-stubs loading (8.5th only); if user name specified without domain and equals the cu... check-in: 19abe5efa2 user: sebres tags: sebres-bug-9e6b569963-8-5-branch | |
Changes
Changes to win/tclWinFile.c.
︙ | ︙ | |||
1432 1433 1434 1435 1436 1437 1438 | result = NULL; Tcl_DStringInit(bufferPtr); if (!apistubs) { HINSTANCE handle; TCL_DECLARE_MUTEX(initializeMutex) Tcl_MutexLock(&initializeMutex); | | | | | | | | | | | | | | | | | | | | > | 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 | result = NULL; Tcl_DStringInit(bufferPtr); if (!apistubs) { HINSTANCE handle; TCL_DECLARE_MUTEX(initializeMutex) Tcl_MutexLock(&initializeMutex); if (!apistubs) { handle = LoadLibraryA("netapi32.dll"); if (handle) { netApiBufferFreeProc = (NETAPIBUFFERFREEPROC *) GetProcAddress(handle, "NetApiBufferFree"); netGetDCNameProc = (NETGETDCNAMEPROC *) GetProcAddress(handle, "NetGetDCName"); netUserGetInfoProc = (NETUSERGETINFOPROC *) GetProcAddress(handle, "NetUserGetInfo"); Tcl_CreateExitHandler(TclpUnloadFile, handle); } handle = LoadLibraryA("userenv.dll"); if (handle) { getProfilesDirectoryProc = (GETPROFILESDIRECTORYPROC *) GetProcAddress(handle, "GetProfilesDirectoryW"); Tcl_CreateExitHandler(TclpUnloadFile, handle); } apistubs = -1; if ( (netUserGetInfoProc != NULL) && (netGetDCNameProc != NULL) && (netApiBufferFreeProc != NULL) && (getProfilesDirectoryProc != NULL) ) { apistubs = 1; } } Tcl_MutexUnlock(&initializeMutex); } if (apistubs == 1) { USER_INFO_1 *uiPtr; Tcl_DString ds; |
︙ | ︙ |