mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Gregor Richards <gr@purdue.edu>
To: musl@lists.openwall.com
Subject: Re: Re: dirent.h and __NEED_size_t
Date: Fri, 24 Aug 2012 11:40:34 -0400	[thread overview]
Message-ID: <5037A072.5000300@purdue.edu> (raw)
In-Reply-To: <CAPLrYET8jyTUXFnPyOHj6-wKz5LZP2n_4e=wa6vVdZnkeS9T=g@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 532 bytes --]

It's probably best to avoid multiply including bits/alltypes.h within 
one file (although it's not a big deal since that file will be included 
dozens of times regardless).

With valediction,
  - Gregor Richards

On 08/24/2012 11:32 AM, Daniel Cegiełka wrote:
> Ok! :)
>
> 2012/8/24 Daniel Cegiełka <daniel.cegielka@gmail.com>:
>> Sorry - this patch doesn't work properly. However, it breaks
>> compilation if we don't have a visible size_t...
>>
>>
>> 2012/8/24 Daniel Cegiełka <daniel.cegielka@gmail.com>:
>>> regads,
>>> daniel


[-- Attachment #2: dirent_size_t.diff --]
[-- Type: text/x-diff, Size: 310 bytes --]

diff -r fab1146cec43 include/dirent.h
--- a/include/dirent.h	Thu Aug 23 14:38:34 2012 -0400
+++ b/include/dirent.h	Fri Aug 24 11:39:38 2012 -0400
@@ -7,6 +7,9 @@
 
 #define __NEED_ino_t
 #define __NEED_off_t
+#ifdef _BSD_SOURCE
+#define __NEED_size_t /* for getdents */
+#endif
 
 #include <bits/alltypes.h>
 

  reply	other threads:[~2012-08-24 15:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-24 15:16 Daniel Cegiełka
2012-08-24 15:27 ` Daniel Cegiełka
2012-08-24 15:32   ` Daniel Cegiełka
2012-08-24 15:40     ` Gregor Richards [this message]
2012-08-24 18:23       ` Header testing [Re: [musl] Re: dirent.h and __NEED_size_t] Rich Felker
2012-08-24 20:04         ` John Spencer
2012-08-24 20:16           ` Rich Felker
2012-08-24 20:48             ` John Spencer
2012-08-24 21:12               ` 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=5037A072.5000300@purdue.edu \
    --to=gr@purdue.edu \
    --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).