Header file problem or dosemu problem?

Header file problem or dosemu problem?

Post by Mattias Hembru » Tue, 11 Feb 1997 04:00:00



I recently installed Slackware 3.1 (3.0? - Sept '96) onto my machine at work.
Install went fine. Then I tried to compile the latest dosemu (0.64.3).

I have ftp'ed 2.0.28 kernel sources, installed and compiled (and am running)
the 2.0.28 kernel. I've installed XFree86 3.2A, etc, so things appear to be
working correctly. However, when I try to compile dosemu, I get the
following errors (see [COMMENT] below)

make[3]: Entering directory `/usr/src/dosemu-0.64.3/src/tools/periph'
gcc -O2 -m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2
-fomit-frame-pointer -pipe -DUSING_NET   -Wall
-I/usr/src/dosemu-0.64.3/src/include
-I/usr/src/dosemu-0.64.3/src/base/dev/pic
-I/usr/src/dosemu-0.64.3/src/dosext/dpmi  -I/usr/X11R6/include    hdinfo.c
-o hdinfo
In file included from hdinfo.c:27:
/usr/include/unistd.h:630: parse error before `__increment'

[COMMENT] This line reads (from memory) something like:
function modifiers ( (ptrdiff_t __increment) );

ptrdiff_t IS define in malloc.h, which is NOT included by default in
unistd.h. This makes me think either the header file is broken, or there's
some other setup problem.. If I edit unistd.h to #include malloc.h, it gets
as far as line 656 below. At that point, I can't find a defintion of
"dev_t" ANYWHERE, which is really bizzare, as it's also used by the kernel
sources (/usr/src/linux/fs/namei.h). However, my kernel recompiled fine (at
least when I first installed everything). Have I inadvertently
corrupted/erased something? Or is dosemu not quite kosher?

/usr/include/unistd.h:631: parse error before `__increment'
/usr/include/unistd.h:656: parse error before `dev_t'
/usr/include/unistd.h:658: parse error before `__dev'
/usr/include/unistd.h: In function `ustat':
/usr/include/unistd.h:660: `__dev' undeclared (first use this function)
/usr/include/unistd.h:660: (Each undeclared identifier is reported only once
/usr/include/unistd.h:660: for each function it appears in.)
/usr/include/unistd.h:660: `__ubuf' undeclared (first use this function)
/usr/include/linux/fcntl.h: At top level:
In file included from /usr/include/fcntl.h:29,
                 from /usr/include/sys/fcntl.h:1,
                 from hdinfo.c:30:
/usr/include/linux/fcntl.h:60: parse error before `off_t'
/usr/include/linux/fcntl.h:60: warning: no semicolon at end of struct or
union
/usr/include/linux/fcntl.h:61: warning: data definition has no type or
storage class
/usr/include/linux/fcntl.h:62: parse error before `l_pid'
/usr/include/linux/fcntl.h:62: warning: data definition has no type or
storage class
In file included from /usr/include/sys/fcntl.h:1,
                 from hdinfo.c:30:
/usr/include/fcntl.h:40: parse error before `mode_t'
hdinfo.c: In function `main':
hdinfo.c:129: `u_long' undeclared (first use this function)
hdinfo.c:129: parse error before `)'
make[3]: *** [hdinfo] Error 1
make[3]: Leaving directory `/usr/src/dosemu-0.64.3/src/tools/periph'
make[2]: *** [tools/periph] Error 2
make[2]: Leaving directory `/usr/src/dosemu-0.64.3/src'
make[1]: *** [doslibnew] Error 2
make[1]: Leaving directory `/usr/src/dosemu-0.64.3/src'
make: *** [default] Error 2

Thanks,
Mattias
--

Electrical and Computer Engineering Department,
University of Waterloo

 
 
 

Header file problem or dosemu problem?

Post by Mattias Hembru » Tue, 11 Feb 1997 04:00:00




>I recently installed Slackware 3.1 (3.0? - Sept '96) onto my machine at work.
>Install went fine. Then I tried to compile the latest dosemu (0.64.3).

>I have ftp'ed 2.0.28 kernel sources, installed and compiled (and am running)
>the 2.0.28 kernel. I've installed XFree86 3.2A, etc, so things appear to be
>working correctly. However, when I try to compile dosemu, I get the
>following errors (see [COMMENT] below)

>make[3]: Entering directory `/usr/src/dosemu-0.64.3/src/tools/periph'
>gcc -O2 -m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2
>-fomit-frame-pointer -pipe -DUSING_NET   -Wall
>-I/usr/src/dosemu-0.64.3/src/include
>-I/usr/src/dosemu-0.64.3/src/base/dev/pic
>-I/usr/src/dosemu-0.64.3/src/dosext/dpmi  -I/usr/X11R6/include    hdinfo.c
>-o hdinfo
>In file included from hdinfo.c:27:
>/usr/include/unistd.h:630: parse error before `__increment'

Ok, I solved this problem (at least I think I did) by installing the latest
libc header files & gcc 2.7.2.1. Now the problem I have is that some part of
gcc is messed up. If I write a test program which includes stdio.h but has
no source, it complains on the /tmp/$$.i file about the
# 1 <stdio.h> 1
line with something like:
$$.i: invalid numeric constant on line 1

(note: it also mentions stdin on the line above, but I can't remember
exactly where)

In a larger program, it complains about each of the included header files.
Then, it gives a parse error, and then exhausts virtual memory.

The question is, what have I messed up? I originally installed 2.7.2 and
have just installed 2.7.2.1 overtop of it.

Any clues? I'm not above re-installing all of gcc. What's the easiest way to
install a brand new 2.7.2.1 setup? I've already ftp'ed half the files I'm
sure, so it shouldn't be that hard..

Email preferred, but as long as you don't take the thread out of
comp.os.linux.setup, I'll follow it there too

Thanks,
Mattias
--

Electrical and Computer Engineering Department,
University of Waterloo

 
 
 

Header file problem or dosemu problem?

Post by Mattias Hembru » Tue, 11 Feb 1997 04:00:00






>>I recently installed Slackware 3.1 (3.0? - Sept '96) onto my machine at work.
>>Install went fine. Then I tried to compile the latest dosemu (0.64.3).

Ok, I solved both the original problems - gcc was compiling again.. However,
at this point, my system couldn't compile the linux 2.0.28 sources, which I
had just compiled a few days ago with no problems, so I'm doing the complete
reinstall right now.. Hope I don't mess things up again :-)

Mattias
--

Electrical and Computer Engineering Department,
University of Waterloo

 
 
 

1. #ifndef/#ifdef problems in my header file (conditional header inclusion)

        I am finding some very interesting behavior from #define and
#ifndef/#ifdef.  Let's say that I have a header file called MyHeader.h.  This
file is included by all my routines (they usually are in separate files).  Now
that would not be very nice since it would include the very same include files
(stdio.h and others) over and over again.  So, I thought if I use something
like

#ifndef MOOSE
#define MOOSE
#include <stdio.h>
#include <X11/Xlib.h>
#endif

the code would only include *one* copy of these two include files.  What I am
finding out is that is not the case.  Running C programs that have similar
conditional including of header files in gcc (Sparc), Think C (Mac), Borland
TC++ 3.1 for Windows (PC), and SAS/C (Amiga) results in the same thing.  It
really seems that the compiler simply *forgets* what was defined in the
previous .c file and define them all over again.  As a result, my object files
become unnecessarily large.  Yes, the executable seems to take care of that,
but still I am using more disk space than I should.  I am open for suggestions
as usual.

--
 ===========================+=======================================
| Mauricio Tavares          | "We will attack...                    |

|                           |                                Rimmer |
 ===========================+=======================================

2. Account is disabled. help me

3. glibc header files or kernel header files?

4. network question about linux-mandrake + winxp

5. Header file problems.

6. TAMU distribution load problem

7. AIX + gcc - include/header file problem

8. Redhat Won't Boot From CD (LinuxCentral)

9. are the header file and compiler problems fixed yet in RedHat 7.0?

10. problem in standard header file <sys/io.h> ?

11. problem w/ lib4.4 (header files)

12. Problem with header files with GCC

13. Problem with biff sourcing mail file for header information