www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/06/29/10:06:45

Date: Mon, 29 Jun 1998 17:03:49 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: stdenis <stdenis AT compmore DOT net>
cc: Nate Eldredge <nate AT cartsys DOT com>, djgpp AT delorie DOT com
Subject: Re: portable code
In-Reply-To: <35979ABE.6BE1FA8C@compmore.net>
Message-ID: <Pine.SUN.3.91.980629165523.3196F-100000@is>
MIME-Version: 1.0

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.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019