RE: [Dev-C++] CGI File Locking across server types
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Abhijit S. <mu...@gm...> - 2003-08-04 18:24:42
|
Hello, Michael. > I notice that Dev C++ has fcntl.h. My UNIX book says fcntl is the > only file > lock that works ( is implemented ) across all UNIX platforms. > Working on my > home computer it seems that Windows always locks a file that's in > use, but > then this is not a server. About those I know nothing. > > Dev C++ is a Windows version and it has fcntl so I'm "assuming" it's a > Windows compatible implementation but, if so, does it still work if the > executable is copied to a UNIX machine, or does it have to be compiled on > the machine it's going to be ran on? Executables compiled on Windows will not work on Linux, the source has to be recompiled for this. About your problem, it's a bit tricky, because _fmode() is a function on some platforms and a variable on others. The best way to handle this would be to use a wrapper function and conditional compilation (#ifdef etc.). -- Abhijit Shylanath Homepage: http://mudeth.tripod.com/ |