Mercurial > hg > octave-lyh > gnulib-hg
changeset 1214:a6150f7af1bd
Include sys/param.h only #if HAVE_SYS_PARAM_H.
Move function-spanning `#if ...BSIZE' stmt to follow inclusion of
sys/param.h since BSIZE is sometimes defined in sys/param.h.
Based on a patch from Philippe De Muyter.
author | Jim Meyering <jim@meyering.net> |
---|---|
date | Mon, 12 Jan 1998 08:13:39 +0000 |
parents | 92d0e58d9db9 |
children | f28266e1c1dc |
files | lib/fileblocks.c |
diffstat | 1 files changed, 8 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/lib/fileblocks.c +++ b/lib/fileblocks.c @@ -1,5 +1,5 @@ /* Convert file size to number of blocks on System V-like machines. - Copyright (C) 1990, 1997 Free Software Foundation, Inc. + Copyright (C) 1990, 1997, 1998 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -21,9 +21,13 @@ # include <config.h> #endif +#include <sys/types.h> + +#if HAVE_SYS_PARAM_H +# include <sys/param.h> +#endif + #if !HAVE_ST_BLOCKS && !defined _POSIX_SOURCE && defined BSIZE -# include <sys/types.h> -# include <sys/param.h> # if HAVE_UNISTD_H # include <unistd.h> @@ -32,7 +36,7 @@ # ifndef NINDIR /* Some SysV's, like Irix, seem to lack this. Hope it's correct. */ /* Number of inode pointers per indirect block. */ -# define NINDIR (BSIZE/sizeof(daddr_t)) +# define NINDIR (BSIZE / sizeof (daddr_t)) # endif /* !NINDIR */ /* Number of direct block addresses in an inode. */