Path: utzoo!utgpu!news-server.csri.toronto.edu!dgp.toronto.edu!flaps Newsgroups: comp.std.c From: flaps@dgp.toronto.edu (Alan J Rosenthal) Subject: Re: stdlib.h Message-ID: <1990Aug10.145445.7606@jarvis.csri.toronto.edu> References: <116506@linus.mitre.org> Distribution: na Date: 10 Aug 90 18:54:45 GMT Lines: 20 cazier@mbunix.mitre.org (Cazier) writes: >... [developed] using ANSI restrictions under a turbo C environment. >... UNIX-PC complained of not finding "stdlib.h" ... >... so is it the UNIX-PC compiler that's at fault or am I playing with a toy >compiler on the DOS side of the house to fit BIOS requirements? The ansi C committee invented enough things that it's unlikely that a program written with only ansi-c portability in mind will work on a non-ansi-c compiler. The unix-pc compiler is probably at fault only in that it is not ansi-compliant. Of course, your turbo C compiler is probably not entirely ansi-compliant unless it's a very recent version which came out after the standard was published in its final form. Very wide portability these days can probably be achieved only by referring to BOTH editions of Kernighan and Ritchie, and mostly the first. void, enum, and structure assignment are probably ok, but otherwise you should probably stick to the first edition, except where the second edition contradicts it (e.g. don't write into string constants). ajr