[Queue-developers] dir file descriptors
Brought to you by:
wkrebs
From: Mike C. <da...@ix...> - 2001-04-25 05:19:40
|
I propose the initial following patch: Index: queued.c =================================================================== RCS file: /cvsroot/queue/queue-development/queued.c,v retrieving revision 1.46 diff -u -r1.46 queued.c --- queued.c 2001/04/11 20:46:10 1.46 +++ queued.c 2001/04/25 05:16:25 @@ -79,7 +79,7 @@ * GNU/Linux differs here from other OSes in that * it has named the descriptor 'fd' rather than 'dd_fd'. */ -# define QUEUE_PROPER__DIR_FD(dir) (*((int*)dir)) +# define QUEUE_PROPER__DIR_FD(dir) (dirfd(dir)) # else # define QUEUE_PROPER__DIR_FD(dir) (dir->dd_fd) #endif Actually, doing anything "file descriptor" wise with DIR is a bit suspicious. However, I think that something along the line of: #ifdef HAVE_DIRFD # define QUEUE_PROPER__DIR_FD(dir) (dirfd(dir)) #else # define QUEUE_PROPER__DIR_FD(dir) (dir->dd_fd) #endif With the appropriate autoconf magic would be a better solution. mrc -- Mike Castle Life is like a clock: You can work constantly da...@ix... and be right all the time, or not work at all www.netcom.com/~dalgoda/ and be right at least twice a day. -- mrc We are all of us living in the shadow of Manhattan. -- Watchmen |