1 /* @(#)param.h 1.7 12/01/22 Copyright 2006-2011 J. Schilling */ 2 /* 3 * Abstraction from sys/param.h 4 * 5 * Copyright (c) 2006-2011 J. Schilling 6 */ 7 /* 8 * The contents of this file are subject to the terms of the 9 * Common Development and Distribution License, Version 1.0 only 10 * (the "License"). You may not use this file except in compliance 11 * with the License. 12 * 13 * See the file CDDL.Schily.txt in this distribution for details. 14 * A copy of the CDDL is also available via the Internet at 15 * http://www.opensource.org/licenses/cddl1.txt 16 * 17 * When distributing Covered Code, include this CDDL HEADER in each 18 * file and include the License file CDDL.Schily.txt from this distribution. 19 */ 20 21 #ifndef _SCHILY_PARAM_H 22 #define _SCHILY_PARAM_H 23 24 #ifndef _SCHILY_MCONFIG_H 25 #include <schily/mconfig.h> 26 #endif 27 28 /* 29 * Let us include system defined types first. 30 */ 31 #ifndef _SCHILY_TYPES_H 32 #include <schily/types.h> 33 #endif 34 #ifdef HAVE_SYS_PARAM_H 35 #ifndef _INCL_SYS_PARAM_H 36 #include <sys/param.h> /* Must be before limits.h */ 37 #define _INCL_SYS_PARAM_H 38 #endif 39 #endif 40 #ifndef _SCHILY_LIMITS_H 41 #include <schily/limits.h> /* For _SC_CLK_TCK */ 42 #endif 43 #ifndef _SCHILY_UNISTD_H 44 #include <schily/unistd.h> /* For _SC_CLK_TCK */ 45 #endif 46 47 #ifndef NBBY 48 #define NBBY 8 /* Number of bits per byte */ 49 #endif 50 51 #ifndef DEV_BSIZE 52 #define DEV_BSIZE 512 /* UNIX Device Block size */ 53 #endif 54 55 /* 56 * NODEV may be in sys/param.h keep this definition past the include. 57 */ 58 #ifndef NODEV 59 #define NODEV ((dev_t)-1L) 60 #endif 61 62 #ifndef HZ 63 #if defined(_SC_CLK_TCK) 64 #define HZ ((clock_t)sysconf(_SC_CLK_TCK)) 65 #else 66 #define HZ 100 67 #endif 68 #endif 69 70 /* 71 * Do we need to define _XOPEN_SOURCE to get NZERO? 72 * On Linux, it is needed but on Linux NZERO is 20. 73 */ 74 #ifndef NZERO /* for nice(2) */ 75 #define NZERO 20 76 #endif 77 78 #endif /* _SCHILY_PARAM_H */ 79