Turbo C(/C++) runtime library source code

M

marek

Dear colleagues,

for one project, I need to link Turbo (or Borland) Pascal with (Turbo)
C code. I would strongly like to avoid rewriting (my) C routines to
Pascal (other part of project is under Unix [yes, I know about gpc and
fpc...), and my clients are medicine doctors, who reject to program in
other lang. than Pascal.

Linking of Turbo C 2 and TP 5.5 from Borland's "Antique software"
works, but there is a well-known problem with system libraries. I need
"only" math functions and alloc/free; no problem with alloc/free (can
be done in Pascal), but I really don't want to reimplement in Pascal
functions such as cast of double to int and so.

The solution mentioned everywhere is to recompile Turbo C runtime
library source with Pascal calling and naming convention switches.

But, I don't know, where or how to obtain the RTL sourcecode? I
suspect, Borland isn't interrested in support of these medieval
applications...

I haven't found it in Borland's Antique software museum. Does anybody
have these sources? Or are there somewhere available for download?


Thank you very much for your *pointers.
Best regards,
Marek P.
 
G

Gregory Pietsch

<probably OT for this newsgroup>

What math functions need to be reimplemented?

The math functions for Pascal should work as well as the C ones.
Reimplementing the math library should be overkill for what you're
trying to do.

</OT>

Gregory Pietsch
 
W

Walter

But, I don't know, where or how to obtain the RTL sourcecode? I
suspect, Borland isn't interrested in support of these medieval
applications...

You can use Digital Mars C and C++, which still supports building 16 bit
applications and comes with complete runtime library source code.

-Walter
www.digitalmars.com C, C++, D compilers
 
R

Richard Bos

Walter said:
You can use Digital Mars C and C++, which still supports building 16 bit
applications and comes with complete runtime library source code.

Well, we could, but have you Y2K-tested it yet? "The Software was not
designed to operate after December 31, 1999. It may be incomplete and it
may not function properly." Doesn't inspire much confidence, does it?

It may be a great compiler, but if it's that badly tested, I'm not
risking my systems to it.

Richard
 
M

Marek Peca

Well, we could, but have you Y2K-tested it yet? "The Software was not
designed to operate after December 31, 1999. It may be incomplete and it
may not function properly." Doesn't inspire much confidence, does it?

It may be a great compiler, but if it's that badly tested, I'm not
risking my systems to it.

Heh, you are a really funny joker. Where do you have a Y2K problem in
PC? However, there is really a problem of year 2012, as I know, in
classic PC/DOS environments.

I think Digital Mars' solution could be very good for our needs; but
I'd like to be sure, if it is really possible to link it with rest of
Turbo Pascal prog. But it seems to be able to do this job.

Rgds,
Marek P.
 
M

Marek Peca

Hello,

What math functions need to be reimplemented?

The math functions for Pascal should work as well as the C ones.
Reimplementing the math library should be overkill for what you're
trying to do.

thank you for your answer. Well, what you suggest is exactly what I
wanted to do ("implement" sin, cos, atan2,... using Pascal
functions), BUT: I'm really unhappy with reimplementing of functions
such as FIDRQQ, FIWRQQ, FJARQQ,... or what.

The solution of Digital Mars seems to be fine, as they promise to
give RTL source and compiler, which is able to compile it with Pascal
calling conventions.

But if you know about where to get the Borland's RTL library source,
it will help me a lot.


Best regards,
Marek P.
 
R

Richard Bos

[ Do not over-strip attributions. ]
Heh, you are a really funny joker.

I'm quite, quite serious.
Where do you have a Y2K problem in PC?

I have no idea. The Digital Mars C compiler _was not tested_ for Y2K
compatibility, so I cannot know whether it does have such problems, can
I? And therefore, I won't trust _my_ carefully Y2K-compatible code to
such an untested compiler.
However, there is really a problem of year 2012, as I know, in
classic PC/DOS environments.

But that has nothing to do with that compiler.

Richard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top