[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: strnlen on OSX & C++
From: |
Simon Josefsson |
Subject: |
Re: strnlen on OSX & C++ |
Date: |
Thu, 22 Apr 2010 10:42:27 +0200 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (gnu/linux) |
Jarno Rajahalme <address@hidden> writes:
> Bruno,
>
> I have those patches applied (and a up-to-date gnulib, as git diff shows
> nothing), but now get a different compilation error:
>
> In file included from main.cc:4:
> ../lib/string.h:684: error: 'strnlen' was not declared in this scope
> ../lib/string.h:684: error: invalid type in declaration before ';' token
I get this error too, see:
http://autobuild.josefsson.org/gnulib/log-201004210723405464000.txt
> This is the same issue as with fchownat before, and this patch makes
> the compile and run successful:
Is the patch the right thing?
/Simon
>
> $ git diff
> diff --git a/lib/string.in.h b/lib/string.in.h
> index de446b4..e01dbd8 100644
> --- a/lib/string.in.h
> +++ b/lib/string.in.h
> @@ -389,7 +389,9 @@ _GL_FUNCDECL_SYS (strnlen, size_t, (char const *__string,
> si
> # endif
> _GL_CXXALIAS_SYS (strnlen, size_t, (char const *__string, size_t __maxlen));
> # endif
> +# if @HAVE_DECL_STRNLEN@
> _GL_CXXALIASWARN (strnlen);
> +# endif
> #elif defined GNULIB_POSIXCHECK
> # undef strnlen
> # if HAVE_RAW_DECL_STRNLEN
>
> Jarno
Re: strnlen on OSX & C++, Bruno Haible, 2010/04/10
Re: gnulib bugs on OSX & C++, Bruno Haible, 2010/04/10
Re: gnulib bugs on OSX & C++, Bruno Haible, 2010/04/10