Skip to content

Commit c99aef5

Browse files
author
jan.nijtmans
committed
Merge 8.6
2 parents b244633 + edf7bfb commit c99aef5

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

win/tclWin32Dll.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,28 @@
2626

2727
static HINSTANCE hInstance; /* HINSTANCE of this DLL. */
2828

29+
#if defined(__GNUC__)
30+
31+
/*
32+
* Need to add noinline flag to DllMain declaration so that gcc -O3 does not
33+
* inline asm code into DllEntryPoint and cause a compile time error because
34+
* of redefined local labels.
35+
*/
36+
37+
BOOL APIENTRY DllMain(HINSTANCE hInst, DWORD reason,
38+
LPVOID reserved) __attribute__ ((noinline));
39+
40+
#else /* !__GNUC__ */
41+
2942
/*
3043
* The following declaration is for the VC++ DLL entry point.
3144
*/
3245

3346
BOOL APIENTRY DllMain(HINSTANCE hInst, DWORD reason,
3447
LPVOID reserved);
3548

49+
#endif /* __GNUC__ */
50+
3651
/*
3752
* The following structure and linked list is to allow us to map between
3853
* volume mount points and drive letters on the fly (no Win API exists for

win/tclWinFCmd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ DoRenameFile(
282282
#ifndef HAVE_NO_SEH
283283
__try {
284284
#endif
285-
if ((*MoveFileW)(nativeSrc, nativeDst) != FALSE) {
285+
if (MoveFileW(nativeSrc, nativeDst) != FALSE) {
286286
retval = TCL_OK;
287287
}
288288
#ifndef HAVE_NO_SEH

0 commit comments

Comments
 (0)