www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1997/06/22/05:07:27

Date: Sun, 22 Jun 1997 12:05:16 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Charles Sandmann <sandmann AT clio DOT rice DOT edu>
cc: DJ Delorie <dj AT delorie DOT com>, djgpp-workers AT delorie DOT com
Subject: Re: Possible misbehavior of write
In-Reply-To: <9706200301.AA13408@clio.rice.edu>
Message-ID: <Pine.SUN.3.91.970622120450.4249B-100000@is>
MIME-Version: 1.0

On Thu, 19 Jun 1997, Charles Sandmann wrote:

> Could be.  Could be anything.  If it's a function then you have the 
> call overhead, but you can replace the function easily for personal 
> preference without a library re-compile.
> 
> > The only hastle I can see is the need to distribute multiple libraries
> > or answere a lot of question relating to code size/how to get debug code etc.
> 
> I would not distribute multiple libraries.

An alternative to multiple libraries (which I don't like either) is to
have an environment variable which is used to turn on and off this
feature.  For example:

	set DJGPPNULLPTR=y
	rem run with protection
	set DJGPPNULLPTR=n
	rem run without protection

Since this requires a call to `getenv', we could (for performance
reasons) add a single call to `getenv' in the startup code that will
set a variable, then make all the functions that test for null
pointers to access that variable.  (This assumes that nobody would say
`putenv("DJGPPNULLPTR=y")' in the middle of a program and expect this
to take effect, although this might be a problem with shells compiled
with DJGPP.)

- Raw text -


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