 #define WIN_SHM_BASE   ((22+LIBCU_SHM_NLOCK)*4)        // first lock byte
 #define WIN_SHM_DMS    (WIN_SHM_BASE+LIBCU_SHM_NLOCK)  // deadman switch
 
-/* Apply advisory locks for all n bytes beginning at ofst. */
+/* Apply advisory locks for all n bytes beginning at offset. */
 #define WINSHM_UNLCK  1
 #define WINSHM_RDLCK  2
 #define WINSHM_WRLCK  3
-static int winShmSystemLock(winShmNode *file, int lockType, int ofst, int bytes)
+static int winShmSystemLock(winShmNode *file, int lockType, int offset, int bytes)
 {
 	RC rc = 0; // Result code form Lock/UnlockFileEx()
 	// Access to the winShmNode object is serialized by the caller
 	assert(mutex_held(file->mutex) || !file->refs);
-	OSTRACE(("SHM-LOCK file=%p, lock=%d, offset=%d, size=%d\n", file->file.h, lockType, ofst, bytes));
+	OSTRACE(("SHM-LOCK file=%p, lock=%d, offset=%d, size=%d\n", file->file.h, lockType, offset, bytes));
 	// Release/Acquire the system-level lock
 	if (lockType == WINSHM_UNLCK)
-		rc = winUnlockFile(&file->file.h, ofst, 0, bytes, 0);
+		rc = winUnlockFile(&file->file.h, offset, 0, bytes, 0);
 	else {
 		// Initialize the locking parameters
 		DWORD dwFlags = LOCKFILE_FAIL_IMMEDIATELY;
 		if (lockType == WINSHM_WRLCK) dwFlags |= LOCKFILE_EXCLUSIVE_LOCK;
-		rc = winLockFile(&file->file.h, dwFlags, ofst, 0, bytes, 0);
+		rc = winLockFile(&file->file.h, dwFlags, offset, 0, bytes, 0);
 	}
 	if (rc) rc = RC_OK;
 	else { file->lastErrno = osGetLastError(); rc = RC_BUSY; }
-	OSTRACE(("SHM-LOCK file=%p, func=%s, errno=%lu, rc=%s\n", file->file.h, lockType == WINSHM_UNLCK ? "winUnlockFile" : "winLockFile", file->lastErrno, sqlite3ErrName(rc)));
+	OSTRACE(("SHM-LOCK file=%p, func=%s, errno=%lu, rc=%s\n", file->file.h, lockType == WINSHM_UNLCK ? "winUnlockFile" : "winLockFile", file->lastErrno, runtimeErrName(rc)));
 	return rc;
 }
 

	while ((p = *pp))
		if (!p->refs) {
			if (p->mutex) mutex_free(p->mutex);
			for (int i = 0; i < p->regions; i++) {
				BOOL rc = osUnmapViewOfFile(p->regions[i].map);
				OSTRACE(("SHM-PURGE-UNMAP pid=%lu, region=%d, rc=%s\n", osGetCurrentProcessId(), i, rc ? "ok" : "failed"));
				UNUSED_VARIABLE_VALUE(rc);

			if( cygwin_conv_path(
				(osIsNT() ? CCP_POSIX_TO_WIN_W : CCP_POSIX_TO_WIN_A),
				zRelative, zOut, pVfs->mxPathname+1)<0 ){
					mfree(zOut);
					return winLogError(LIBCU_CANTOPEN_CONVPATH, (DWORD)errno,
						"winFullPathname2", zRelative);
			}else{
				char *zUtf8 = winConvertToUtf8Filename(zOut);
				if( !zUtf8 ){
					mfree(zOut);
					return LIBCU_IOERR_NOMEM_BKPT;
				}
				sqlite3_snprintf(MIN(nFull, pVfs->mxPathname), zFull, "%s", zUtf8);
				mfree(zUtf8);
				mfree(zOut);
			}
		}
		return RC_OK;
