===>>> cc compile error <<<===

===>>> cc compile error <<<===

Post by paul » Thu, 10 Aug 1995 04:00:00



My e-mail address is:

I got thr program Astrolog and made some slight modifications to a file
and did a 'make'.  I got the error below and it is not from a file
I modified but from a supplied directory.

Ok, here's what error says when I compile with gcc or just cc :

/usr/include/unistd.h:660: parse error before '__dev'

Below is the file with line 660 that the '__dev' is on

extern int      iopl __P((int __level));

extern char*    mktemp __P((char *__template));
extern int      mkstemp __P((char *__template));

extern int      nice __P ((int __val));

extern int      profil __P ((char *__buf, int __bufsiz, int __offset,
                        int __scale));

extern void     usleep __P((unsigned long __usec));

extern int      ustat __P ((dev_t __dev, struct ustat* __ubuf));

extern int      idle __P ((void));
extern int      reboot __P ((int __magic, int __magic_too,
                        int __flag));

extern int      swapoff __P ((__const char * __specialfile));

extern int      uselib __P ((__const char *__filename));

extern int      getdomainname __P ((char *__name, size_t __len));
extern int      setdomainname __P ((__const char *__name, size_t __len));

 
 
 

1. ===>>> cc compile error <<<===

  ...
  | /usr/include/unistd.h:660: parse error before '__dev'

It's gcc's way to tell you he doesn't know about the type in
front of __dev.

  | Below is the file with line 660 that the '__dev' is on
  ...
  | extern int  ustat __P ((dev_t __dev, struct ustat* __ubuf));
  ...

It appears that unistd.h doesn't effectively include sys/types.h (BTW I
think it _should_ include it, so... bug? or am I wrong ?).
You should add
        #include <sys/types.h>
before
        #include <unistd.h>
in the appropriate files of your application.

Hope this helps,
Fabien.

--

,---------------------------.
| Fabien COUTANT            |
| Steria                    |
| 12, rue Paul DAUTIER      |
| 78140 VELIZY VILLACOUBLAY |
| FRANCE                    |
`---------------------------'

2. Bourne/Korn .profile

3. Scannig files, C time routine help.

4. <><><> MOUNTING EXTENDED PARTITION <><><>

5. Network Redundancy

6. Wanted: <><><> Unix Specialist <><><>

7. ignore test

8. LILO help <><><><><><>

9. <Alt>+<key> = <Esc><key> ?

10. *{<><>}*Linux*Screen*Difficulties*{<><>}*

11. << <<anyone using dyn-html?>> >>

12. (<><>)*Linux*Screen*Difficulties*(<><>)