Replies: 7 comments
-
Kermit 95 started out as OS/2 C-Kermit, so originally
So when targeting Windows, both NT and OS2 will be defined (via This also extends to filenames - cko* and ckn* (and all of kui/) are specific to Kermit 95. ckn.* are Windows only (no #ifdef NT required there), while cko*.* may either be OS/2-only (mostly just some TCP/IP code), or both OS/2 and Windows. A bunch of other files (cku*.* , ckc*.* and some others) are shared with C-Kermit for Unix, OpenVMS and other much more obscure platforms (I upstream changes semi-regularly, and mostly around release time merge in the latest C-Kermit versions of these files). So in these files any code there intending to only apply to OS/2 or Windows must be guarded with at least |
Beta Was this translation helpful? Give feedback.
-
Many Thanks for all your info. Now it has more sense for me. |
Beta Was this translation helpful? Give feedback.
-
When Kermit 95 was originally open-sourced, the only compiler it could be built with was, IIRC, Visual C++ 2002 or 2003 on Windows, and some version of IBM VisualAge C++ on OS/2. So there has been quite a bit of work to add in all the other 32bit Visual C++ versions, the RISC compilers, 64bit port, plus of course OpenWatcom and GCC (this page covers all the compilers I test with for targeting windows). I'm not an OS/2 developer at all though, and I know nothing about the IBM compiler, so I just found some documentation somewhere for what the various ICC parameters mean and tried to find OpenWatcom 1.9 equivalents, though without success in most cases. I've never had any confidence they were correct at all, but it was enough to get at least something to build and run. There are still a whole bunch of issues with targeting OS/2 with OpenWatcom though (see #8) - I assume VisualAge C++ still works (I've tried not to break it), but I don't think anyone has actually tested it since 2002. MichalN has been looking into this a bit recently - he has apparently got TCP/IP working (my makefile changes to build cko32i20.dll are hopelessly wrong which doesn't surprise me at all), and has determined why the NetBIOS code crashes ("Arguably the compiler [OpenWatcom] isn't doing things quite right"), so there might be some fixes for that stuff coming along eventually. Separate from the OS/2 stuff, I had a go at building Kermit 95 for Windows NT on DEC Alpha with OpenWatcom 2.0 I think last year with some limited success - I think I got it to the point where the build was falling over at the link step so possibly not so far from working. IIRC I asked some questions about cross-compiling for Alpha around that time as the regular OW2.0 builds didn't include the Alpha compiler and libs. |
Beta Was this translation helpful? Give feedback.
-
I don't think that it is necessary follow options used for IBM VisualAge C++ tools, rather need to use OW correct options to create DLL or executable and link them together. The 16-bit code (segmented code) is more specific, but you doesn't compile it anymore if I understand correctly. Take into account that OS/2 code use specific calling convention for system API it doesn't require to use it for user code that may be you can abandoned _System calling convention and use Compiler default calling convention or some to ensure binary compatibility by example cdecl. Only OS/2 API callback functions must use _System calling convention. Anyway OpenWatcom tools for Alpha, MIPS or PPC are work in progress and nobody work on them now. That it can generate wrong code or can crash. Only Intel processors are supported. |
Beta Was this translation helpful? Give feedback.
-
@davidrg Please are there any standard for source code formatting? |
Beta Was this translation helpful? Give feedback.
-
yeah, its a bit of a mix. I use spaces for any new code, and will sometimes convert any blocks of code I'm modifying to spaces as well if it isn't indented correctly |
Beta Was this translation helpful? Give feedback.
-
@jmalak The changes over in #340 might be of interest if you're looking at OS/2 stuff. I'll probably merge it all in a day or three depending on what MichalN comes back with - the NetBIOS code is presenting some challenges for Open Watcom, but the TCP/IP bits seem to be working properly on OS/2 Warp 4 fix-pack 15 and newer at least. Turns out Open Watcom only includes libraries and headers for IBM TCP/IP 4.1 (MPTS 5.3+) , but the headers and libraries for IBM TCP/IP 4.0 are on the Warp 4 CD and work OK with Open Watcom. The resulting binaries don't work on Warp 4 Advanced Server but that might just be a bug in OS/2 rather than some issue with how cko32i20.dll is being built or used. |
Beta Was this translation helpful? Give feedback.
-
I am trying to improve OpenWatcom support in Kermit source code for OS/2 and Windows.
Somewhere is used OS2 macro definition test and next NT macro definition test.
If looks like it is current to define both macros NT and OS2.
I supposed that only NT or only OS2 macro should be defined in dependency on required target platform.
It is unclear for me what these two macros means and how it is related to target build?
Beta Was this translation helpful? Give feedback.
All reactions