OS/2, eCS & ArcaOS - Technical > Applications

Kermit 95 / C-Kermit for Windows and OS/2

(1/5) > >>

davidrg:

--- Quote from: SoundChaser on January 16, 2023, 04:54:34 am ---- Kermit 95. Doesn't work, but it's now open source and modular. It could actually be interesting to (re-)port as it once supported OS/2.

--- End quote ---

I'm the maintainer of Kermit 95 - now called C-Kermit for Windows (and OS/2 I guess). Pull requests welcome :D

My main focus so far has been getting it working properly on Windows again but I have been careful not to break OS/2 support along the way so no need to re-port it. In fact, github produces OS/2 binaries cross-compiled from Windows with OpenWatcom on mostly every commit! All that's needed to get it back to where it was 20 years ago is some bug fixing (bugs probably caused by switching from some IBM compiler to OpenWatcom). Problem is I know almost nothing about OS/2 development (but I do have boxed copies of OS/2 1.3 through to Warp 4 to test on). And also Kermit 95 didn't support SSH on OS/2 AFAIK - but thats a solvable problem now that its open-source.

As far as SSH goes, libssh supposedly supports OS/2 but not OpenWatcom - possibly because OpenSSL doesn't support OpenWatcom either. So either libssh+openssl need to be ported to OpenWatcom or C-Kermit for OS/2 needs to be ported to GCC. Not sure which is easier (or even possible). If the libssh+openssl situation can be sorted out, the libssh support code in C-Kermit for Windows and OS/2 uses Win32 threading APIs so there will be a little bit of porting work there too but I expect that would be pretty easy.

Screenshot of it running on OS/2 here: https://kermitproject.org/ckwscreenshots/os2.html

Dave Yeo:
Third option, the OpenWatcom build use the GCC compiled libssh.
Need the right compile flags on OW for the calling convention (can't use the OW specific one) and the right declarations in the libssh headers for the calling convention. Forget the specifics but it is possible.

davidrg:

--- Quote from: Dave Yeo on February 01, 2023, 01:47:38 am ---Third option, the OpenWatcom build use the GCC compiled libssh.
Need the right compile flags on OW for the calling convention (can't use the OW specific one) and the right declarations in the libssh headers for the calling convention. Forget the specifics but it is possible.

--- End quote ---

I hadn't considered that! Don't know why though - seems a reasonable enough thing to do and I'm not statically linking either library. libssh and openssl are just written in C so no particular reason why they have to be built with the same compiler. I'll have to look into that some time!

Dave Yeo:
Hi davidrg, forgot to welcome you to the forum.
This is the latest code https://ftp2.zx.net.nz/pub/CKW/test_builds/ckw10b8-beta4/ckw-b4-src.zip?
Is there a git or such repository?
Anyways downloaded the above source and built ckoker32.exe, which seems to run fine though textmode. Wasn't there a graphical exe too? It's been a long time since I played with kermit.
It compiled fine (lots of warnings) on OS/2 after a minor patch to ckoker.mak,

--- Code: ---L:\work\ckwin-10.0beta.08-4\kermit\k95>diff -u ckoker.mak.orig ckoker.mak
--- ckoker.mak.orig     2023-01-31 18:55:46.000000000 -0800
+++ ckoker.mak  2023-01-31 18:38:06.000000000 -0800
@@ -686,9 +686,9 @@
 !ifdef PLATFORM
 !if "$(PLATFORM)" == "OS2"
 LIBS = os2386.lib rexx.lib \
-!if "$(CMP)" != "OWCL"
-       bigmath.lib
-!endif
+#!if "$(CMP)" != "OWCL"
+#       bigmath.lib
+#!endif
 # OpenWatcom doesn't have bigmath.lib
 # SRP support: libsrp.lib
 !else if "$(PLATFORM)" == "NT"

--- End code ---

I see this,

--- Code: ---===============================================================================
C-Kermit Build Configuration
===============================================================================
Platform:                 OS2
Build:                    K95
Architecture:             x86
Compiler:                 OpenWatcom WCL386
Compiler Version:         OpenWatcom
Compiler Target Platform: OS/2
Enabled Features:         Network-Connections DECnet
Disabled Features:        Kerberos SRP ZLIB SSL SSH ConPTY TelnetEncryptionOption CryptDLL XYZMODEM SuperLAT NetBIOS Mouse-Wheel
===============================================================================

--- End code ---

Couple of observations, kerberos, zlib, crypto10.dll, (from OpenSSL) ) are available as GCC builds.
Quickly looking, it looks like you're using the old 16bit TCPIP stack, it would need updating to the 32 bit stack. Actually you should be targeting OS/2 4.5, basically V4 with all the free updates, especially FP#15 and the latest MPTS packages and whatever the last kernel was released by IBM.
There doesn't seem to be any DLLs associated with openssh. For openssl, probably the easiest would be to create OW friendly import libs and add some directive for the right calling convention.
One project I ended up supporting, the screensaver, links to some GCC compiled DLLs, it uses these flags. I'm far from an OW expert.

--- Code: ---dllflags = -bd
cflags = $(debugflags) -zq -bm -bt=OS2 -6s -fpi87 -fp6 -sg -otexanr -wx

--- End code ---

Perhaps Martin should split this topic off to its own thread as well.

davidrg:
I'm impressed you got it building so quickly! Yes, that's the code for the latest beta. Github repository is here: https://github.com/davidrg/ckwin/.

Kermit 95 only had a GUI version on Windows and it was a fairly late addition at that - looking back through the old changelogs it appears to have first appeared in April 2002 with the final release of Kermit 95 less than a year later in January 2003. There is a graphical connection manager though, the dialer, which was available on OS/2 as well as Windows. That does build with OpenWatcom but I've not attempted to build it for OS/2 yet (The dialer was open-sourced after I was last working on getting the OS/2 code going again).

As far as I can tell the TCP/IP side of C-Kermit for OS/2 lives in a DLL with DLLs originally supplied for IBM TCP/IP 2.0 and 1.2, PC/TCP 1.3 and Novell LAN Workplace 3.0. This appears to be the same arrangement C-Kermit used with the last free release for OS/2, 5A(191) of mid-1995, though of course I don't have licenses for any OS/2 SDKs besides what comes with OpenWatcom which doesn't appear to be enough.

I guess next I need to look for a GCC that can cross-compile for OS/2 from Windows or Linux! And yes, I guess all this Kermit stuff probably belongs in its own thread somewhere.

Navigation

[0] Message Index

[#] Next page

Go to full version