No subject
Tue Jun 22 17:11:04 PDT 2004
/* Define if you have the <dirent.h> header file. */
#define HAVE_DIRENT_H 1
When the source code is compiled the dirent.h file is included
but the code is skipped because it does not think DIR is defined.
Here is what the preprocessor spits out given the -E option.
HArrayOfObject*
java_io_File_list0(struct Hjava_io_File* this)
{
# 297 "../../../../libraries/clib/io/File.c"
return (0);
}
Here is a short example that checks for DIR.
% cat test2.c
#include <sys/types.h>
#include <dirent.h>
int main() {
#if defined(DIR)
DIR *dirp = 0;
#else
#error NODIR
#endif
return 0;
}
% gcc -c test2.c
test2.c:9: #error NODIR
So I tried to force it to compile using -DDIR.
% gcc -c -DDIR test2.c
In file included from test2.c:3:
/usr/include/dirent.h:111: parse error before `1'
Here is the section of the dirent.h file that defines DIR.
/* This is the data type of directory stream objects.
The actual structure is opaque to users. */
typedef struct __dirstream DIR; (Line 111)
The strange part is that I can not find a definition for __dirstream
anywhere on my system.
Any ideas?
Thanks
Mo DeJong
dejong at cs.umn.edu
More information about the kaffe
mailing list