Date: Sun, 22 Jun 1997 12:05:16 +0300 (IDT) From: Eli Zaretskii To: Charles Sandmann cc: DJ Delorie , djgpp-workers AT delorie DOT com Subject: Re: Possible misbehavior of write In-Reply-To: <9706200301.AA13408@clio.rice.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk 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.)