[m-dev.] trivial diff: mercury_trace_external.c portability fix
Fergus Henderson
fjh at cs.mu.OZ.AU
Wed May 27 03:09:35 AEST 1998
On 26-May-1998, Erwan Jahier <Erwan.Jahier at irisa.fr> wrote:
> Fergus Henderson wrote:
> >
> > runtime/mercury_trace_external.c:
> > Move the #include of nonportable header files such as
> > <arpa/inet.h>, etc. inside the `#ifdef MR_USE_EXTERNAL_DEBUGGER'.
>
> In what sense do you say they are not portable ?
Not every ANSI C system has those headers.
> The fact is I needed to comment out #include <arpa/inet.h> and #include
> <netinet/in.h> to make things compiling here (delaying that problem the
> day I want to support inet communication...) because gcc was complaining
> about code in arpa/inet.h and netinet/in.h
This is due to a clash with the `sp' macro.
The right fix for this is to delete the `#define sp MR_sp'
from runtime/mercury_regorder.h, which contains the following:
/* for backwards compatibility */
#define succip MR_succip
#define hp MR_hp
#define sp MR_sp
#define curfr MR_curfr
#define maxfr MR_maxfr
But that might cause some problems -- I think there are still lots of
places that refer to the stack pointer etc. as `sp' rather than `MR_sp'.
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh> | of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3 | -- the last words of T. S. Garp.
More information about the developers
mailing list