Deprecate machine/limits.h in favor of new sys/limits.h.
Change all in-tree consumers to include <sys/limits.h> Discussed on: standards@ Partially submitted by: Craig Rodrigues <rodrigc@attbi.com>
This commit is contained in:
parent
5364715a0e
commit
104a9b7e3e
@ -125,7 +125,7 @@
|
||||
|
||||
#define MB_LEN_MAX 6 /* 31-bit UTF-8 */
|
||||
|
||||
#include <machine/limits.h>
|
||||
#include <sys/limits.h>
|
||||
|
||||
#if __POSIX_VISIBLE
|
||||
#include <sys/syslimits.h>
|
||||
|
@ -38,70 +38,10 @@
|
||||
#ifndef _MACHINE_LIMITS_H_
|
||||
#define _MACHINE_LIMITS_H_
|
||||
|
||||
#define CHAR_BIT 8 /* number of bits in a char */
|
||||
|
||||
/*
|
||||
* According to ANSI (section 2.2.4.2), the values below must be usable by
|
||||
* #if preprocessing directives. Additionally, the expression must have the
|
||||
* same type as would an expression that is an object of the corresponding
|
||||
* type converted according to the integral promotions. The subtraction for
|
||||
* INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an
|
||||
* unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2).
|
||||
* These numbers are for the default configuration of gcc. They work for
|
||||
* some other compilers as well, but this should not be depended on.
|
||||
*/
|
||||
#define SCHAR_MAX 0x7f /* max value for a signed char */
|
||||
#define SCHAR_MIN (-0x7f-1) /* min value for a signed char */
|
||||
|
||||
#define UCHAR_MAX 0xffU /* max value for an unsigned char */
|
||||
#define CHAR_MAX 0x7f /* max value for a char */
|
||||
#define CHAR_MIN (-0x7f-1) /* min value for a char */
|
||||
|
||||
#define USHRT_MAX 0xffffU /* max value for an unsigned short */
|
||||
#define SHRT_MAX 0x7fff /* max value for a short */
|
||||
#define SHRT_MIN (-0x7fff-1) /* min value for a short */
|
||||
|
||||
#define UINT_MAX 0xffffffffU /* max value for an unsigned int */
|
||||
#define INT_MAX 0x7fffffff /* max value for an int */
|
||||
#define INT_MIN (-0x7fffffff-1) /* min value for an int */
|
||||
|
||||
#define ULONG_MAX 0xffffffffffffffffUL /* max for an unsigned long */
|
||||
#define LONG_MAX 0x7fffffffffffffffL /* max for a long */
|
||||
#define LONG_MIN (-0x7fffffffffffffffL-1) /* min for a long */
|
||||
|
||||
/* Long longs and longs are the same size on the alpha. */
|
||||
/* max for an unsigned long long */
|
||||
#define ULLONG_MAX 0xffffffffffffffffULL
|
||||
#define LLONG_MAX 0x7fffffffffffffffLL /* max for a long long */
|
||||
#define LLONG_MIN (-0x7fffffffffffffffLL-1) /* min for a long long */
|
||||
|
||||
#if !defined(_ANSI_SOURCE)
|
||||
#define SSIZE_MAX LONG_MAX /* max value for a ssize_t */
|
||||
|
||||
#if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE)
|
||||
#define SIZE_T_MAX ULONG_MAX /* max value for a size_t */
|
||||
|
||||
#define OFF_MAX LONG_MAX /* max value for a off_t */
|
||||
#define OFF_MIN LONG_MIN /* min value for a off_t */
|
||||
|
||||
/* Quads and longs are the same on the alpha. Ensure they stay in sync. */
|
||||
#define UQUAD_MAX (ULONG_MAX) /* max value for a uquad_t */
|
||||
#define QUAD_MAX (LONG_MAX) /* max value for a quad_t */
|
||||
#define QUAD_MIN (LONG_MIN) /* min value for a quad_t */
|
||||
#endif /* !_POSIX_SOURCE && !_XOPEN_SOURCE */
|
||||
#endif /* !_ANSI_SOURCE */
|
||||
|
||||
#if (!defined(_ANSI_SOURCE)&&!defined(_POSIX_SOURCE)) || defined(_XOPEN_SOURCE)
|
||||
#define LONG_BIT 64
|
||||
#define WORD_BIT 32
|
||||
|
||||
#define DBL_DIG 15
|
||||
#define DBL_MAX 1.7976931348623157E+308
|
||||
#define DBL_MIN 2.2250738585072014E-308
|
||||
|
||||
#define FLT_DIG 6
|
||||
#define FLT_MAX 3.40282347E+38F
|
||||
#define FLT_MIN 1.17549435E-38F
|
||||
#if __GNUC__
|
||||
#warning "machine/limits.h is deprecated. Include sys/limits.h instead."
|
||||
#endif
|
||||
|
||||
#include <sys/limits.h>
|
||||
|
||||
#endif /* !_MACHINE_LIMITS_H_ */
|
||||
|
@ -39,70 +39,10 @@
|
||||
#ifndef _MACHINE_LIMITS_H_
|
||||
#define _MACHINE_LIMITS_H_
|
||||
|
||||
#define CHAR_BIT 8 /* number of bits in a char */
|
||||
|
||||
/*
|
||||
* According to ANSI (section 2.2.4.2), the values below must be usable by
|
||||
* #if preprocessing directives. Additionally, the expression must have the
|
||||
* same type as would an expression that is an object of the corresponding
|
||||
* type converted according to the integral promotions. The subtraction for
|
||||
* INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an
|
||||
* unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2).
|
||||
* These numbers are for the default configuration of gcc. They work for
|
||||
* some other compilers as well, but this should not be depended on.
|
||||
*/
|
||||
#define SCHAR_MAX 0x7f /* max value for a signed char */
|
||||
#define SCHAR_MIN (-0x7f-1) /* min value for a signed char */
|
||||
|
||||
#define UCHAR_MAX 0xffU /* max value for an unsigned char */
|
||||
#define CHAR_MAX 0x7f /* max value for a char */
|
||||
#define CHAR_MIN (-0x7f-1) /* min value for a char */
|
||||
|
||||
#define USHRT_MAX 0xffffU /* max value for an unsigned short */
|
||||
#define SHRT_MAX 0x7fff /* max value for a short */
|
||||
#define SHRT_MIN (-0x7fff-1) /* min value for a short */
|
||||
|
||||
#define UINT_MAX 0xffffffffU /* max value for an unsigned int */
|
||||
#define INT_MAX 0x7fffffff /* max value for an int */
|
||||
#define INT_MIN (-0x7fffffff-1) /* min value for an int */
|
||||
|
||||
#define ULONG_MAX 0xffffffffffffffffUL /* max for an unsigned long */
|
||||
#define LONG_MAX 0x7fffffffffffffffL /* max for a long */
|
||||
#define LONG_MIN (-0x7fffffffffffffffL-1) /* min for a long */
|
||||
|
||||
/* Long longs and longs are the same size on the alpha. */
|
||||
/* max for an unsigned long long */
|
||||
#define ULLONG_MAX 0xffffffffffffffffULL
|
||||
#define LLONG_MAX 0x7fffffffffffffffLL /* max for a long long */
|
||||
#define LLONG_MIN (-0x7fffffffffffffffLL-1) /* min for a long long */
|
||||
|
||||
#if !defined(_ANSI_SOURCE)
|
||||
#define SSIZE_MAX LONG_MAX /* max value for a ssize_t */
|
||||
|
||||
#if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE)
|
||||
#define SIZE_T_MAX ULONG_MAX /* max value for a size_t */
|
||||
|
||||
#define OFF_MAX LONG_MAX /* max value for an off_t */
|
||||
#define OFF_MIN LONG_MIN /* min value for an off_t */
|
||||
|
||||
/* Quads and longs are the same on the alpha. Ensure they stay in sync. */
|
||||
#define UQUAD_MAX (ULONG_MAX) /* max value for a uquad_t */
|
||||
#define QUAD_MAX (LONG_MAX) /* max value for a quad_t */
|
||||
#define QUAD_MIN (LONG_MIN) /* min value for a quad_t */
|
||||
#endif /* !_POSIX_SOURCE && !_XOPEN_SOURCE */
|
||||
#endif /* !_ANSI_SOURCE */
|
||||
|
||||
#if (!defined(_ANSI_SOURCE)&&!defined(_POSIX_SOURCE)) || defined(_XOPEN_SOURCE)
|
||||
#define LONG_BIT 64
|
||||
#define WORD_BIT 32
|
||||
|
||||
#define DBL_DIG 15
|
||||
#define DBL_MAX 1.7976931348623157E+308
|
||||
#define DBL_MIN 2.2250738585072014E-308
|
||||
|
||||
#define FLT_DIG 6
|
||||
#define FLT_MAX 3.40282347E+38F
|
||||
#define FLT_MIN 1.17549435E-38F
|
||||
#if __GNUC__
|
||||
#warning "machine/limits.h is deprecated. Include sys/limits.h instead."
|
||||
#endif
|
||||
|
||||
#include <sys/limits.h>
|
||||
|
||||
#endif /* !_MACHINE_LIMITS_H_ */
|
||||
|
@ -61,6 +61,7 @@
|
||||
#include <sys/time.h>
|
||||
#include <sys/timetc.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/limits.h>
|
||||
#include <sys/sysctl.h>
|
||||
#include <sys/cons.h>
|
||||
#include <sys/power.h>
|
||||
@ -68,7 +69,6 @@
|
||||
#include <machine/clock.h>
|
||||
#include <machine/cputypes.h>
|
||||
#include <machine/frame.h>
|
||||
#include <machine/limits.h>
|
||||
#include <machine/md_var.h>
|
||||
#include <machine/psl.h>
|
||||
#ifdef APIC_IO
|
||||
|
@ -34,72 +34,13 @@
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
#ifndef _MACHINE_LIMITS_H_
|
||||
#ifndef _MACHINE_LIMITS_H_
|
||||
#define _MACHINE_LIMITS_H_
|
||||
|
||||
#define CHAR_BIT 8 /* number of bits in a char */
|
||||
|
||||
/*
|
||||
* According to ANSI (section 2.2.4.2), the values below must be usable by
|
||||
* #if preprocessing directives. Additionally, the expression must have the
|
||||
* same type as would an expression that is an object of the corresponding
|
||||
* type converted according to the integral promotions. The subtraction for
|
||||
* INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an
|
||||
* unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2).
|
||||
* These numbers are for the default configuration of gcc. They work for
|
||||
* some other compilers as well, but this should not be depended on.
|
||||
*/
|
||||
#define SCHAR_MAX 0x7f /* max value for a signed char */
|
||||
#define SCHAR_MIN (-0x7f - 1) /* min value for a signed char */
|
||||
|
||||
#define UCHAR_MAX 0xff /* max value for an unsigned char */
|
||||
|
||||
#ifdef __CHAR_UNSIGNED__
|
||||
#define CHAR_MAX UCHAR_MAX /* max value for a char */
|
||||
#define CHAR_MIN 0 /* min value for a char */
|
||||
#else
|
||||
#define CHAR_MAX SCHAR_MAX /* max value for a char */
|
||||
#define CHAR_MIN SCHAR_MIN /* min value for a char */
|
||||
#if __GNUC__
|
||||
#warning "machine/limits.h is deprecated. Include sys/limits.h instead."
|
||||
#endif
|
||||
|
||||
#define USHRT_MAX 0xffff /* max value for an unsigned short */
|
||||
#define SHRT_MAX 0x7fff /* max value for a short */
|
||||
#define SHRT_MIN (-0x7fff - 1) /* min value for a short */
|
||||
|
||||
#define UINT_MAX 0xffffffffU /* max value for an unsigned int */
|
||||
#define INT_MAX 0x7fffffff /* max value for an int */
|
||||
#define INT_MIN (-0x7fffffff - 1) /* min value for an int */
|
||||
|
||||
/* Bad hack for gcc configured to give 64-bit longs. */
|
||||
#ifdef _LARGE_LONG
|
||||
#define ULONG_MAX 0xffffffffffffffffUL
|
||||
#define LONG_MAX 0x7fffffffffffffffL
|
||||
#define LONG_MIN (-0x7fffffffffffffffL - 1)
|
||||
#else
|
||||
#define ULONG_MAX 0xffffffffUL /* max value for an unsigned long */
|
||||
#define LONG_MAX 0x7fffffffL /* max value for a long */
|
||||
#define LONG_MIN (-0x7fffffffL - 1) /* min value for a long */
|
||||
#endif
|
||||
|
||||
/* max value for an unsigned long long */
|
||||
#define ULLONG_MAX 0xffffffffffffffffULL
|
||||
#define LLONG_MAX 0x7fffffffffffffffLL /* max value for a long long */
|
||||
#define LLONG_MIN (-0x7fffffffffffffffLL - 1) /* min for a long long */
|
||||
|
||||
#if !defined(_ANSI_SOURCE)
|
||||
#define SSIZE_MAX INT_MAX /* max value for a ssize_t */
|
||||
|
||||
#if !defined(_POSIX_SOURCE)
|
||||
#define SIZE_T_MAX UINT_MAX /* max value for a size_t */
|
||||
|
||||
#define OFF_MAX LLONG_MAX /* max value for a off_t */
|
||||
#define OFF_MIN LLONG_MIN /* min value for a off_t */
|
||||
|
||||
/* Quads and long longs are the same size. Ensure they stay in sync. */
|
||||
#define UQUAD_MAX ULLONG_MAX /* max value for a uquad_t */
|
||||
#define QUAD_MAX LLONG_MAX /* max value for a quad_t */
|
||||
#define QUAD_MIN LLONG_MIN /* min value for a quad_t */
|
||||
#endif /* !_POSIX_SOURCE */
|
||||
#endif /* !_ANSI_SOURCE */
|
||||
#include <sys/limits.h>
|
||||
|
||||
#endif /* !_MACHINE_LIMITS_H_ */
|
||||
|
@ -35,7 +35,7 @@
|
||||
#include <sys/cdefs.h>
|
||||
#include <sys/time.h>
|
||||
#ifdef CAM_NEW_TRAN_CODE
|
||||
#include <machine/limits.h>
|
||||
#include <sys/limits.h>
|
||||
#endif /* CAM_NEW_TRAN_CODE */
|
||||
#ifndef _KERNEL
|
||||
#include <sys/callout.h>
|
||||
|
@ -38,13 +38,13 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/bio.h>
|
||||
#include <sys/limits.h>
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/mtio.h>
|
||||
#ifdef _KERNEL
|
||||
#include <sys/conf.h>
|
||||
#endif
|
||||
#include <sys/devicestat.h>
|
||||
#include <machine/limits.h>
|
||||
|
||||
#ifndef _KERNEL
|
||||
#include <stdio.h>
|
||||
|
@ -32,12 +32,11 @@
|
||||
#include <sys/systm.h>
|
||||
#include <sys/sysproto.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/limits.h>
|
||||
#include <sys/msg.h>
|
||||
#include <sys/sem.h>
|
||||
#include <sys/shm.h>
|
||||
|
||||
#include <machine/limits.h>
|
||||
|
||||
#include <machine/../linux/linux.h>
|
||||
#include <machine/../linux/linux_proto.h>
|
||||
#include <machine/../linux/linux_ipc64.h>
|
||||
|
@ -36,6 +36,7 @@
|
||||
#include <sys/imgact_aout.h>
|
||||
#include <sys/jail.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/limits.h>
|
||||
#include <sys/lock.h>
|
||||
#include <sys/mac.h>
|
||||
#include <sys/malloc.h>
|
||||
@ -65,8 +66,6 @@
|
||||
#include <vm/vm_object.h>
|
||||
#include <vm/swap_pager.h>
|
||||
|
||||
#include <machine/limits.h>
|
||||
|
||||
#include <posix4/sched.h>
|
||||
|
||||
#include <machine/../linux/linux.h>
|
||||
|
@ -42,6 +42,7 @@
|
||||
#include <sys/sysproto.h>
|
||||
#include <sys/fcntl.h>
|
||||
#include <sys/file.h>
|
||||
#include <sys/limits.h>
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/socketvar.h>
|
||||
@ -62,8 +63,6 @@
|
||||
#include <compat/linux/linux_socket.h>
|
||||
#include <compat/linux/linux_util.h>
|
||||
|
||||
#include <machine/limits.h>
|
||||
|
||||
static int do_sa_get(struct sockaddr **, const struct osockaddr *, int *,
|
||||
struct malloc_type *);
|
||||
static int linux_to_bsd_domain(int);
|
||||
|
@ -34,6 +34,7 @@
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/bus.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/limits.h>
|
||||
#include <sys/malloc.h>
|
||||
|
||||
#include <machine/bus.h>
|
||||
@ -167,8 +168,6 @@ atkbd_timeout(void *arg)
|
||||
|
||||
/* LOW-LEVEL */
|
||||
|
||||
#include <machine/limits.h>
|
||||
|
||||
#define ATKBD_DEFAULT 0
|
||||
|
||||
typedef struct atkbd_state {
|
||||
|
@ -77,7 +77,7 @@
|
||||
#include <sys/time.h>
|
||||
#include <sys/uio.h>
|
||||
|
||||
#include <machine/limits.h>
|
||||
#include <sys/limits.h>
|
||||
#include <sys/mouse.h>
|
||||
#include <machine/resource.h>
|
||||
|
||||
|
@ -36,12 +36,12 @@
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/queue.h>
|
||||
#include <sys/limits.h>
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/module.h>
|
||||
#include <sys/bus.h>
|
||||
|
||||
#include <machine/limits.h>
|
||||
#include <machine/bus.h>
|
||||
#include <machine/resource.h>
|
||||
#include <sys/rman.h>
|
||||
|
@ -34,6 +34,7 @@
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/bus.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/limits.h>
|
||||
#include <sys/malloc.h>
|
||||
|
||||
#include <machine/bus.h>
|
||||
@ -167,8 +168,6 @@ atkbd_timeout(void *arg)
|
||||
|
||||
/* LOW-LEVEL */
|
||||
|
||||
#include <machine/limits.h>
|
||||
|
||||
#define ATKBD_DEFAULT 0
|
||||
|
||||
typedef struct atkbd_state {
|
||||
|
@ -38,10 +38,10 @@
|
||||
#include <sys/queue.h>
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/limits.h>
|
||||
#include <sys/module.h>
|
||||
#include <sys/bus.h>
|
||||
|
||||
#include <machine/limits.h>
|
||||
#include <machine/bus.h>
|
||||
#include <machine/resource.h>
|
||||
#include <sys/rman.h>
|
||||
|
@ -64,8 +64,8 @@
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/limits.h>
|
||||
#include <machine/endian.h>
|
||||
#include <machine/limits.h>
|
||||
|
||||
#if BYTE_ORDER == BIG_ENDIAN
|
||||
#define RF_IS_BIG_ENDIAN 1
|
||||
|
@ -243,6 +243,7 @@
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/limits.h>
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/kernel.h>
|
||||
|
||||
@ -263,8 +264,6 @@
|
||||
#include <net/if_ieee80211.h>
|
||||
#include <net/if_llc.h>
|
||||
|
||||
#include <machine/limits.h>
|
||||
|
||||
#include <dev/pccard/pccardvar.h>
|
||||
#include "card_if.h"
|
||||
|
||||
|
@ -56,6 +56,7 @@
|
||||
#include <sys/fcntl.h>
|
||||
#include <sys/interrupt.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/limits.h>
|
||||
#include <sys/lock.h>
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/module.h>
|
||||
@ -73,7 +74,6 @@
|
||||
|
||||
#include <isa/isavar.h>
|
||||
|
||||
#include <machine/limits.h>
|
||||
#include <machine/resource.h>
|
||||
|
||||
#include <dev/sio/sioreg.h>
|
||||
|
@ -62,7 +62,7 @@
|
||||
#include <machine/bus_pio.h>
|
||||
#include <machine/bus.h>
|
||||
#include <machine/clock.h> /* for DELAY */
|
||||
#include <machine/limits.h>
|
||||
#include <sys/limits.h>
|
||||
#include <sys/soundcard.h>
|
||||
#include <sys/rman.h>
|
||||
#include <sys/mman.h>
|
||||
|
@ -33,6 +33,7 @@
|
||||
#include <sys/conf.h>
|
||||
#include <sys/consio.h>
|
||||
#include <sys/fbio.h>
|
||||
#include <sys/limits.h>
|
||||
#include <sys/lock.h>
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/mouse.h>
|
||||
@ -41,7 +42,6 @@
|
||||
#include <sys/random.h>
|
||||
#include <sys/signalvar.h>
|
||||
#include <sys/tty.h>
|
||||
#include <machine/limits.h>
|
||||
|
||||
#include <dev/syscons/syscons.h>
|
||||
|
||||
|
@ -51,6 +51,7 @@
|
||||
#include <sys/module.h>
|
||||
#include <sys/bus.h>
|
||||
#include <sys/file.h>
|
||||
#include <sys/limits.h>
|
||||
#if __FreeBSD_version >= 500014
|
||||
#include <sys/selinfo.h>
|
||||
#else
|
||||
@ -235,7 +236,6 @@ ukbd_intr(usbd_xfer_handle xfer, usbd_private_handle addr, usbd_status status)
|
||||
|
||||
DRIVER_MODULE(ukbd, uhub, ukbd_driver, ukbd_devclass, ukbd_driver_load, 0);
|
||||
|
||||
#include <machine/limits.h>
|
||||
|
||||
#define UKBD_DEFAULT 0
|
||||
|
||||
|
@ -31,13 +31,12 @@
|
||||
#include <sys/param.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/limits.h>
|
||||
#include <sys/lock.h>
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/mutex.h>
|
||||
#include <sys/sysctl.h>
|
||||
|
||||
#include <machine/limits.h>
|
||||
|
||||
#include <fs/pseudofs/pseudofs.h>
|
||||
#include <fs/pseudofs/pseudofs_internal.h>
|
||||
|
||||
|
@ -42,10 +42,9 @@
|
||||
#include <sys/mount.h>
|
||||
#include <sys/unistd.h>
|
||||
#include <sys/vnode.h>
|
||||
#include <sys/limits.h>
|
||||
#include <sys/lockf.h>
|
||||
|
||||
#include <machine/limits.h>
|
||||
|
||||
#include <vm/vm.h>
|
||||
#include <vm/vm_extern.h>
|
||||
|
||||
|
@ -47,9 +47,9 @@
|
||||
#include <sys/time.h>
|
||||
#include <sys/disk.h>
|
||||
#include <sys/fcntl.h>
|
||||
#include <sys/limits.h>
|
||||
#include <geom/geom.h>
|
||||
#include <geom/geom_int.h>
|
||||
#include <machine/limits.h>
|
||||
|
||||
static d_open_t g_dev_open;
|
||||
static d_close_t g_dev_close;
|
||||
|
@ -34,72 +34,13 @@
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
#ifndef _MACHINE_LIMITS_H_
|
||||
#ifndef _MACHINE_LIMITS_H_
|
||||
#define _MACHINE_LIMITS_H_
|
||||
|
||||
#define CHAR_BIT 8 /* number of bits in a char */
|
||||
|
||||
/*
|
||||
* According to ANSI (section 2.2.4.2), the values below must be usable by
|
||||
* #if preprocessing directives. Additionally, the expression must have the
|
||||
* same type as would an expression that is an object of the corresponding
|
||||
* type converted according to the integral promotions. The subtraction for
|
||||
* INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an
|
||||
* unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2).
|
||||
* These numbers are for the default configuration of gcc. They work for
|
||||
* some other compilers as well, but this should not be depended on.
|
||||
*/
|
||||
#define SCHAR_MAX 0x7f /* max value for a signed char */
|
||||
#define SCHAR_MIN (-0x7f - 1) /* min value for a signed char */
|
||||
|
||||
#define UCHAR_MAX 0xff /* max value for an unsigned char */
|
||||
|
||||
#ifdef __CHAR_UNSIGNED__
|
||||
#define CHAR_MAX UCHAR_MAX /* max value for a char */
|
||||
#define CHAR_MIN 0 /* min value for a char */
|
||||
#else
|
||||
#define CHAR_MAX SCHAR_MAX /* max value for a char */
|
||||
#define CHAR_MIN SCHAR_MIN /* min value for a char */
|
||||
#if __GNUC__
|
||||
#warning "machine/limits.h is deprecated. Include sys/limits.h instead."
|
||||
#endif
|
||||
|
||||
#define USHRT_MAX 0xffff /* max value for an unsigned short */
|
||||
#define SHRT_MAX 0x7fff /* max value for a short */
|
||||
#define SHRT_MIN (-0x7fff - 1) /* min value for a short */
|
||||
|
||||
#define UINT_MAX 0xffffffffU /* max value for an unsigned int */
|
||||
#define INT_MAX 0x7fffffff /* max value for an int */
|
||||
#define INT_MIN (-0x7fffffff - 1) /* min value for an int */
|
||||
|
||||
/* Bad hack for gcc configured to give 64-bit longs. */
|
||||
#ifdef _LARGE_LONG
|
||||
#define ULONG_MAX 0xffffffffffffffffUL
|
||||
#define LONG_MAX 0x7fffffffffffffffL
|
||||
#define LONG_MIN (-0x7fffffffffffffffL - 1)
|
||||
#else
|
||||
#define ULONG_MAX 0xffffffffUL /* max value for an unsigned long */
|
||||
#define LONG_MAX 0x7fffffffL /* max value for a long */
|
||||
#define LONG_MIN (-0x7fffffffL - 1) /* min value for a long */
|
||||
#endif
|
||||
|
||||
/* max value for an unsigned long long */
|
||||
#define ULLONG_MAX 0xffffffffffffffffULL
|
||||
#define LLONG_MAX 0x7fffffffffffffffLL /* max value for a long long */
|
||||
#define LLONG_MIN (-0x7fffffffffffffffLL - 1) /* min for a long long */
|
||||
|
||||
#if !defined(_ANSI_SOURCE)
|
||||
#define SSIZE_MAX INT_MAX /* max value for a ssize_t */
|
||||
|
||||
#if !defined(_POSIX_SOURCE)
|
||||
#define SIZE_T_MAX UINT_MAX /* max value for a size_t */
|
||||
|
||||
#define OFF_MAX LLONG_MAX /* max value for an off_t */
|
||||
#define OFF_MIN LLONG_MIN /* min value for an off_t */
|
||||
|
||||
/* Quads and long longs are the same size. Ensure they stay in sync. */
|
||||
#define UQUAD_MAX ULLONG_MAX /* max value for a uquad_t */
|
||||
#define QUAD_MAX LLONG_MAX /* max value for a quad_t */
|
||||
#define QUAD_MIN LLONG_MIN /* min value for a quad_t */
|
||||
#endif /* !_POSIX_SOURCE */
|
||||
#endif /* !_ANSI_SOURCE */
|
||||
#include <sys/limits.h>
|
||||
|
||||
#endif /* !_MACHINE_LIMITS_H_ */
|
||||
|
@ -61,6 +61,7 @@
|
||||
#include <sys/time.h>
|
||||
#include <sys/timetc.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/limits.h>
|
||||
#include <sys/sysctl.h>
|
||||
#include <sys/cons.h>
|
||||
#include <sys/power.h>
|
||||
@ -68,7 +69,6 @@
|
||||
#include <machine/clock.h>
|
||||
#include <machine/cputypes.h>
|
||||
#include <machine/frame.h>
|
||||
#include <machine/limits.h>
|
||||
#include <machine/md_var.h>
|
||||
#include <machine/psl.h>
|
||||
#ifdef APIC_IO
|
||||
|
@ -36,68 +36,13 @@
|
||||
* @(#)limits.h 8.3 (Berkeley) 1/4/94
|
||||
*/
|
||||
|
||||
#define CHAR_BIT 8 /* number of bits in a char */
|
||||
#ifndef _MACHINE_LIMITS_H_
|
||||
#define _MACHINE_LIMITS_H_
|
||||
|
||||
/*
|
||||
* According to ANSI (section 2.2.4.2), the values below must be usable by
|
||||
* #if preprocessing directives. Additionally, the expression must have the
|
||||
* same type as would an expression that is an object of the corresponding
|
||||
* type converted according to the integral promotions. The subtraction for
|
||||
* INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an
|
||||
* unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2).
|
||||
* These numbers are for the default configuration of gcc. They work for
|
||||
* some other compilers as well, but this should not be depended on.
|
||||
*/
|
||||
#define SCHAR_MAX 0x7f /* max value for a signed char */
|
||||
#define SCHAR_MIN (-0x7f-1) /* min value for a signed char */
|
||||
|
||||
#define UCHAR_MAX 0xffU /* max value for an unsigned char */
|
||||
#define CHAR_MAX 0x7f /* max value for a char */
|
||||
#define CHAR_MIN (-0x7f-1) /* min value for a char */
|
||||
|
||||
#define USHRT_MAX 0xffffU /* max value for an unsigned short */
|
||||
#define SHRT_MAX 0x7fff /* max value for a short */
|
||||
#define SHRT_MIN (-0x7fff-1) /* min value for a short */
|
||||
|
||||
#define UINT_MAX 0xffffffffU /* max value for an unsigned int */
|
||||
#define INT_MAX 0x7fffffff /* max value for an int */
|
||||
#define INT_MIN (-0x7fffffff-1) /* min value for an int */
|
||||
|
||||
#define ULONG_MAX 0xffffffffffffffffUL /* max for an unsigned long */
|
||||
#define LONG_MAX 0x7fffffffffffffffL /* max for a long */
|
||||
#define LONG_MIN (-0x7fffffffffffffffL-1) /* min for a long */
|
||||
|
||||
/* Long longs and longs are the same size on the IA-64. */
|
||||
/* max for an unsigned long long */
|
||||
#define ULLONG_MAX 0xffffffffffffffffULL
|
||||
#define LLONG_MAX 0x7fffffffffffffffLL /* max for a long long */
|
||||
#define LLONG_MIN (-0x7fffffffffffffffLL-1) /* min for a long long */
|
||||
|
||||
#if !defined(_ANSI_SOURCE)
|
||||
#define SSIZE_MAX LONG_MAX /* max value for a ssize_t */
|
||||
|
||||
#if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE)
|
||||
#define SIZE_T_MAX ULONG_MAX /* max value for a size_t */
|
||||
|
||||
#define OFF_MAX LONG_MAX /* max value for an off_t */
|
||||
#define OFF_MIN LONG_MIN /* min value for an off_t */
|
||||
|
||||
/* Quads and longs are the same. Ensure they stay in sync. */
|
||||
#define UQUAD_MAX (ULONG_MAX) /* max value for a uquad_t */
|
||||
#define QUAD_MAX (LONG_MAX) /* max value for a quad_t */
|
||||
#define QUAD_MIN (LONG_MIN) /* min value for a quad_t */
|
||||
#endif /* !_POSIX_SOURCE && !_XOPEN_SOURCE */
|
||||
#endif /* !_ANSI_SOURCE */
|
||||
|
||||
#if (!defined(_ANSI_SOURCE)&&!defined(_POSIX_SOURCE)) || defined(_XOPEN_SOURCE)
|
||||
#define LONG_BIT 64
|
||||
#define WORD_BIT 32
|
||||
|
||||
#define DBL_DIG 15
|
||||
#define DBL_MAX 1.7976931348623157E+308
|
||||
#define DBL_MIN 2.2250738585072014E-308
|
||||
|
||||
#define FLT_DIG 6
|
||||
#define FLT_MAX 3.40282347E+38F
|
||||
#define FLT_MIN 1.17549435E-38F
|
||||
#if __GNUC__
|
||||
#warning "machine/limits.h is deprecated. Include sys/limits.h instead."
|
||||
#endif
|
||||
|
||||
#include <sys/limits.h>
|
||||
|
||||
#endif /* !_MACHINE_LIMITS_H_ */
|
||||
|
@ -61,6 +61,7 @@
|
||||
#include <sys/time.h>
|
||||
#include <sys/timetc.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/limits.h>
|
||||
#include <sys/sysctl.h>
|
||||
#include <sys/cons.h>
|
||||
#include <sys/power.h>
|
||||
@ -68,7 +69,6 @@
|
||||
#include <machine/clock.h>
|
||||
#include <machine/cputypes.h>
|
||||
#include <machine/frame.h>
|
||||
#include <machine/limits.h>
|
||||
#include <machine/md_var.h>
|
||||
#include <machine/psl.h>
|
||||
#ifdef APIC_IO
|
||||
|
@ -77,7 +77,7 @@
|
||||
#include <sys/time.h>
|
||||
#include <sys/uio.h>
|
||||
|
||||
#include <machine/limits.h>
|
||||
#include <sys/limits.h>
|
||||
#include <sys/mouse.h>
|
||||
#include <machine/resource.h>
|
||||
|
||||
|
@ -60,10 +60,10 @@
|
||||
#include <sys/sysctl.h>
|
||||
#include <sys/bus.h>
|
||||
#include <sys/interrupt.h>
|
||||
#include <sys/limits.h>
|
||||
#include <sys/timetc.h>
|
||||
|
||||
#include <machine/cpu.h>
|
||||
#include <machine/limits.h>
|
||||
|
||||
#ifdef GPROF
|
||||
#include <sys/gmon.h>
|
||||
|
@ -49,6 +49,7 @@
|
||||
#include <sys/filedesc.h>
|
||||
#include <sys/lock.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/limits.h>
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/mutex.h>
|
||||
#include <sys/sysctl.h>
|
||||
@ -67,8 +68,6 @@
|
||||
#include <sys/socketvar.h>
|
||||
#include <sys/signalvar.h>
|
||||
|
||||
#include <machine/limits.h>
|
||||
|
||||
#include <vm/vm.h>
|
||||
#include <vm/vm_extern.h>
|
||||
#include <vm/uma.h>
|
||||
|
@ -42,6 +42,7 @@
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/limits.h>
|
||||
#include <sys/lock.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/mutex.h>
|
||||
@ -52,8 +53,6 @@
|
||||
#include <sys/fcntl.h>
|
||||
#include <sys/lockf.h>
|
||||
|
||||
#include <machine/limits.h>
|
||||
|
||||
/*
|
||||
* This variable controls the maximum number of processes that will
|
||||
* be checked in doing deadlock detection.
|
||||
|
@ -42,7 +42,7 @@
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/ctype.h>
|
||||
#include <machine/limits.h>
|
||||
#include <sys/limits.h>
|
||||
|
||||
/*
|
||||
* Note that stdarg.h and the ANSI style va_start macro is used for both
|
||||
|
@ -53,6 +53,7 @@
|
||||
#include <sys/socketvar.h>
|
||||
#include <sys/uio.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/limits.h>
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/poll.h>
|
||||
#include <sys/resourcevar.h>
|
||||
@ -69,8 +70,6 @@
|
||||
#include <vm/vm.h>
|
||||
#include <vm/vm_page.h>
|
||||
|
||||
#include <machine/limits.h>
|
||||
|
||||
static MALLOC_DEFINE(M_IOCTLOPS, "ioctlops", "ioctl data buffer");
|
||||
static MALLOC_DEFINE(M_SELECT, "select", "select() buffer");
|
||||
MALLOC_DEFINE(M_IOV, "iov", "large iov's");
|
||||
|
@ -41,6 +41,7 @@
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/fcntl.h>
|
||||
#include <sys/limits.h>
|
||||
#include <sys/lock.h>
|
||||
#include <sys/mac.h>
|
||||
#include <sys/malloc.h>
|
||||
@ -63,7 +64,6 @@
|
||||
|
||||
#include <vm/uma.h>
|
||||
|
||||
#include <machine/limits.h>
|
||||
|
||||
#ifdef INET
|
||||
static int do_setopt_accept_filter(struct socket *so, struct sockopt *sopt);
|
||||
|
@ -32,6 +32,7 @@
|
||||
#include <sys/kthread.h>
|
||||
#include <sys/fcntl.h>
|
||||
#include <sys/file.h>
|
||||
#include <sys/limits.h>
|
||||
#include <sys/lock.h>
|
||||
#include <sys/mutex.h>
|
||||
#include <sys/unistd.h>
|
||||
@ -56,8 +57,6 @@
|
||||
#include <vm/uma.h>
|
||||
#include <sys/aio.h>
|
||||
|
||||
#include <machine/limits.h>
|
||||
|
||||
#include "opt_vfs_aio.h"
|
||||
|
||||
/*
|
||||
|
@ -45,6 +45,7 @@
|
||||
#include <sys/buf.h>
|
||||
#include <sys/conf.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/limits.h>
|
||||
#include <sys/lock.h>
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/mount.h>
|
||||
@ -53,8 +54,6 @@
|
||||
#include <sys/vnode.h>
|
||||
#include <sys/poll.h>
|
||||
|
||||
#include <machine/limits.h>
|
||||
|
||||
#include <vm/vm.h>
|
||||
#include <vm/vm_object.h>
|
||||
#include <vm/vm_extern.h>
|
||||
|
@ -58,6 +58,7 @@
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/fcntl.h>
|
||||
#include <sys/file.h>
|
||||
#include <sys/limits.h>
|
||||
#include <sys/linker.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/sx.h>
|
||||
@ -70,7 +71,6 @@
|
||||
#include <sys/syscallsubr.h>
|
||||
#include <sys/sysctl.h>
|
||||
|
||||
#include <machine/limits.h>
|
||||
#include <machine/stdarg.h>
|
||||
|
||||
#include <vm/vm.h>
|
||||
|
@ -58,6 +58,7 @@
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/fcntl.h>
|
||||
#include <sys/file.h>
|
||||
#include <sys/limits.h>
|
||||
#include <sys/linker.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/sx.h>
|
||||
@ -70,7 +71,6 @@
|
||||
#include <sys/syscallsubr.h>
|
||||
#include <sys/sysctl.h>
|
||||
|
||||
#include <machine/limits.h>
|
||||
#include <machine/stdarg.h>
|
||||
|
||||
#include <vm/vm.h>
|
||||
|
@ -47,6 +47,7 @@
|
||||
#include <sys/file.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/limits.h>
|
||||
#include <sys/lock.h>
|
||||
#include <sys/mac.h>
|
||||
#include <sys/mount.h>
|
||||
@ -61,8 +62,6 @@
|
||||
#include <sys/conf.h>
|
||||
#include <sys/syslog.h>
|
||||
|
||||
#include <machine/limits.h>
|
||||
|
||||
static fo_rdwr_t vn_read;
|
||||
static fo_rdwr_t vn_write;
|
||||
static fo_ioctl_t vn_ioctl;
|
||||
|
@ -59,8 +59,8 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/limits.h>
|
||||
#include <sys/syslimits.h>
|
||||
#include <machine/limits.h>
|
||||
|
||||
/*
|
||||
* Depending on the desired operation, we view a `long long' (aka quad_t) in
|
||||
|
@ -41,7 +41,7 @@
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/ctype.h>
|
||||
#include <machine/limits.h>
|
||||
#include <sys/limits.h>
|
||||
|
||||
/*
|
||||
* Convert a string to a long integer.
|
||||
|
@ -39,7 +39,7 @@
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/ctype.h>
|
||||
#include <machine/limits.h>
|
||||
#include <sys/limits.h>
|
||||
|
||||
/*
|
||||
* Convert a string to a quad integer.
|
||||
|
@ -41,7 +41,7 @@
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/ctype.h>
|
||||
#include <machine/limits.h>
|
||||
#include <sys/limits.h>
|
||||
|
||||
/*
|
||||
* Convert a string to an unsigned long integer.
|
||||
|
@ -39,7 +39,7 @@
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/ctype.h>
|
||||
#include <machine/limits.h>
|
||||
#include <sys/limits.h>
|
||||
|
||||
/*
|
||||
* Convert a string to an unsigned quad integer.
|
||||
|
@ -48,6 +48,7 @@
|
||||
#include <sys/systm.h>
|
||||
#include <sys/errno.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/limits.h>
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/syslog.h>
|
||||
#include <sys/sysctl.h>
|
||||
@ -56,7 +57,6 @@
|
||||
#include <sys/mbuf.h>
|
||||
#include <sys/ctype.h>
|
||||
#include <sys/sysctl.h>
|
||||
#include <machine/limits.h>
|
||||
|
||||
#include <net/netisr.h>
|
||||
|
||||
|
@ -47,14 +47,13 @@
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/limits.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/mbuf.h>
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/errno.h>
|
||||
#include <sys/ctype.h>
|
||||
|
||||
#include <machine/limits.h>
|
||||
|
||||
#include <netgraph/ng_message.h>
|
||||
#include <netgraph/netgraph.h>
|
||||
#include <netgraph/ng_parse.h>
|
||||
|
@ -39,6 +39,7 @@
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/limits.h>
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/mbuf.h>
|
||||
#include <sys/domain.h>
|
||||
@ -50,8 +51,6 @@
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/sysctl.h>
|
||||
|
||||
#include <machine/limits.h>
|
||||
|
||||
#include <vm/uma.h>
|
||||
|
||||
#include <net/if.h>
|
||||
|
@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/systm.h>
|
||||
#include <sys/fcntl.h>
|
||||
#include <sys/kernel.h> /* for hz */
|
||||
#include <sys/limits.h>
|
||||
#include <sys/lock.h>
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/lockf.h> /* for hz */ /* Must come after sys/malloc.h */
|
||||
@ -48,8 +49,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/unistd.h>
|
||||
#include <sys/vnode.h>
|
||||
|
||||
#include <machine/limits.h>
|
||||
|
||||
#include <net/if.h>
|
||||
|
||||
#include <nfs/rpcv2.h>
|
||||
|
@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/limits.h>
|
||||
#include <sys/lock.h>
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/mbuf.h>
|
||||
@ -74,8 +75,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <nfsclient/nfsm_subs.h>
|
||||
#include <nfsclient/nfsdiskless.h>
|
||||
|
||||
#include <machine/limits.h>
|
||||
|
||||
MALLOC_DEFINE(M_NFSREQ, "NFS req", "NFS request header");
|
||||
MALLOC_DEFINE(M_NFSBIGFH, "NFSV3 bigfh", "NFS version 3 file handle");
|
||||
MALLOC_DEFINE(M_NFSDIROFF, "NFSV3 diroff", "NFS directory offset data");
|
||||
|
@ -59,6 +59,7 @@
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/bus.h>
|
||||
#include <sys/limits.h>
|
||||
#include <sys/lock.h>
|
||||
#include <sys/mutex.h>
|
||||
#include <sys/proc.h>
|
||||
@ -72,7 +73,6 @@
|
||||
#include <machine/clock.h>
|
||||
#include <machine/cputypes.h>
|
||||
#include <machine/frame.h>
|
||||
#include <machine/limits.h>
|
||||
#include <machine/md_var.h>
|
||||
#include <machine/psl.h>
|
||||
#ifdef APIC_IO
|
||||
|
@ -263,7 +263,7 @@ pckbd_timeout(void *arg)
|
||||
|
||||
/* LOW-LEVEL */
|
||||
|
||||
#include <machine/limits.h>
|
||||
#include <sys/limits.h>
|
||||
|
||||
#define PC98KBD_DEFAULT 0
|
||||
|
||||
|
@ -59,6 +59,7 @@
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/bus.h>
|
||||
#include <sys/limits.h>
|
||||
#include <sys/lock.h>
|
||||
#include <sys/mutex.h>
|
||||
#include <sys/proc.h>
|
||||
@ -72,7 +73,6 @@
|
||||
#include <machine/clock.h>
|
||||
#include <machine/cputypes.h>
|
||||
#include <machine/frame.h>
|
||||
#include <machine/limits.h>
|
||||
#include <machine/md_var.h>
|
||||
#include <machine/psl.h>
|
||||
#ifdef APIC_IO
|
||||
|
@ -119,6 +119,7 @@
|
||||
#include <sys/fcntl.h>
|
||||
#include <sys/interrupt.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/limits.h>
|
||||
#include <sys/lock.h>
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/module.h>
|
||||
@ -135,7 +136,6 @@
|
||||
|
||||
#include <isa/isavar.h>
|
||||
|
||||
#include <machine/limits.h>
|
||||
#include <machine/resource.h>
|
||||
|
||||
#include <dev/sio/sioreg.h>
|
||||
|
@ -59,6 +59,7 @@
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/bus.h>
|
||||
#include <sys/limits.h>
|
||||
#include <sys/lock.h>
|
||||
#include <sys/mutex.h>
|
||||
#include <sys/proc.h>
|
||||
@ -72,7 +73,6 @@
|
||||
#include <machine/clock.h>
|
||||
#include <machine/cputypes.h>
|
||||
#include <machine/frame.h>
|
||||
#include <machine/limits.h>
|
||||
#include <machine/md_var.h>
|
||||
#include <machine/psl.h>
|
||||
#ifdef APIC_IO
|
||||
|
@ -263,7 +263,7 @@ pckbd_timeout(void *arg)
|
||||
|
||||
/* LOW-LEVEL */
|
||||
|
||||
#include <machine/limits.h>
|
||||
#include <sys/limits.h>
|
||||
|
||||
#define PC98KBD_DEFAULT 0
|
||||
|
||||
|
@ -119,6 +119,7 @@
|
||||
#include <sys/fcntl.h>
|
||||
#include <sys/interrupt.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/limits.h>
|
||||
#include <sys/lock.h>
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/module.h>
|
||||
@ -135,7 +136,6 @@
|
||||
|
||||
#include <isa/isavar.h>
|
||||
|
||||
#include <machine/limits.h>
|
||||
#include <machine/resource.h>
|
||||
|
||||
#include <dev/sio/sioreg.h>
|
||||
|
@ -34,75 +34,13 @@
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
#ifndef _MACHINE_LIMITS_H_
|
||||
#ifndef _MACHINE_LIMITS_H_
|
||||
#define _MACHINE_LIMITS_H_
|
||||
|
||||
#define CHAR_BIT 8 /* number of bits in a char */
|
||||
|
||||
/*
|
||||
* According to ANSI (section 2.2.4.2), the values below must be usable by
|
||||
* #if preprocessing directives. Additionally, the expression must have the
|
||||
* same type as would an expression that is an object of the corresponding
|
||||
* type converted according to the integral promotions. The subtraction for
|
||||
* INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an
|
||||
* unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2).
|
||||
* These numbers are for the default configuration of gcc. They work for
|
||||
* some other compilers as well, but this should not be depended on.
|
||||
*/
|
||||
#define SCHAR_MAX 0x7f /* max value for a signed char */
|
||||
#define SCHAR_MIN (-0x7f - 1) /* min value for a signed char */
|
||||
|
||||
#define UCHAR_MAX 0xff /* max value for an unsigned char */
|
||||
|
||||
#ifdef __CHAR_UNSIGNED__
|
||||
#define CHAR_MAX UCHAR_MAX /* max value for a char */
|
||||
#define CHAR_MIN 0 /* min value for a char */
|
||||
#else
|
||||
#define CHAR_MAX SCHAR_MAX /* max value for a char */
|
||||
#define CHAR_MIN SCHAR_MIN /* min value for a char */
|
||||
#if __GNUC__
|
||||
#warning "machine/limits.h is deprecated. Include sys/limits.h instead."
|
||||
#endif
|
||||
|
||||
#define USHRT_MAX 0xffff /* max value for an unsigned short */
|
||||
#define SHRT_MAX 0x7fff /* max value for a short */
|
||||
#define SHRT_MIN (-0x7fff - 1) /* min value for a short */
|
||||
|
||||
#define UINT_MAX 0xffffffffU /* max value for an unsigned int */
|
||||
#define INT_MAX 0x7fffffff /* max value for an int */
|
||||
#define INT_MIN (-0x7fffffff - 1) /* min value for an int */
|
||||
|
||||
/* Bad hack for gcc configured to give 64-bit longs. */
|
||||
#ifdef _LARGE_LONG
|
||||
#define ULONG_MAX 0xffffffffffffffffUL
|
||||
#define LONG_MAX 0x7fffffffffffffffL
|
||||
#define LONG_MIN (-0x7fffffffffffffffL - 1)
|
||||
#else
|
||||
#define ULONG_MAX 0xffffffffUL /* max value for an unsigned long */
|
||||
#define LONG_MAX 0x7fffffffL /* max value for a long */
|
||||
#define LONG_MIN (-0x7fffffffL - 1) /* min value for a long */
|
||||
#endif
|
||||
|
||||
/* max value for an unsigned long long */
|
||||
#define ULLONG_MAX 0xffffffffffffffffULL
|
||||
#define LLONG_MAX 0x7fffffffffffffffLL /* max value for a long long */
|
||||
#define LLONG_MIN (-0x7fffffffffffffffLL - 1) /* min for a long long */
|
||||
|
||||
#if !defined(_ANSI_SOURCE)
|
||||
#define SSIZE_MAX INT_MAX /* max value for a ssize_t */
|
||||
|
||||
#if !defined(_POSIX_SOURCE)
|
||||
#define SIZE_T_MAX UINT_MAX /* max value for a size_t */
|
||||
|
||||
#define OFF_MAX LLONG_MAX /* max value for an off_t */
|
||||
#define OFF_MIN LLONG_MIN /* min value for an off_t */
|
||||
|
||||
/* Quads and long longs are the same size. Ensure they stay in sync. */
|
||||
#define UQUAD_MAX ULLONG_MAX /* max value for a uquad_t */
|
||||
#define QUAD_MAX LLONG_MAX /* max value for a quad_t */
|
||||
#define QUAD_MIN LLONG_MIN /* min value for a quad_t */
|
||||
|
||||
#define LONG_BIT 32
|
||||
|
||||
#endif /* !_POSIX_SOURCE */
|
||||
#endif /* !_ANSI_SOURCE */
|
||||
#include <sys/limits.h>
|
||||
|
||||
#endif /* !_MACHINE_LIMITS_H_ */
|
||||
|
@ -30,70 +30,10 @@
|
||||
#ifndef _MACHINE_LIMITS_H_
|
||||
#define _MACHINE_LIMITS_H_
|
||||
|
||||
#define CHAR_BIT 8 /* number of bits in a char */
|
||||
|
||||
/*
|
||||
* According to ANSI (section 2.2.4.2), the values below must be usable by
|
||||
* #if preprocessing directives. Additionally, the expression must have the
|
||||
* same type as would an expression that is an object of the corresponding
|
||||
* type converted according to the integral promotions. The subtraction for
|
||||
* INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an
|
||||
* unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2).
|
||||
* These numbers are for the default configuration of gcc. They work for
|
||||
* some other compilers as well, but this should not be depended on.
|
||||
*/
|
||||
#define SCHAR_MAX 0x7f /* max value for a signed char */
|
||||
#define SCHAR_MIN (-0x7f-1) /* min value for a signed char */
|
||||
|
||||
#define UCHAR_MAX 0xffU /* max value for an unsigned char */
|
||||
#define CHAR_MAX 0x7f /* max value for a char */
|
||||
#define CHAR_MIN (-0x7f-1) /* min value for a char */
|
||||
|
||||
#define USHRT_MAX 0xffffU /* max value for an unsigned short */
|
||||
#define SHRT_MAX 0x7fff /* max value for a short */
|
||||
#define SHRT_MIN (-0x7fff-1) /* min value for a short */
|
||||
|
||||
#define UINT_MAX 0xffffffffU /* max value for an unsigned int */
|
||||
#define INT_MAX 0x7fffffff /* max value for an int */
|
||||
#define INT_MIN (-0x7fffffff-1) /* min value for an int */
|
||||
|
||||
#define ULONG_MAX 0xffffffffffffffffUL /* max for an unsigned long */
|
||||
#define LONG_MAX 0x7fffffffffffffffL /* max for a long */
|
||||
#define LONG_MIN (-0x7fffffffffffffffL-1) /* min for a long */
|
||||
|
||||
/* Long longs and longs are the same size on the alpha. */
|
||||
/* max for an unsigned long long */
|
||||
#define ULLONG_MAX 0xffffffffffffffffULL
|
||||
#define LLONG_MAX 0x7fffffffffffffffLL /* max for a long long */
|
||||
#define LLONG_MIN (-0x7fffffffffffffffLL-1) /* min for a long long */
|
||||
|
||||
#if !defined(_ANSI_SOURCE)
|
||||
#define SSIZE_MAX LONG_MAX /* max value for a ssize_t */
|
||||
|
||||
#if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE)
|
||||
#define SIZE_T_MAX ULONG_MAX /* max value for a size_t */
|
||||
|
||||
#define OFF_MAX LONG_MAX /* max value for an off_t */
|
||||
#define OFF_MIN LONG_MIN /* min value for an off_t */
|
||||
|
||||
/* Quads and longs are the same on the alpha. Ensure they stay in sync. */
|
||||
#define UQUAD_MAX (ULONG_MAX) /* max value for a uquad_t */
|
||||
#define QUAD_MAX (LONG_MAX) /* max value for a quad_t */
|
||||
#define QUAD_MIN (LONG_MIN) /* min value for a quad_t */
|
||||
#endif /* !_POSIX_SOURCE && !_XOPEN_SOURCE */
|
||||
#endif /* !_ANSI_SOURCE */
|
||||
|
||||
#if (!defined(_ANSI_SOURCE)&&!defined(_POSIX_SOURCE)) || defined(_XOPEN_SOURCE)
|
||||
#define LONG_BIT 64
|
||||
#define WORD_BIT 32
|
||||
|
||||
#define DBL_DIG 15
|
||||
#define DBL_MAX 1.7976931348623157E+308
|
||||
#define DBL_MIN 2.2250738585072014E-308
|
||||
|
||||
#define FLT_DIG 6
|
||||
#define FLT_MAX 3.40282347E+38F
|
||||
#define FLT_MIN 1.17549435E-38F
|
||||
#if __GNUC__
|
||||
#warning "machine/limits.h is deprecated. Include sys/limits.h instead."
|
||||
#endif
|
||||
|
||||
#include <sys/limits.h>
|
||||
|
||||
#endif /* !_MACHINE_LIMITS_H_ */
|
||||
|
@ -104,7 +104,7 @@
|
||||
/* Machine type dependent parameters. */
|
||||
#include <machine/param.h>
|
||||
#ifndef _KERNEL
|
||||
#include <machine/limits.h>
|
||||
#include <sys/limits.h>
|
||||
#endif
|
||||
|
||||
#ifndef _NO_NAMESPACE_POLLUTION
|
||||
|
@ -32,6 +32,7 @@
|
||||
#include <sys/file.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/limits.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/namei.h>
|
||||
#include <sys/vnode.h>
|
||||
@ -44,7 +45,6 @@
|
||||
#include <ufs/ufs/inode.h>
|
||||
#include <ufs/ffs/fs.h>
|
||||
|
||||
#include <machine/limits.h>
|
||||
#include <vm/vm.h>
|
||||
#include <vm/vm_extern.h>
|
||||
#include <vm/vm_object.h>
|
||||
|
@ -50,6 +50,7 @@
|
||||
#include <sys/conf.h>
|
||||
#include <sys/extattr.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/limits.h>
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/proc.h>
|
||||
@ -59,8 +60,6 @@
|
||||
#include <sys/vmmeter.h>
|
||||
#include <sys/vnode.h>
|
||||
|
||||
#include <machine/limits.h>
|
||||
|
||||
#include <vm/vm.h>
|
||||
#include <vm/vm_extern.h>
|
||||
#include <vm/vm_object.h>
|
||||
|
@ -66,6 +66,7 @@
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/limits.h>
|
||||
#include <sys/lock.h>
|
||||
#include <sys/mutex.h>
|
||||
#include <sys/proc.h>
|
||||
@ -79,8 +80,6 @@
|
||||
#include <sys/ktr.h>
|
||||
#include <sys/unistd.h>
|
||||
|
||||
#include <machine/limits.h>
|
||||
|
||||
#include <vm/vm.h>
|
||||
#include <vm/vm_param.h>
|
||||
#include <vm/pmap.h>
|
||||
|
Loading…
Reference in New Issue
Block a user