delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2008/05/04/07:39:24

X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f
X-Recipient: djgpp-workers AT delorie DOT com
X-Authenticated: #27081556
X-Provags-ID: V01U2FsdGVkX1913UEILEx1ISJfcqdWRhX2o0WHLgNYM6tXutraWG
6QPxywKIw6Gg1x
From: Juan Manuel Guerrero <juan DOT guerrero AT gmx DOT de>
To: djgpp-workers AT delorie DOT com
Subject: Re: DT_SOCK and S_IFSOCK.
Date: Sun, 4 May 2008 13:38:43 +0200
User-Agent: KMail/1.9.5
References: <200805040031 DOT 30990 DOT juan DOT guerrero AT gmx DOT de> <200805040344 DOT 26801 DOT juan DOT guerrero AT gmx DOT de> <200805040219 DOT m442Js8R007372 AT envy DOT delorie DOT com>
In-Reply-To: <200805040219.m442Js8R007372@envy.delorie.com>
MIME-Version: 1.0
Message-Id: <200805041338.47052.juan.guerrero@gmx.de>
X-Y-GMX-Trusted: 0
Reply-To: djgpp-workers AT delorie DOT com

OFYI, here is the "ofending" code:

#ifdef DT_SOCK
    case DT_SOCK: return S_IFSOCK;
#endif
    default:
      return 0;			/* Unknown. */

As can be seen they assume that the existance of DT_SOCK automaticaly implies
the existance of S_IFSOCK.  They not even try to use DTTOIF to translate  DT_SOCK
to S_IFSOCK, so that is not possible to implement an error signaling mechanism in
DTTOIF, if that is possible and wanted at all.  IMHO Iit would be the most
logical approache to remove DT_SOCK from dirent.h if we do not have S_IFSOCK
and, if this does not break something.  It should also be noticed that a consequence
of this is that  DTTOIF returns a useless value for DT_SOCK.
Of course, in this particular case the solution for the findutils code is trivial.

Regards,
Juan M. Guerrero

- Raw text -


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