Date: Mon, 5 Jul 1999 10:35:29 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: Richard Dawe cc: DJGPP workers Subject: Re: Request: S_IFSOCK & S_ISSOCK in sys/stat.h In-Reply-To: <377FB329.202901E3@tudor21.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp-workers AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk 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 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.