delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/03/21/05:36:11

Message-Id: <199803211035.CAA29749@geocities.com>
From: cssl AT geocities DOT com
Sender: cssl AT mail DOT geocities DOT com
To: sandmann AT clio DOT rice DOT edu (Charles Sandmann)
Date: Sat, 21 Mar 1998 10:12:56 GMT0BST
Subject: Re: Can the text section be made read-only?
Reply-to: Diego Zuccato <cssl AT geocities DOT com>
CC: djgpp-workers AT delorie DOT com

 > I would suggest a procedure __djgpp_protect_text(onoff) which could
IMVHO it could be even better if it doesen't need a function call.
Just something like :
--8<--
#if defined(__DJGPP_PROTECT_TEXT)
static int _djgpp_protect_text=1;
#else
static int _djgpp_protect_text=0;
#endif
--8<--
in an header file. So if I define __DJGPP_PROTECT_TEXT the text is 
protected. It's just a portability issue: if I place a function call in 
the code, I'll have to strip it out when porting. If I define a macro, 
I've just do leave it out :-)

Just my $.02

BYtE,
 Diego (Fidonet node 2:332/437)
 

- Raw text -


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