[m-rev.] diff: fix warnings from runtime on MacOS 10.3

Peter Ross pro at missioncriticalit.com
Thu Jun 30 02:05:34 AEST 2005


On Wed, Jun 29, 2005 at 04:01:07PM +1000, Julien Fischer wrote:
> Index: mercury_reg_workarounds.c
> ===================================================================
> RCS file: /home/mercury1/repository/mercury/runtime/mercury_reg_workarounds.c,v
> retrieving revision 1.7
> diff -u -r1.7 mercury_reg_workarounds.c
> --- mercury_reg_workarounds.c	15 Dec 2004 06:57:50 -0000	1.7
> +++ mercury_reg_workarounds.c	29 Jun 2005 05:52:40 -0000
> @@ -16,6 +16,15 @@
> 
>  #ifdef	MR_CAN_DO_PENDING_IO
> 
> +/*
> +** Work around for a problem on MacOS 10.3 and earlier.
> +** The function prototype for bzero() is not visible otherwise.
> +** This seems to have been fixed in MacOS 10.4.
> +*/
> +#if defined(__APPLE__) && (__MACH__)
> +	#include <strings.h>
> +#endif
> +
>  #include <sys/types.h>	/* for fd_set and FD_ZERO() */
>  #include <sys/time.h>	/* for FD_ZERO() */
> 
It would be much better to add a configure test for the missing bzero,
and then test to see if including strings.h fixes it.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list