On Sat, 02 Nov 2002, Bart Oldeman wrote: [...] > Now with fcntl64 we can probably avoid this wizardry but will probably > also need to use open64 instead of open and check the kernel version at > runtime?
If you want you can check kernel version. But I rather think that it should be set as compilation switch. But is your choice. > $ man fcntl64 > No manual entry for fcntl64 I had to read header files and kernel sources as documentation :-( You can use F_GETLK64, F_SETLK64, F_SETLKW64 in standard fcntl if you add #define _GNU_SOURCE to your .c source (see /usr/include/features.h) That's all what you need. I attach simple demonstration program. best regards, Przemek
fl.c.gz
Description: GNU Zip compressed data
