Java front-end on m68k-next-nextstep3: parse.y:3980: parse errorbefore `DIR'

Toon Moene toon@moene.indiv.nluug.nl
Tue Sep 15 19:05:00 GMT 1998


>> /nfs/hoser/beer/java/egcs/gcc/java/parse.y:3980: parse error  
before `DIR'

>  Well, Posix.1 requires <dirent.h> to define DIR, so it
>  looks to me like you've got a bogus <dirent.h> in your
>  search path.  (Non-standard nextstep header files are of
>  course not unherad-of ...)

Sure:

% ls -l /usr/include
lrwxrwxrwx  1 root          24 Aug 29  1996 /usr/include ->  
../NextDeveloper/Headers@
% find /NextDeveloper/Headers -name dirent.h -print
/NextDeveloper/Headers/bsd/dirent.h
/NextDeveloper/Headers/bsd/sys/dirent.h
/NextDeveloper/Headers/g++/dirent.h
% cat /NextDeveloper/Headers/bsd/dirent.h
/* Copyright 1993 NeXT Computer, Inc. - WMG */

#ifndef _DIRENT_H
#define _DIRENT_H

#include <standards.h>

#ifdef _POSIX_SOURCE
        #include <sys/dir.h>            /* for struct DIR and */
                                        /* function declarations. */
        #include <sys/dirent.h>         /* for struct dirent */
#endif /* _POSIX_SOURCE */
#endif /* _DIRENT_H */

;-)

Unfortunately, I don't think it is a good idea to compile the Java  
front-end with -D_POSIX_SOURCE - I've had bad experience with that  
in the past; it was well known on comp.sys.next.* that POSIX support  
in NEXTSTEP3 basically didn't work.

Well, that means that I'll leave the Java frontend out of the loop  
for now - knowing nothing about Java would have made my contribution  
in testing it rather insignificant anyhow ...

Cheers,
Toon.



More information about the Gcc mailing list