Mail Archives: djgpp/1998/06/10/05:29:59
On Tue, 9 Jun 1998 davidotoole AT my-dejanews DOT com wrote:
> Hello! I have a minor question... I recently installed GCC 2.81, and after
> some minor startup hassles it worked fine. Then I tried to compile a C
> program that included <dpmi.h> and <sys/movedata.h> because I needed
> dosmemput() for accessing the VGA RAM. It never got to the link stage- I got
> many *parse* errors in the *header file*, not in my .c file. The message
> was, "(line#) Parse error before "size_t" in movedata.h" or something to that
> effect. I examined the header file and found no obvious error. But while
> looking I saw a note at the top of <movedata.h> that said something like,
> "this should only be included from other header files like XXXX or XXXX, not
> by itself." So I thought DPMI.H might include it itself, and it might be
> doing something wrong if included more than once. So I commented out the
> #include and left the one for dpmi.h alone. It worked fine; apparently dpmi
> includes it already.
>
> So the problem appears to be solved, but I'd like to know why it happened so I
> can solve it if it happens again.
>
There is problem with sys/movedata.h from djdev201.zip. It's fixed in
alpha version of djdev202.zip however I recommend only patch header files
when needed but not download full alpha version.
Here is patch for include/sys/movedata.h. However read the last 3 lines
of included patch. You can also solve You problem by including for example
stdlib.h before sys/movedata.h
*** movedata.h~ Wed Jan 31 05:31:10 1996
--- MOVEDATA.H Thu Jan 1 23:38:48 1998
***************
*** 14,19 ****
--- 14,23 ----
#include <sys/djtypes.h>
+ __DJ_size_t
+ #undef __DJ_size_t
+ #define __DJ_size_t
+
/* This header is intended to be included only by other
headers, like <go32.h> and <string.h>. You may
include this directly, but it will be non-portable. */
- Raw text -