Re: [Qemu-devel] [libfdt][PATCH v3] implement strnlen for systems that need it

2017-10-25 Thread Programmingkid
> On Oct 24, 2017, at 8:18 AM, Stefan Hajnoczi wrote: > > On Mon, Oct 23, 2017 at 05:27:26PM +0100, Peter Maydell wrote: >> On 23 October 2017 at 17:09, Stefan Hajnoczi wrote: +/* strnlen() is not available on Mac OS < 10.7 */ +# if (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_

Re: [Qemu-devel] [libfdt][PATCH v3] implement strnlen for systems that need it

2017-10-25 Thread Stefan Hajnoczi
On Mon, Oct 23, 2017 at 05:27:26PM +0100, Peter Maydell wrote: > On 23 October 2017 at 17:09, Stefan Hajnoczi wrote: > >> +/* strnlen() is not available on Mac OS < 10.7 */ > >> +# if (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7) > > > > Does this cover the case where MAC_OS_X_VERSION_MAX

Re: [Qemu-devel] [libfdt][PATCH v3] implement strnlen for systems that need it

2017-10-24 Thread Programmingkid
> On Oct 24, 2017, at 8:09 AM, Stefan Hajnoczi wrote: > > On Mon, Oct 23, 2017 at 11:13:13PM -0400, Programmingkid wrote: >> >>> On Oct 23, 2017, at 12:09 PM, Stefan Hajnoczi wrote: >>> >>> On Sun, Oct 22, 2017 at 10:50:16PM -0400, John Arbuckle wrote: Prior the Mac OS 10.7, the function

Re: [Qemu-devel] [libfdt][PATCH v3] implement strnlen for systems that need it

2017-10-24 Thread Stefan Hajnoczi
On Mon, Oct 23, 2017 at 11:13:13PM -0400, Programmingkid wrote: > > > On Oct 23, 2017, at 12:09 PM, Stefan Hajnoczi wrote: > > > > On Sun, Oct 22, 2017 at 10:50:16PM -0400, John Arbuckle wrote: > >> Prior the Mac OS 10.7, the function strnlen() was not available. This patch > >> implements strnl

Re: [Qemu-devel] [libfdt][PATCH v3] implement strnlen for systems that need it

2017-10-23 Thread Peter Maydell
On 24 October 2017 at 04:45, Programmingkid wrote: > I was operating under the assumption that MAC_OS_X_VERSION_MAX_ALLOWED > would equal the version of the host. It indicates the highest version of OSX whose features the program being compiled is allowed to use. That isn't necessarily the same a

Re: [Qemu-devel] [libfdt][PATCH v3] implement strnlen for systems that need it

2017-10-23 Thread Programmingkid
> On Oct 23, 2017, at 12:27 PM, Peter Maydell wrote: > > On 23 October 2017 at 17:09, Stefan Hajnoczi wrote: >>> +/* strnlen() is not available on Mac OS < 10.7 */ >>> +# if (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7) >> >> Does this cover the case where MAC_OS_X_VERSION_MAX_ALLOWED

Re: [Qemu-devel] [libfdt][PATCH v3] implement strnlen for systems that need it

2017-10-23 Thread Programmingkid
> On Oct 23, 2017, at 12:09 PM, Stefan Hajnoczi wrote: > > On Sun, Oct 22, 2017 at 10:50:16PM -0400, John Arbuckle wrote: >> Prior the Mac OS 10.7, the function strnlen() was not available. This patch >> implements strnlen() on Mac OS X versions that are below 10.7. >> >> Signed-off-by: John Ar

Re: [Qemu-devel] [libfdt][PATCH v3] implement strnlen for systems that need it

2017-10-23 Thread Peter Maydell
On 23 October 2017 at 17:09, Stefan Hajnoczi wrote: >> +/* strnlen() is not available on Mac OS < 10.7 */ >> +# if (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7) > > Does this cover the case where MAC_OS_X_VERSION_MAX_ALLOWED is set to > <1070 on a 10.7+ build machine? It's possible that

Re: [Qemu-devel] [libfdt][PATCH v3] implement strnlen for systems that need it

2017-10-23 Thread Stefan Hajnoczi
On Sun, Oct 22, 2017 at 10:50:16PM -0400, John Arbuckle wrote: > Prior the Mac OS 10.7, the function strnlen() was not available. This patch > implements strnlen() on Mac OS X versions that are below 10.7. > > Signed-off-by: John Arbuckle > --- > v3 changes: > - Replaced loop with memchr() > > v

[Qemu-devel] [libfdt][PATCH v3] implement strnlen for systems that need it

2017-10-22 Thread John Arbuckle
Prior the Mac OS 10.7, the function strnlen() was not available. This patch implements strnlen() on Mac OS X versions that are below 10.7. Signed-off-by: John Arbuckle --- v3 changes: - Replaced loop with memchr() v2 changes: - Simplified the code to make it static inline'ed - Changed the type o