mailing list of musl libc
 help / color / mirror / code / Atom feed
From: 小林悠 <yukoba@gmail.com>
To: musl@lists.openwall.com
Subject: Re: SUN_LEN
Date: Wed, 21 Aug 2013 21:23:33 +0900	[thread overview]
Message-ID: <CAOayUka=d2+zzv04gCZmYKv84U8_6jTuam6PPo2OGoL1BGEsPg@mail.gmail.com> (raw)
In-Reply-To: <5214AC94.9090408@barfooze.de>

Hello.

> which program needs it ?

It is used in here.
https://android.googlesource.com/platform/system/core/+/master/libcutils/properties.c

> are these 2 lines meant to be connected with a \ ?

Yes. Sorry, I'm using Gmail and the line was too long.
Gmail splits a long line automatically.


2013/8/21 John Spencer <maillist-musl@barfooze.de>:
> On 08/21/2013 11:57 AM, 小林悠 wrote:
>>
>> Hello.
>>
>> Could you please add SUN_LEN() to sys/un.h?
>
>
> which program needs it ?
>
>
>>
>> diff --git a/include/sys/un.h b/include/sys/un.h
>> index 769dac6..5289227 100644
>> --- a/include/sys/un.h
>> +++ b/include/sys/un.h
>> @@ -10,4 +10,9 @@ struct sockaddr_un
>>          char sun_path[108];
>>   };
>>
>> +#ifndef SUN_LEN
>> +#include<string.h>
>
>
> this looks like a namespace violation to me
>
>
>> +#define SUN_LEN(ptr) ((size_t) (((struct sockaddr_un *) 0)->sun_path)
>> + strlen((ptr)->sun_path))
>
>
> are these 2 lines meant to be connected with a \ ?
> as-is, this won't work...
>
> in glibc, it is defined as
> # define SUN_LEN(ptr) ((size_t) (((struct sockaddr_un *) 0)->sun_path)
> \
>
>                       + strlen ((ptr)->sun_path))
>
>
>> +#endif
>> +
>>   #endif
>>
>



-- 

Yu Kobayashi <yukoba@gmail.com>


  reply	other threads:[~2013-08-21 12:23 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-21  9:57 SUN_LEN 小林悠
2013-08-21 12:03 ` SUN_LEN John Spencer
2013-08-21 12:23   ` 小林悠 [this message]
2013-08-21 12:38     ` SUN_LEN John Spencer
2013-08-21 13:27       ` SUN_LEN 小林悠
2013-08-21 14:45         ` SUN_LEN Szabolcs Nagy
2013-08-21 15:25           ` SUN_LEN 小林悠
2013-08-21 16:23           ` SUN_LEN Rich Felker
2013-08-21 16:34             ` SUN_LEN Szabolcs Nagy
2013-08-21 16:36               ` SUN_LEN Rich Felker
2013-08-21 16:42                 ` SUN_LEN Rich Felker
2013-08-21 17:00                   ` SUN_LEN Szabolcs Nagy
2013-08-21 17:11                     ` SUN_LEN Yu Kobayashi
2013-08-21 17:25                       ` SUN_LEN Rich Felker
2013-08-21 17:29                         ` SUN_LEN Yu Kobayashi
2013-08-21 17:58                           ` SUN_LEN Yu Kobayashi
2013-08-21 18:07                             ` SUN_LEN Rich Felker
2013-08-21 17:32                       ` SUN_LEN Rich Felker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAOayUka=d2+zzv04gCZmYKv84U8_6jTuam6PPo2OGoL1BGEsPg@mail.gmail.com' \
    --to=yukoba@gmail.com \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).