Date: Mon, 29 Jun 1998 17:03:49 +0300 (IDT) From: Eli Zaretskii To: stdenis cc: Nate Eldredge , djgpp AT delorie DOT com Subject: Re: portable code In-Reply-To: <35979ABE.6BE1FA8C@compmore.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Mon, 29 Jun 1998, stdenis wrote: > > In this particular example, yes. But ``portability'' isn't limited to > > ANSI-compliant systems. > > Well I am really only concerned with portability among GNU C systems (systems > that can run GNU C). The concerns which Nate was expressing still apply. You cannot write a useful, non-toy program with only ANSI C functionality. You *must* use library functions and OS features which are outside ANSI. Even Posix is not always enough to write any given program. When that happens, you need a way to write the non-ANSI code so that it works on every supported platform. In general, it's a very hard job. Try looking at the sources of any GNU package, and you will see why. Even if you consider only compatibility between DOS/Windows (i.e. DJGPP) and Unix, there are a lot of issues to take care of. This could be a subject of a large book (hmmm... there's a thought! ;-). Some examples: - text vs. binary I/O - file name format (multiple root directories, drive letters etc.) - the way subsidiary programs are invoked ...and so on and so on--even the list is so long it cannot be posted here.