Re: struct stat{st_blksize} for /dev entries in 2.4.3

From: Ulrich Drepper (drepper@redhat.com)
Date: Sun Apr 08 2001 - 13:46:25 EST


Russell Coker <russell@coker.com.au> writes:

> diff -ru textutils-2.0/src/cat.c textutils-new/src/cat.c
> --- textutils-2.0/src/cat.c Sun Apr 8 22:55:10 2001
> +++ textutils-new/src/cat.c Sun Apr 8 23:23:54 2001
> @@ -790,6 +790,9 @@
> if (options == 0)
> {
> insize = max (insize, outsize);
> +#ifdef _SC_PHYS_PAGES
> + insize = max (insize, sysconf(_SC_PAGESIZE));
> +#endif
> inbuf = (unsigned char *) xmalloc (insize);
>
> simple_cat (inbuf, insize);

The #ifdef is certainly wrong. And there is no guarantee that any of
the _SC_* constants are defined as macros. You'll have to add a
configure test.

-- 
---------------.                          ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at redhat.com   `------------------------
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Apr 15 2001 - 21:00:10 EST