Hi Björn,

In unix, usually 'mkdir' and 'unlink' are found in 
the very ubiquitous unix header -
#include <unistd.h>

Maybe this was previously being included through 
the many FLTK, and other headers included... but 
was removed from one of them in some later versions, 
so this could be the 'change', and NOT in the FG 
code, as Thorsten suggested...

Since 'unlink' and 'mkdir' are DIRECTLY used in 
the file fgadmin_funcs.cxx, it would be quite correct 
to include it there and NOT depend on other headers
pulling it in...

Perhaps like :-

#ifdef _WIN32
#  include <direct.h>
#else // !_WIN32
#include <unistd.h>
#endif

Note it should be included OUTSIDE the Windows code, 
since this header is NOT 'standard' in Windows 
building ;=((.

HTH.

Regards,
Geoff.

On Sat, 2012-04-07 at 13:02 +0200, ThorstenB wrote:
> On 06.04.2012 19:07, Björn Kesten wrote:
> > I hope this is the right place for GIT version related things.
> 
> Certainly is ;-).
> 
> > utils/fgadmin/src/CMakeFiles/fgadmin.dir/fgadmin_funcs.cxx.o
> > /home/bjoern/fg_git/sources/flightgear/utils/fgadmin/src/fgadmin_funcs.cxx:
> > In function ‘void remove_dir(const char*, void (*)(void*, int), void*,
> > bool)’:
> > /home/bjoern/fg_git/sources/flightgear/utils/fgadmin/src/fgadmin_funcs.cxx:363:39:
> > error: ‘unlink’ was not declared in this scope
> 
> Jenkins always builds the latest Git sources - and everything is fine 
> there. Also, I cannot see anything that has changed about "fgadmin" in 
> recent weeks, neither any change of the few includes it is using. So, 
> it's weird if things suddenly changed for you. Seems like some change on 
> your system...
> 
> Furthermore, "rmdir" and "unlink" are standard POSIX functions and 
> should be available in the global scope. Which compiler/version are you 
> using? Have you upgraded recently?
> 
> cheers,
> Thorsten



------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Flightgear-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to