delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/07/05/03:37:47

Date: Mon, 5 Jul 1999 10:35:29 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Richard Dawe <richdawe AT bigfoot DOT com>
cc: DJGPP workers <djgpp-workers AT delorie DOT com>
Subject: Re: Request: S_IFSOCK & S_ISSOCK in sys/stat.h
In-Reply-To: <377FB329.202901E3@tudor21.net>
Message-ID: <Pine.SUN.3.91.990705103509.278I-100000@is>
MIME-Version: 1.0
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

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019