C warning that I can't seem to track down

Chris F.A. Johnson cfaj-uVmiyxGBW52XDw4h08c5KA at public.gmane.org
Wed Aug 9 13:16:39 UTC 2006


On Wed, 9 Aug 2006, Mel Wilson wrote:

> Mel Wilson wrote:
>>  bob wrote:
>> >  Still can't believe how obtuse the Linux headers have become since I 
>> >  last looked in any detail.    Maybe Google can tell me where socklen_t 
>> >  is actually defined ...
>> 
>> : -/
>>  unistd.h:# ifndef __socklen_t_defined
>>  unistd.h:typedef __socklen_t socklen_t;
>>  unistd.h:#  define __socklen_t_defined
>>
>>  So there it is, in unistd.h
>>  Now if we only knew what __socklen_t was, we'd be set.  Obtuse?
>>  yeah, I sort of agree.
>
> Turns out __socklen_t is defined in /usr/include/bits/types.h
>
> It's hard to spot because it's defined by a __STD_TYPE statement
> which is a #defined extension to typedef.  It's a __U32_TYPE
> which is a defined stand-in for unsigned int.
>
> Found this with a little Python thing that scrambles through
> the directory tree finding strings in files.

    Python???

    What's wrong with 'grep -r'?

-- 
    Chris F.A. Johnson                      <http://cfaj.freeshell.org>
    ===================================================================
    Author:
    Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list