Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 May 1998 19:52:37 -0700
From:      Mike Smith <mike@smith.net.au>
To:        "John W. DeBoskey" <jwd@unx.sas.com>
Cc:        freebsd-current@FreeBSD.ORG
Subject:   Re: cdrecord & core dumps 
Message-ID:  <199805310252.TAA08893@antipodes.cdrom.com>
In-Reply-To: Your message of "Sat, 30 May 1998 22:23:03 EDT." <199805310223.AA23531@mozart> 

next in thread | previous in thread | raw e-mail | index | archive | help
> 
>    First of all, the following code is incorrect for FreeBSD.
> _SC_PAGESIZE is defined in the header files, but it is not supported
> via sysconf(), hence pagesize gets set to -1.
> 
> In init_fifo() (fifo.c)
> 
> #ifdef  _SC_PAGESIZE
>         pagesize = sysconf(_SC_PAGESIZE);
> #else
>         pagesize = getpagesize();
> #endif 

I've actually patched this to:

	int	pagesize = -1;

#ifdef _SC_PAGESIZE
	pagesize = sysconf(_SC_PAGESIZE);
#endif
	if (pagesize == -1)
		pagesize = getpagesize();

Which is about as readable as is reasonable.

-- 
\\  Sometimes you're ahead,       \\  Mike Smith
\\  sometimes you're behind.      \\  mike@smith.net.au
\\  The race is long, and in the  \\  msmith@freebsd.org
\\  end it's only with yourself.  \\  msmith@cdrom.com



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199805310252.TAA08893>