Subject: Re: problems compiling libg++-2.7.0a
To: Thorsten Frueauf <s_frueau@ira.uka.de>
From: Greg Hudson <ghudson@MIT.EDU>
List: current-users
Date: 07/13/1995 12:35:22
> ./CursesW.h:360: `struct __window' has no member named `_begx'
> ./CursesW.h: In method `int CursesWindow::begy()':
I sent in patches for this and other problems after 2.6.2, but they
apparently weren't applied.
===================================================================
RCS file: RCS/CursesW.h,v
retrieving revision 1.1
diff -c -r1.1 CursesW.h
*** 1.1 1995/02/28 22:44:24
--- CursesW.h 1995/02/28 22:45:10
***************
*** 31,36 ****
--- 31,47 ----
#include <curses.h>
}
+ /* NetBSD uses different field names. */
+ #ifdef __NetBSD__
+ #define _maxx maxx
+ #define _maxy maxy
+ #define _curx curx
+ #define _cury cury
+ #define _y lines
+ #define _begx begx
+ #define _begy begy
+ #endif
+
/* SCO 3.2v4 curses.h includes term.h, which defines lines as a macro.
Undefine it here, because CursesWindow uses lines as a method. */
#undef lines
Fix.cc will also give you trouble (I'm using a non-context diff to
save space here):
===================================================================
RCS file: RCS/Fix.cc,v
retrieving revision 1.1
diff -r1.1 Fix.cc
301c301
< Fix X(x->len), Y(y->len);
---
> Fix X((int)x->len), Y((int)y->len);
371c371
< Fix Y(y->len);
---
> Fix Y((int)y->len);
386c386
< Fix S(r->len),
---
> Fix S((int)r->len),
Finally, you need to add "#include <sys/types.h>" before the "#include
<sys/resource.h>" in both timer.c and libio/gen-params. These changes
(in addition to a manual change to _G_Config after it's generated,
replacing "quad_t" with "long long") should make libg++ compile,
although there may still be run-time problems. Some of them may have
been incorporated; I'm not sure.