ramakrishnan wrote:
> Thanks to Albrecht for the response.
> 
>> How? Do you include it before or after the FLTK headers, or
>> what does this mean? If you include it, what is the full
>> #include statement?
> 
> I have included <dirent.h> before
> FLTK headers. as:
> 
> #include <dirent.h>
> #include <FL/Fl.H>
> #include <FL/Fl_File_Chooser.H>
> #include <FL/fl_ask.H>
> #include <FL/fl_draw.H>
> #include <FL/Fl_Window.H>
> ...

Thanks for the info. That helped me to reproduce it with my Cygwin
build.

>> I wonder why this didn't come up before.
>>
>>> Hope this is acceptable and request you to modify if found correct.
>> I'm not sure about the correctness of your fix. Maybe a newer version
>> of mingw (w32api) introduced dirent.h, and the existing code was written
>> before this happened.
> 
> the current mingw(gcc3.4.5) /win32api have 'dirent.h'
> in 'include' directory.
> 
> the dirent.h in mingw include says:
> * DIRENT.H (formerly DIRLIB.H)

Aha, I see, same here. Maybe this is one reason...

>> Could you please post the result of the following command from your
>> FLTK root directory:
>>
>> $ grep -i dir config.h
>>
>> I'm especially interested in "HAVE_DIRENT_H", but also in all the other
>> defines in this area.
> 
> i dont have 'grep' , so please apologise me for not able to give the 
> requested ones.

No problem.

> I have not built the fltk libs myself. So i dont have the 'configure' etc. It 
> is mingw compatible libs.

I'm somewhat surprised. How did you find (and verify) the fix then?

BTW.: Your fix works on Cygwin (with -mno-cygwin, i.e. in MinGW, AKA
native windows mode) as well. But I'm still not sure if this is the
correct way to fix it.

<Public thinking>
Maybe we need to do something like it is done in scandir.c (lines 30-45)
to find out if dirent (or direct) is defined (or can be defined). This
could be done in a configure test, and then we could define another
macro (HAVE_DIRENT) and make the code in filename.H dependent on this
rather than on the different compilers or build systems.
</Public thinking>

Any ideas, anybody?

Albrecht
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to