[m-rev.] not committed: curses & bool
Fergus Henderson
fjh at cs.mu.OZ.AU
Sat Dec 29 17:55:59 AEDT 2001
I noticed that extras/curs* failed to build on Linux.
The following patch is fixes the problem, but it's not
a portable fix, so I won't commit it.
Probably the best solution in the long run is to do s/bool/MR_bool/
to avoid the name clash.
--------------------
Estimated hours taken: 1
Branches: main
extras/curs/curs.m:
extras/curses/basics.m:
extras/curses/user.m:
After #including <curses.h> or <ncurses.h>,
do `#define bool char', since <curses.h> or <ncurses.h>
will have done `#undef bool' which will have deleted
the definition in runtime/mercury_std.h.
Workspace: /home/earth/fjh/ws-earth3/mercury
Index: extras/curs/curs.m
===================================================================
RCS file: /home/mercury1/repository/mercury/extras/curs/curs.m,v
retrieving revision 1.2
diff -u -d -r1.2 curs.m
--- extras/curs/curs.m 22 Sep 2001 11:30:28 -0000 1.2
+++ extras/curs/curs.m 22 Nov 2001 15:28:26 -0000
@@ -353,6 +353,7 @@
#include <ncurses.h>
#include <panel.h>
+#define bool char
/*
** XXX We assume 64 available colour pairs and that the COLOR_s
@@ -890,6 +891,7 @@
#include <ncurses.h>
#include <panel.h>
+ #define bool char
").
Index: extras/curses/basics.m
===================================================================
RCS file: /home/mercury1/repository/mercury/extras/curses/basics.m,v
retrieving revision 1.2
diff -u -d -r1.2 basics.m
--- extras/curses/basics.m 31 Jan 2000 03:12:54 -0000 1.2
+++ extras/curses/basics.m 22 Nov 2001 15:33:08 -0000
@@ -140,6 +140,7 @@
:- pragma c_header_code("
#include <curses.h>
#include <term.h>
+ #define bool char
").
%----------------------------------------------------------------------------%
Index: extras/curses/user.m
===================================================================
RCS file: /home/mercury1/repository/mercury/extras/curses/user.m,v
retrieving revision 1.6
diff -u -d -r1.6 user.m
--- extras/curses/user.m 5 Dec 2000 02:07:19 -0000 1.6
+++ extras/curses/user.m 22 Nov 2001 15:32:50 -0000
@@ -140,10 +140,11 @@
:- implementation.
-:- pragma c_header_code(
- "#include <curses.h>
- #include <term.h>"
- ).
+:- pragma c_header_code("
+ #include <curses.h>
+ #include <term.h>
+ #define bool char
+").
%----------------------------------------------------------------------------%
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
The University of Melbourne | of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list