[comp.os.minix] minix cron dumping core due to missing 'extern char *malloc

rainbow@altger.UUCP (rainbow) (12/01/90)

Hi guys,
I don't know whether this has been in the net already - if it has just forget
about this one :-)
A friend of mine hab a problem with running cron(1) on his minix/st. Whenever
cron was started it dumped core; sometimes the whole system went down(?)
[this shouldn't happen, huh?]
I finally tracked down the problem to cron calling malloc() without having
declared it returning a pointer instead of an int. Since MINIX "int"s are
only 16 bits the 32-bit char* is casted to a 16-bit int, then again (?)
assigned to a pointer, what results in an incorrect address. After having
inserted an "extern char *malloc();" into the cron:main() function all
is running well.
Funnily indead I know that on another installation cron is running well on
a minix/pc(386).

Comments (preferably mail) appreciated.

Joerg F. Trinitis	alias rainbow@altger.alt.sub.org