[libdispatch-dev] Solaris portability, patch for internal.h, include strings.h for bzero in queue.c
Jean-Daniel Dupas
devlists at shadowlab.org
Mon Nov 9 06:53:33 PST 2009
I'm with Paolo on this point.
Unlike memset which is now a macro optimized to use __builtin
functions when possible (on Darwin), bzero remain a simple function
and is not available everywhere.
Le 9 nov. 2009 à 14:32, Joakim Johansson a écrit :
> Ok, it was available on OS X as well and seems to be part of POSIX
> according to the OS X man page?
>
> -----
> HISTORY
> A bzero() function appeared in 4.3BSD. Its prototype existed
> previously in <string.h> before it was
> moved to <strings.h> for IEEE Std 1003.1-2001 (``POSIX.1'')
> compliance.
> -----
>
> Joakim
>
>
> On 9 nov 2009, at 14.16, Paolo Bonzini wrote:
>
>> On Mon, Nov 9, 2009 at 14:01, Joakim Johansson <jocke at tbricks.com>
>> wrote:
>>> bzero() is used in queue.c and is available from strings.h, needs
>>> an include
>>> for it.
>>
>> Probably better to use memset instead. bzero is on its way to
>> obsoletion.
>>
>> Also, strings.h is SVR-ism and is not available on many platforms.
>>
>> Paolo
>
> _______________________________________________
> libdispatch-dev mailing list
> libdispatch-dev at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/libdispatch-dev
>
-- Jean-Daniel
More information about the libdispatch-dev
mailing list