Message-Id: Date: Thu, 27 Jun 1996 00:16:28 +1200 From: Bill Currie To: djgpp-workers AT delorie DOT com Cc: demmer AT LSTM DOT Ruhr-UNI-Bochum DOT De Subject: diffs for fcntl filesys extensions These are the diffs (-c, two files) for adding fyle system extensions to fcntl(). The only testing I've done is compilabiltiy (-Wall) as I have no application for FS extensions right now (and so far, I have never used fcntl). Bill PS, after having another look at the sources, it's alot simpler than I thought (I did't notice the '&' in the call to func(__FSEXT_fcntl, &rv, &handle) in the functions I looked at (_read and _write I think)). Nicely implemented and easy to use. -------------------------------- cut -fsext.h.diff----------------- *** old\fsext.h Sat Nov 25 23:39:06 1995 --- fsext.h Thu Jun 27 00:01:00 1996 *************** *** 22,27 **** --- 22,28 ---- __FSEXT_write, __FSEXT_ready, __FSEXT_close, + __FSEXT_fcntl, } __FSEXT_Fnumber; /* _ready gets passed a fd and should return a mask of these, -------------------------------- cut -fcntl.c.diff----------------- *** old\fcntl.c Sun Apr 2 03:57:20 1995 --- fcntl.c Thu Jun 27 00:04:48 1996 *************** *** 2,11 **** --- 2,21 ---- #include #include #include + #include int fcntl(int fd, int cmd, ...) { + + __FSEXT_Function *func = __FSEXT_get_function(fd); + if (func) + { + int rv; + if (func(__FSEXT_fcntl, &rv, &fd)) + return rv; + } + switch (cmd) { case F_DUPFD: