This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: libiberty patch committed: Add strnlen
On Tue, Sep 18, 2012 at 9:25 AM, Jakub Jelinek <jakub@redhat.com> wrote:
> On Tue, Sep 18, 2012 at 09:03:03AM -0700, Ian Lance Taylor wrote:
>> +*/
>> +
>> +#include "config.h"
>
> Shouldn't this #include <stddef.h> for size_t, or is config.h providing
> size_t? Or #include <sys/types.h> ? From what I can see, config.h doesn't
> always define size_t, only if sys/types.h doesn't define it.
Yes, the patch as committed does #include <stddef.h>. There are other
files in libiberty that unconditionally #include <stddef.h> so I
figured that was portable enough. I guess I forgot to update the
patch attachment after making that change. Thanks for pointing it
out.
Ian