From: falin AT my-deja DOT com Newsgroups: comp.os.msdos.djgpp Subject: fcntl(), flock() and lock() Date: Fri, 27 Oct 2000 22:16:59 GMT Organization: Deja.com - Before you buy. Lines: 39 Message-ID: <8tcusl$e46$1@nnrp1.deja.com> NNTP-Posting-Host: 212.89.19.128 X-Article-Creation-Date: Fri Oct 27 12:11:06 2000 GMT X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows 95) X-Http-Proxy: 1.1 bender.geninfor.com:3128 (Squid/2.3.STABLE1), 1.0 x61.deja.com:80 (Squid/1.1.22) for client 192.168.0.25, 212.89.19.128 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Hello, guys I've got C/Database Toolchest from MIX software. This is a pretty source code library to organize data files using b-tree files. I want to use it under Dos/Win and Linux. There are different versions for DOS, Win and Linux, but all is the same except one of the files, responsible of input and output to the filesystem. Now, I cannot use directly none of the three versions with DJGPP. DOS version uses interrupt calls, Windows version uses Windows services and Linux version uses fcntl() to control file locking. My question is if anybody knows if it is possible to implement locking services of fcntl() to compile this without change with Linux GCC and DJGPP. If not, I'll have to put calls to lock() instead but I'm not sure it does exactly the same thing. And in this case, why Linux does not have lock() but flock()? I would like to know about anybody who has ported some similar code (I think it is likely common). I want not to fight next month with a database fail caused by a bad use of file locking. Thank you for reading and sorry for bad english Rafael García Aviles-Asturias-Spain Sent via Deja.com http://www.deja.com/ Before you buy.