Skip to content

Commit

Permalink
fix issues with calling convention in Kermit SSH DLL
Browse files Browse the repository at this point in the history
- only layer on Kermit side (ckossh.c) was defined but the same layer must be present on DLL side (ckolssh.c or ckonssh.c) to work properly with different compilers
- 64-bit Windows has defined ABI for DLL that default calling convention is used
- 32-bit systems has not defined ABI for DLL therefore any calling convention can be used, to simplify it cdecl calling convention is used for all 32-bit platforms, it enable to use DLL by any other compiler without dependency on compiler default calling convention
- fix prototypes to use (void) if no parameters are passed, K&R syntax () means any parameters, newer C standards don't permit mixing with K&R syntax and it is reported by some compilers as parameter passing issue
- the DLL export of the ssh_impl_ver function has been removed because no application uses it by exported symbol, it is used by internal access
  • Loading branch information
jmalak committed Nov 5, 2024
1 parent e12b6ed commit 6db6bac
Show file tree
Hide file tree
Showing 7 changed files with 1,482 additions and 712 deletions.
2 changes: 1 addition & 1 deletion kermit/k95/ckoker.mak
Original file line number Diff line number Diff line change
Expand Up @@ -1387,7 +1387,7 @@ nullssh.dll: ckonssh.obj ckoker.mak
!else
!if "$(CMP)" == "OWWCL"
$(CC) $(CC2) $(DEBUG) $(DLL) ckonssh.obj $(OUT)$@ \
$(LINKFLAGS_DLL) $(LIBS) -"export ssh_dll_init"
$(LINKFLAGS_DLL) $(LIBS) -"export ssh_dll_init=_ssh_dll_init"
!endif
!endif

Expand Down
Loading

0 comments on commit 6db6bac

Please sign in to comment.