Mail Archives: djgpp-workers/1999/07/05/03:37:47
On Sun, 4 Jul 1999, Richard Dawe wrote:
> I was wondering if it would be possible to add definitions for S_IFSOCK
> and S_ISSOCK to sys/stat.h:
>
> #define S_IFSOCK 0x6000
> #define S_ISSOCK (((m) & 0xf000) == S_IFSOCK)
>
> Some value other than 0x6000 could be used.
>
> I ask because it would make writing libsocket's stat() support easier. No
> patches to sys/stat.h would be required, which is easier not only for me,
> but also end users of the library.
We need to establish whether libsocket supports all the features that
the existence of S_IFSOCK indicates. This support can be degenerate,
like what we do in `mknode', but it must be there, or else some
program that ifdef's code conditioned on S_IFSOCK will do the wrong
thing.
I don't know enough about either sockets or libsocket to tell how
close we are to that goal. Can you look into this issue and post here
what you find?
In addition, there's a problem of having S_IFSOCK without libsocket
being installed. Does this present a problem in the sense of
(un)supported features that programs which use S_IFSOCK assume?
Again, I don't have the answer.
If having S_IFSOCK without libsocket can be a problem, we could make
<sys/stat.h> include some internal header that will be empty in djdev
and will be replaced by libsocket installation; then this internal
header could define S_IFSOCK.
- Raw text -