From owner-freebsd-standards@FreeBSD.ORG Sun Mar 30 16:06:23 2003 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DEF2837B404 for ; Sun, 30 Mar 2003 16:06:23 -0800 (PST) Received: from smtpout.mac.com (smtpout.mac.com [17.250.248.87]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0C88B43FBF for ; Sun, 30 Mar 2003 16:06:23 -0800 (PST) (envelope-from leimy2k@mac.com) Received: from asmtp02.mac.com (asmtp02-qfe3 [10.13.10.66]) by smtpout.mac.com (Xserve/MantshX 2.0) with ESMTP id h2V06MXl016406 for ; Sun, 30 Mar 2003 16:06:22 -0800 (PST) Received: from mac.com ([66.156.161.248]) by asmtp02.mac.com (Netscape Messaging Server 4.15) with ESMTP id HCL6YL00.I67 for ; Sun, 30 Mar 2003 16:06:21 -0800 Date: Sun, 30 Mar 2003 18:06:20 -0600 Mime-Version: 1.0 (Apple Message framework v551) Content-Type: text/plain; charset=US-ASCII; format=flowed From: David Leimbach To: freebsd-standards@freebsd.org Content-Transfer-Encoding: 7bit Message-Id: <99FC4F88-630C-11D7-8739-0003937E39E0@mac.com> X-Mailer: Apple Mail (2.551) Subject: implementation of getpwnam_r X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Mar 2003 00:06:25 -0000 It seems this already exists in src/contrib/bind/lib/getpwent_r.c int getpwnam_r(const char * login, struct passwd *pwptr, char * buf, size_t buflen, struct passwd ** result) { struct passwd *pw = getpwnam(login); int res; if (pw == NULL) { *result = NULL; return (0); } res = copy_passwd(pw,pwptr,buf,buflen); *result = res ? NULL : pwptr; return (res); } Is this sufficient? copy_passwd is also in the bind library? Should this be in several places like this? Am I done? :) Dave From owner-freebsd-standards@FreeBSD.ORG Mon Mar 31 05:47:40 2003 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CF28037B401 for ; Mon, 31 Mar 2003 05:47:37 -0800 (PST) Received: from smtp01.syd.iprimus.net.au (smtp01.syd.iprimus.net.au [210.50.30.52]) by mx1.FreeBSD.org (Postfix) with ESMTP id 03A6143FA3 for ; Mon, 31 Mar 2003 05:47:37 -0800 (PST) (envelope-from tim@robbins.dropbear.id.au) Received: from dilbert.robbins.dropbear.id.au (210.50.203.184) by smtp01.syd.iprimus.net.au (7.0.008) id 3E71077F0027D55D; Mon, 31 Mar 2003 23:47:35 +1000 Received: by dilbert.robbins.dropbear.id.au (Postfix, from userid 1000) id DC260C90D; Mon, 31 Mar 2003 23:47:17 +1000 (EST) Date: Mon, 31 Mar 2003 23:47:17 +1000 From: Tim Robbins To: David Leimbach Message-ID: <20030331234717.A5859@dilbert.robbins.dropbear.id.au> References: <99FC4F88-630C-11D7-8739-0003937E39E0@mac.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <99FC4F88-630C-11D7-8739-0003937E39E0@mac.com>; from leimy2k@mac.com on Sun, Mar 30, 2003 at 06:06:20PM -0600 cc: freebsd-standards@freebsd.org Subject: Re: implementation of getpwnam_r X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Mar 2003 13:47:45 -0000 On Sun, Mar 30, 2003 at 06:06:20PM -0600, David Leimbach wrote: > It seems this already exists in src/contrib/bind/lib/getpwent_r.c > > int getpwnam_r(const char * login, struct passwd *pwptr, char * buf, > size_t buflen, > struct passwd ** result) > { > > struct passwd *pw = getpwnam(login); > int res; > > if (pw == NULL) { > *result = NULL; > return (0); > } > > res = copy_passwd(pw,pwptr,buf,buflen); > *result = res ? NULL : pwptr; > return (res); > } > > Is this sufficient? copy_passwd is also in the bind library? There is a race between the getpwnam() call and when the data is copied to the user-supplied buffer. In addition to this, I don't think that getpwnam_r() is allowed to modify the static storage used by getpwnam(). The current passwd code is truly awful, and I think someone is working on a replacement for it. It might be worth waiting to see what happens there before investing too much energy in implementing the *_r() functions in the current code. Tim From owner-freebsd-standards@FreeBSD.ORG Mon Mar 31 15:15:13 2003 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CC32437B401; Mon, 31 Mar 2003 15:15:13 -0800 (PST) Received: from smtpout.mac.com (smtpout.mac.com [17.250.248.89]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3668443F3F; Mon, 31 Mar 2003 15:15:13 -0800 (PST) (envelope-from leimy2k@mac.com) Received: from asmtp02.mac.com (asmtp02-qfe3 [10.13.10.66]) by smtpout.mac.com (Xserve/MantshX 2.0) with ESMTP id h2VNFCcR025609; Mon, 31 Mar 2003 15:15:12 -0800 (PST) Received: from mac.com ([67.33.226.223]) by asmtp02.mac.com (Netscape Messaging Server 4.15) with ESMTP id HCMZ9C00.CGD; Mon, 31 Mar 2003 15:15:12 -0800 Date: Mon, 31 Mar 2003 17:15:12 -0600 Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v551) To: Tim Robbins From: David Leimbach In-Reply-To: <20030331234717.A5859@dilbert.robbins.dropbear.id.au> Message-Id: <9F997B26-63CE-11D7-A778-0003937E39E0@mac.com> Content-Transfer-Encoding: 7bit X-Mailer: Apple Mail (2.551) cc: freebsd-standards@FreeBSD.ORG Subject: Re: implementation of getpwnam_r X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Mar 2003 23:15:15 -0000 > On Sun, Mar 30, 2003 at 06:06:20PM -0600, David Leimbach wrote: > >> It seems this already exists in src/contrib/bind/lib/getpwent_r.c >> >> int getpwnam_r(const char * login, struct passwd *pwptr, char * buf, >> size_t buflen, >> struct passwd ** result) >> { >> >> struct passwd *pw = getpwnam(login); >> int res; >> >> if (pw == NULL) { >> *result = NULL; >> return (0); >> } >> >> res = copy_passwd(pw,pwptr,buf,buflen); >> *result = res ? NULL : pwptr; >> return (res); >> } >> >> Is this sufficient? copy_passwd is also in the bind library? > > There is a race between the getpwnam() call and when the data is > copied to the user-supplied buffer. In addition to this, I don't > think that getpwnam_r() is allowed to modify the static storage > used by getpwnam(). The current passwd code is truly awful, and > I think someone is working on a replacement for it. It might be > worth waiting to see what happens there before investing too much > energy in implementing the *_r() functions in the current code. > Yeah... I was just thinking... in order for the above to be re-entrant the actual implementation of getpwnam is going to have to be a lot cleaner and with much less static state. To replace the whole set of calls seems the correct way to do it now. Someone did contact me a while back about working on this problem but he doesn't appear to be subscribed to this list. I remember asking this fellow to sync up with the other developers but I don't know that he ever did. Dave > > Tim From owner-freebsd-standards@FreeBSD.ORG Tue Apr 1 05:50:08 2003 Return-Path: Delivered-To: freebsd-standards@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 37D6737B401 for ; Tue, 1 Apr 2003 05:50:08 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 06A7643F93 for ; Tue, 1 Apr 2003 05:50:06 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h31Do5Up022937 for ; Tue, 1 Apr 2003 05:50:05 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h31Do5cR022936; Tue, 1 Apr 2003 05:50:05 -0800 (PST) Resent-Date: Tue, 1 Apr 2003 05:50:05 -0800 (PST) Resent-Message-Id: <200304011350.h31Do5cR022936@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-standards@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Craig Rodrigues Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A679A37B401; Tue, 1 Apr 2003 05:42:57 -0800 (PST) Received: from h00609772adf0.ne.client2.attbi.com (h00609772adf0.ne.client2.attbi.com [24.61.43.152]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4337E43FA3; Tue, 1 Apr 2003 05:42:55 -0800 (PST) (envelope-from rodrigc@attbi.com) Received: from h00609772adf0.ne.client2.attbi.com (localhost.ne.attbi.com [127.0.0.1])h31Dh9ri086860; Tue, 1 Apr 2003 08:43:10 -0500 (EST) (envelope-from rodrigc@h00609772adf0.ne.client2.attbi.com) Received: (from rodrigc@localhost)h31Dh9PS086859; Tue, 1 Apr 2003 08:43:09 -0500 (EST) Message-Id: <200304011343.h31Dh9PS086859@h00609772adf0.ne.client2.attbi.com> Date: Tue, 1 Apr 2003 08:43:09 -0500 (EST) From: Craig Rodrigues To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 cc: mike@FreeBSD.org Subject: standards/50523: Deprecate , add X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Craig Rodrigues List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Apr 2003 13:50:08 -0000 >Number: 50523 >Category: standards >Synopsis: Deprecate , add >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-standards >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Apr 01 05:50:05 PST 2003 >Closed-Date: >Last-Modified: >Originator: Craig Rodrigues >Release: FreeBSD 5.0-CURRENT i386 >Organization: >Environment: System: FreeBSD h00609772adf0.ne.client2.attbi.com 5.0-CURRENT FreeBSD 5.0-CURRENT #19: Sat Mar 22 21:49:42 EST 2003 rodrigc@h00609772adf0.ne.client2.attbi.com:/usr/obj/usr/src/sys/MYKERNEL1 i386 >Description: As part of my effort to add WCHAR_MIN and WCHAR_MAX macros to , an interesting discussion ensued on -standards. Mike Barcroft suggested that: - should be deprecated with a warning - should be created - a private header file should be created Once this patch is accepted, I will submit a followup patch which adds WCHAR_MIN and WCHAR_MAX macros to , by including , and defining those macros using the underscore prefixed macros, ie. #define WCHAR_MIN __WCHAR_MIN >How-To-Repeat: >Fix: diff --exclude=*.orig -u -r -N orig/include/limits.h new/include/limits.h --- orig/include/limits.h Sun Dec 22 01:38:44 2002 +++ new/include/limits.h Sat Mar 8 11:51:20 2003 @@ -125,7 +125,7 @@ #define MB_LEN_MAX 6 /* 31-bit UTF-8 */ -#include +#include #if __POSIX_VISIBLE #include diff --exclude=*.orig -u -r -N orig/sys/alpha/include/_limits.h new/sys/alpha/include/_limits.h --- orig/sys/alpha/include/_limits.h Wed Dec 31 19:00:00 1969 +++ new/sys/alpha/include/_limits.h Sat Mar 8 12:51:02 2003 @@ -0,0 +1,87 @@ +/* + * Copyright (c) 2003 + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _MACHINE__LIMITS_H_ +#define _MACHINE__LIMITS_H_ + +#define __CHAR_BIT 8 /* number of bits in a char */ + +#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 __WCHAR_MIN __INT_MIN /* min value for wchar_t */ +#define __WCHAR_MAX __INT_MAX /* max value for wchar_t */ + +#define __WINT_MIN __INT_MIN /* min value for wint_t */ +#define __WINT_MAX __INT_MAX /* max value for wint_t */ + +#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 */ + +#define __SSIZE_MAX __LONG_MAX /* max value for a ssize_t */ + +#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 */ + +#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 + +#endif /* !_MACHINE__LIMITS_H_ */ diff --exclude=*.orig -u -r -N orig/sys/alpha/include/limits.h new/sys/alpha/include/limits.h --- orig/sys/alpha/include/limits.h Sun Dec 22 01:38:44 2002 +++ new/sys/alpha/include/limits.h Sat Mar 8 14:49:24 2003 @@ -38,70 +38,7 @@ #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 -#endif +#warning " is deprecated. Include instead." +#include #endif /* !_MACHINE_LIMITS_H_ */ diff --exclude=*.orig -u -r -N orig/sys/arm/include/_limits.h new/sys/arm/include/_limits.h --- orig/sys/arm/include/_limits.h Wed Dec 31 19:00:00 1969 +++ new/sys/arm/include/_limits.h Sat Mar 8 12:51:14 2003 @@ -0,0 +1,89 @@ +/* + * Copyright (c) 2003 + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _MACHINE__LIMITS_H_ +#define _MACHINE__LIMITS_H_ + +#define __CHAR_BIT 8 /* number of bits in a char */ + +#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 */ +#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 */ + +#define __WCHAR_MIN __INT_MIN /* min value for wchar_t */ +#define __WCHAR_MAX __INT_MAX /* max value for wchar_t */ + +#define __WINT_MIN __INT_MIN /* min value for wint_t */ +#define __WINT_MAX __INT_MAX /* max value for wint_t */ + +/* 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 */ + +#define __SSIZE_MAX __INT_MAX /* max value for a ssize_t */ + +#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 /* !_MACHINE__LIMITS_H_ */ diff --exclude=*.orig -u -r -N orig/sys/arm/include/limits.h new/sys/arm/include/limits.h --- orig/sys/arm/include/limits.h Sun Dec 22 01:38:44 2002 +++ new/sys/arm/include/limits.h Sat Mar 8 12:40:36 2003 @@ -31,75 +31,14 @@ * SUCH DAMAGE. * * @(#)limits.h 8.3 (Berkeley) 1/4/94 - * $FreeBSD: src/sys/arm/include/limits.h,v 1.3 2002/12/22 06:38:44 tjr Exp $ + * From: NetBSD: limits.h,v 1.3 1997/04/06 08:47:31 cgd Exp + * $FreeBSD: src/sys/alpha/include/limits.h,v 1.10 2002/12/22 06:38:44 tjr Exp $ */ #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 */ -#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 */ +#warning " is deprecated. Include instead." +#include #endif /* !_MACHINE_LIMITS_H_ */ diff --exclude=*.orig -u -r -N orig/sys/i386/include/_limits.h new/sys/i386/include/_limits.h --- orig/sys/i386/include/_limits.h Wed Dec 31 19:00:00 1969 +++ new/sys/i386/include/_limits.h Sat Mar 8 12:51:24 2003 @@ -0,0 +1,89 @@ +/* + * Copyright (c) 2003 + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _MACHINE__LIMITS_H_ +#define _MACHINE__LIMITS_H_ + +#define __CHAR_BIT 8 /* number of bits in a char */ + +#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 */ +#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 */ + +#define __WCHAR_MIN __INT_MIN /* min value for wchar_t */ +#define __WCHAR_MAX __INT_MAX /* max value for wchar_t */ + +#define __WINT_MIN __INT_MIN /* min value for wint_t */ +#define __WINT_MAX __INT_MAX /* max value for wint_t */ + +/* 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 */ + +#define __SSIZE_MAX __INT_MAX /* max value for a ssize_t */ + +#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 /* !_MACHINE__LIMITS_H_ */ diff --exclude=*.orig -u -r -N orig/sys/i386/include/limits.h new/sys/i386/include/limits.h --- orig/sys/i386/include/limits.h Wed Jan 1 13:48:53 2003 +++ new/sys/i386/include/limits.h Sat Mar 8 14:49:57 2003 @@ -31,75 +31,14 @@ * SUCH DAMAGE. * * @(#)limits.h 8.3 (Berkeley) 1/4/94 - * $FreeBSD: src/sys/i386/include/limits.h,v 1.22 2003/01/01 18:48:53 schweikh Exp $ + * From: NetBSD: limits.h,v 1.3 1997/04/06 08:47:31 cgd Exp + * $FreeBSD: src/sys/alpha/include/limits.h,v 1.10 2002/12/22 06:38:44 tjr Exp $ */ #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 */ -#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 */ +#warning " is deprecated. Include instead." +#include #endif /* !_MACHINE_LIMITS_H_ */ diff --exclude=*.orig -u -r -N orig/sys/ia64/include/_limits.h new/sys/ia64/include/_limits.h --- orig/sys/ia64/include/_limits.h Wed Dec 31 19:00:00 1969 +++ new/sys/ia64/include/_limits.h Sat Mar 8 12:51:35 2003 @@ -0,0 +1,87 @@ +/* + * Copyright (c) 2003 + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _MACHINE__LIMITS_H_ +#define _MACHINE__LIMITS_H_ + +#define __CHAR_BIT 8 /* number of bits in a char */ + +#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 __WCHAR_MIN __INT_MIN /* min value for wchar_t */ +#define __WCHAR_MAX __INT_MAX /* max value for wchar_t */ + +#define __WINT_MIN __INT_MIN /* min value for wint_t */ +#define __WINT_MAX __INT_MAX /* max value for wint_t */ + +#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 */ + +#define __SSIZE_MAX __LONG_MAX /* max value for a ssize_t */ + +#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 */ + +#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 +#endif diff --exclude=*.orig -u -r -N orig/sys/ia64/include/limits.h new/sys/ia64/include/limits.h --- orig/sys/ia64/include/limits.h Wed Jan 1 13:48:54 2003 +++ new/sys/ia64/include/limits.h Sat Mar 8 14:50:10 2003 @@ -1,6 +1,3 @@ -/* $FreeBSD: src/sys/ia64/include/limits.h,v 1.8 2003/01/01 18:48:54 schweikh Exp $ */ -/* From: NetBSD: limits.h,v 1.3 1997/04/06 08:47:31 cgd Exp */ - /* * Copyright (c) 1988, 1993 * The Regents of the University of California. All rights reserved. @@ -34,70 +31,14 @@ * SUCH DAMAGE. * * @(#)limits.h 8.3 (Berkeley) 1/4/94 + * From: NetBSD: limits.h,v 1.3 1997/04/06 08:47:31 cgd Exp + * $FreeBSD: src/sys/alpha/include/limits.h,v 1.10 2002/12/22 06:38:44 tjr Exp $ */ -#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 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 +#ifndef _MACHINE_LIMITS_H_ +#define _MACHINE_LIMITS_H_ -#define DBL_DIG 15 -#define DBL_MAX 1.7976931348623157E+308 -#define DBL_MIN 2.2250738585072014E-308 +#warning " is deprecated. Include instead." +#include -#define FLT_DIG 6 -#define FLT_MAX 3.40282347E+38F -#define FLT_MIN 1.17549435E-38F -#endif +#endif /* !_MACHINE_LIMITS_H_ */ diff --exclude=*.orig -u -r -N orig/sys/powerpc/include/_limits.h new/sys/powerpc/include/_limits.h --- orig/sys/powerpc/include/_limits.h Wed Dec 31 19:00:00 1969 +++ new/sys/powerpc/include/_limits.h Sat Mar 8 13:06:05 2003 @@ -0,0 +1,88 @@ +/* + * Copyright (c) 2003 + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _MACHINE__LIMITS_H_ +#define _MACHINE__LIMITS_H_ + +#define __CHAR_BIT 8 /* number of bits in a char */ + +#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 */ +#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 */ + +#define __WCHAR_MIN __INT_MIN /* min value for wchar_t */ +#define __WCHAR_MAX __INT_MAX /* max value for wchar_t */ + +#define __WINT_MIN __INT_MIN /* min value for wint_t */ +#define __WINT_MAX __INT_MAX /* max value for wint_t */ + +/* 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 */ +#define __SSIZE_MAX __INT_MAX /* max value for a ssize_t */ +#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 /* !_MACHINE__LIMITS_H_ */ diff --exclude=*.orig -u -r -N orig/sys/powerpc/include/limits.h new/sys/powerpc/include/limits.h --- orig/sys/powerpc/include/limits.h Sat Jan 18 06:23:42 2003 +++ new/sys/powerpc/include/limits.h Sat Mar 8 14:50:24 2003 @@ -31,78 +31,14 @@ * SUCH DAMAGE. * * @(#)limits.h 8.3 (Berkeley) 1/4/94 - * $FreeBSD: src/sys/powerpc/include/limits.h,v 1.23 2003/01/18 11:23:42 grehan Exp $ + * From: NetBSD: limits.h,v 1.3 1997/04/06 08:47:31 cgd Exp + * $FreeBSD$ */ #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 */ -#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 */ +#warning " is deprecated. Include instead." +#include #endif /* !_MACHINE_LIMITS_H_ */ diff --exclude=*.orig -u -r -N orig/sys/sparc64/include/_limits.h new/sys/sparc64/include/_limits.h --- orig/sys/sparc64/include/_limits.h Wed Dec 31 19:00:00 1969 +++ new/sys/sparc64/include/_limits.h Sat Mar 8 12:52:03 2003 @@ -0,0 +1,89 @@ +/* + * Copyright (c) 2003 + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _MACHINE__LIMITS_H_ +#define _MACHINE__LIMITS_H_ + +#define __CHAR_BIT 8 /* number of bits in a char */ + +#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 __WCHAR_MIN __INT_MIN /* min value for wchar_t */ +#define __WCHAR_MAX __INT_MAX /* max value for wchar_t */ + +#define __WINT_MIN __INT_MIN /* min value for wint_t */ +#define __WINT_MAX __INT_MAX /* max value for wint_t */ + +#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 */ + +#define __SSIZE_MAX __LONG_MAX /* max value for a ssize_t */ + +#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 */ + + +#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 + +#endif /* !_MACHINE__LIMITS_H_ */ diff --exclude=*.orig -u -r -N orig/sys/sparc64/include/limits.h new/sys/sparc64/include/limits.h --- orig/sys/sparc64/include/limits.h Wed Jan 1 13:48:58 2003 +++ new/sys/sparc64/include/limits.h Sat Mar 8 14:50:41 2003 @@ -10,6 +10,13 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE @@ -24,76 +31,14 @@ * SUCH DAMAGE. * * @(#)limits.h 8.3 (Berkeley) 1/4/94 - * $FreeBSD: src/sys/sparc64/include/limits.h,v 1.8 2003/01/01 18:48:58 schweikh Exp $ + * From: NetBSD: limits.h,v 1.3 1997/04/06 08:47:31 cgd Exp + * $FreeBSD: src/sys/alpha/include/limits.h,v 1.10 2002/12/22 06:38:44 tjr Exp $ */ #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 -#endif +#warning " is deprecated. Include instead." +#include #endif /* !_MACHINE_LIMITS_H_ */ diff --exclude=*.orig -u -r -N orig/sys/sys/limits.h new/sys/sys/limits.h --- orig/sys/sys/limits.h Wed Dec 31 19:00:00 1969 +++ new/sys/sys/limits.h Sat Mar 8 12:55:34 2003 @@ -0,0 +1,100 @@ +/* + * Copyright (c) 2003 + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _SYS_LIMITS_H_ +#define _SYS_LIMITS_H_ + +#include + +#define CHAR_BIT __CHAR_BIT /* 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 __SCHAR_MAX /* max value for a signed char */ +#define SCHAR_MIN (__SCHAR_MIN) /* min value for a signed char */ + +#define UCHAR_MAX (__UCHAR_MAX) /* max value for an unsigned char */ +#define CHAR_MAX (__CHAR_MAX) /* max value for a char */ +#define CHAR_MIN (__CHAR_MIN) /* min value for a char */ + +#define USHRT_MAX __USHRT_MAX /* max value for an unsigned short */ +#define SHRT_MAX __SHRT_MAX /* max value for a short */ +#define SHRT_MIN __SHRT_MIN /* min value for a short */ + +#define UINT_MAX __UNIT_MAX /* max value for an unsigned int */ +#define INT_MAX __INT_MAX /* max value for an int */ +#define INT_MIN __INT_MIN /* min value for an int */ + +#define ULONG_MAX __ULONG_MAX /* max for an unsigned long */ +#define LONG_MAX __LONG_MAX /* max for a long */ +#define LONG_MIN (__LONG_MIN) /* min for a long */ + +/* Long longs and longs are the same size on the alpha. */ + /* max for an unsigned long long */ +#define ULLONG_MAX __ULLONG_MAX +#define LLONG_MAX __LLONG_MAX /* max for a long long */ +#define LLONG_MIN __LLONG_MIN /* min for a long long */ + +#if !defined(_ANSI_SOURCE) +#define SSIZE_MAX __SSIZE_MAX /* max value for a ssize_t */ + +#if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE) +#define SIZE_T_MAX __SIZE_T_MAX /* max value for a size_t */ + +#define OFF_MAX __OFF_MAX /* max value for a off_t */ +#define OFF_MIN __OFF_MIN /* min value for a off_t */ + +/* Quads and longs are the same on the alpha. Ensure they stay in sync. */ +#define UQUAD_MAX (__UQUAD_MAX) /* max value for a uquad_t */ +#define QUAD_MAX (__QUAD_MAX) /* max value for a quad_t */ +#define QUAD_MIN (__QUAD_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 __LONG_BIT +#define WORD_BIT __WORD_BIT + +#define DBL_DIG __DBL_DIG +#define DBL_MAX __DBL_MAX +#define DBL_MIN __DBL_MIN + +#define FLT_DIG __FLT_DIG +#define FLT_MAX __FLT_MAX +#define FLT_MIN __FLT_MIN +#endif + +#endif /* !_SYS_LIMITS_H_ */ diff --exclude=*.orig -u -r -N orig/sys/x86_64/include/_limits.h new/sys/x86_64/include/_limits.h --- orig/sys/x86_64/include/_limits.h Wed Dec 31 19:00:00 1969 +++ new/sys/x86_64/include/_limits.h Sat Mar 8 12:52:15 2003 @@ -0,0 +1,91 @@ +/* + * Copyright (c) 2003 + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)limits.h 8.3 (Berkeley) 1/4/94 + * From: NetBSD: limits.h,v 1.3 1997/04/06 08:47:31 cgd Exp + * From: FreeBSD: src/sys/alpha/include/limits.h,v 1.8 2001/11/02 + * $FreeBSD$ + */ + +#ifndef _MACHINE__LIMITS_H_ +#define _MACHINE__LIMITS_H_ + +#define __CHAR_BIT 8 /* number of bits in a char */ + +#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 __WCHAR_MIN __INT_MIN /* min value for wchar_t */ +#define __WCHAR_MAX __INT_MAX /* max value for wchar_t */ + +#define __WINT_MIN __INT_MIN /* min value for wint_t */ +#define __WINT_MAX __INT_MAX /* max value for wint_t */ + +#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 */ + +#define __SSIZE_MAX __LONG_MAX /* max value for a ssize_t */ + +#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 */ + +#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 + +#endif /* !_MACHINE__LIMITS_H_ */ diff --exclude=*.orig -u -r -N orig/sys/x86_64/include/limits.h new/sys/x86_64/include/limits.h --- orig/sys/x86_64/include/limits.h Wed Jan 1 13:48:59 2003 +++ new/sys/x86_64/include/limits.h Sat Mar 8 14:51:03 2003 @@ -39,70 +39,7 @@ #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 -#endif +#warning " is deprecated. Include instead." +#include #endif /* !_MACHINE_LIMITS_H_ */ >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-standards@FreeBSD.ORG Tue Apr 1 06:06:44 2003 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8208C37B401; Tue, 1 Apr 2003 06:06:44 -0800 (PST) Received: from h00609772adf0.ne.client2.attbi.com (h00609772adf0.ne.client2.attbi.com [24.61.43.152]) by mx1.FreeBSD.org (Postfix) with ESMTP id 35A6743F75; Tue, 1 Apr 2003 06:06:43 -0800 (PST) (envelope-from rodrigc@attbi.com) Received: from h00609772adf0.ne.client2.attbi.com (localhost.ne.attbi.com [127.0.0.1])h31E6vri086967; Tue, 1 Apr 2003 09:06:58 -0500 (EST) (envelope-from rodrigc@h00609772adf0.ne.client2.attbi.com) Received: (from rodrigc@localhost)h31E6v8B086966; Tue, 1 Apr 2003 09:06:57 -0500 (EST) Date: Tue, 1 Apr 2003 09:06:57 -0500 From: Craig Rodrigues To: Juli Mallett Message-ID: <20030401140657.GA86955@attbi.com> References: <20030219223313.GA93707@attbi.com> <20030220112847.A36977@dilbert.robbins.dropbear.id.au> <20030219205726.G61431@espresso.bsdmike.org> <20030220141410.A42150@dilbert.robbins.dropbear.id.au> <20030219221340.I61431@espresso.bsdmike.org> <20030219213014.A63399@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030219213014.A63399@FreeBSD.org> User-Agent: Mutt/1.4i cc: kan@FreeBSD.org cc: freebsd-standards@FreeBSD.org cc: Tim Robbins cc: Mike Barcroft Subject: Re: WCHAR_MIN and WCHAR_MAX not defined in X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Apr 2003 14:06:44 -0000 On Wed, Feb 19, 2003 at 09:30:14PM -0600, Juli Mallett wrote: > * De: Mike Barcroft [ Data: 2003-02-19 ] > [ Subjecte: Re: WCHAR_MIN and WCHAR_MAX not defined in ] > > is an implementation detail for userland. We could > > always make include with an > > appropriate #warning to transition consumers over. > > > > I vote for this option. > > Same here, by all means! I have submitted a patch, could someone take a look? http://www.freebsd.org/cgi/query-pr.cgi?pr=50523 Thanks. -- Craig Rodrigues http://home.attbi.com/~rodrigc rodrigc@attbi.com From owner-freebsd-standards@FreeBSD.ORG Wed Apr 2 09:30:04 2003 Return-Path: Delivered-To: freebsd-standards@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E9E4D37B401 for ; Wed, 2 Apr 2003 09:30:04 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id AD83043FD7 for ; Wed, 2 Apr 2003 09:30:03 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h32HU3Up025393 for ; Wed, 2 Apr 2003 09:30:03 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h32HU3X8025392; Wed, 2 Apr 2003 09:30:03 -0800 (PST) Resent-Date: Wed, 2 Apr 2003 09:30:03 -0800 (PST) Resent-Message-Id: <200304021730.h32HU3X8025392@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-standards@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Joshua Coombs Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A1E7137B401; Wed, 2 Apr 2003 09:25:20 -0800 (PST) Received: from E-Machine.x386.net (e-machine.x386.net [207.5.176.28]) by mx1.FreeBSD.org (Postfix) with ESMTP id EBBEE43FCB; Wed, 2 Apr 2003 09:25:19 -0800 (PST) (envelope-from jcoombs@E-Machine.x386.net) Received: from E-Machine.x386.net (localhost [127.0.0.1]) by E-Machine.x386.net (8.12.6p2/8.12.6) with ESMTP id h32HP5dA000114; Wed, 2 Apr 2003 12:25:13 -0500 (EST) (envelope-from jcoombs@E-Machine.x386.net) Received: (from root@localhost) by E-Machine.x386.net (8.12.6p2/8.12.6/Submit) id h32HGuSa000284; Wed, 2 Apr 2003 12:16:56 -0500 (EST) Message-Id: <200304021716.h32HGuSa000284@E-Machine.x386.net> Date: Wed, 2 Apr 2003 12:16:56 -0500 (EST) From: Joshua Coombs To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 cc: freebsd-questions@FreeBSD.org Subject: standards/50547: ips.evil counter fails to incriment X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Joshua Coombs List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Apr 2003 17:30:05 -0000 >Number: 50547 >Category: standards >Synopsis: ips.evil counter fails to incriment >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-standards >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Apr 02 09:30:03 PST 2003 >Closed-Date: >Last-Modified: >Originator: Joshua Coombs >Release: FreeBSD 4.7-RELEASE-p10 i386 >Organization: x386.net >Environment: System: FreeBSD E-Machine.x386.net 4.7-RELEASE-p10 FreeBSD 4.7-RELEASE-p10 #0: Tue Apr 1 18:52:17 EST 2003 root@E-Machine.x386.net:/usr/obj/usr/src/sys/GENERIC i386 >Description: After applying ftp://ftp.jurai.net/users/winter/patches/rfc3514-stable.patch and rebuilding world/kernel, rfc 3514 support appears to function, however the provided interface for tracking recieved 'evil' packets does not appear to work. >How-To-Repeat: apply the patch rebuild world/kernel enable rfc3514 support sysctl -w net.inet.ip.rfc3514=1 verify hear_no_evil and speak_no_evil are disabled sysctl -w net.inet.ip.hear_no_evil=0 sysctl -w net.inet.ip.speak_no_evil=0 generate 'evil' packets ping -c 10 -E localhost see if the system noticed the 'evil' packets netstat -s | grep -i evil Currently the counter stays at 0 although it responds to 'evil' pings. >Fix: >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-standards@FreeBSD.ORG Wed Apr 2 15:37:53 2003 Return-Path: Delivered-To: freebsd-standards@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4335437B401; Wed, 2 Apr 2003 15:37:53 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id D242543FA3; Wed, 2 Apr 2003 15:37:52 -0800 (PST) (envelope-from mike@FreeBSD.org) Received: from freefall.freebsd.org (mike@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h32NbqUp020319; Wed, 2 Apr 2003 15:37:52 -0800 (PST) (envelope-from mike@freefall.freebsd.org) Received: (from mike@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h32NbqbD020315; Wed, 2 Apr 2003 15:37:52 -0800 (PST) Date: Wed, 2 Apr 2003 15:37:52 -0800 (PST) From: Mike Barcroft Message-Id: <200304022337.h32NbqbD020315@freefall.freebsd.org> To: kurlon@x386.net, mike@FreeBSD.org, freebsd-standards@FreeBSD.org Subject: Re: standards/50547: ips.evil counter fails to incriment X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Apr 2003 23:37:53 -0000 Synopsis: ips.evil counter fails to incriment State-Changed-From-To: open->closed State-Changed-By: mike State-Changed-When: Wed Apr 2 15:36:57 PST 2003 State-Changed-Why: It was decided that RFC3514 poses an unacceptale risk to compliant systems. http://www.freebsd.org/cgi/query-pr.cgi?pr=50547 From owner-freebsd-standards@FreeBSD.ORG Thu Apr 3 12:35:02 2003 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3669D37B401 for ; Thu, 3 Apr 2003 12:35:02 -0800 (PST) Received: from xkis.kis.ru (xkis.kis.ru [195.98.32.200]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6DC5C43FBF for ; Thu, 3 Apr 2003 12:35:00 -0800 (PST) (envelope-from bock@bock.nnov.ru) Received: from bock.nnov.ru (mera02.adsl.kis.ru [212.92.155.98]) by xkis.kis.ru (8.12.9/8.12.9) with ESMTP id h33KYxoY018651 for ; Fri, 4 Apr 2003 00:34:59 +0400 (MSD) Message-ID: <3E8C9B42.4070805@bock.nnov.ru> Date: Fri, 04 Apr 2003 00:36:18 +0400 From: Alexander Chetyrbock User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.2.1) Gecko/20030203 X-Accept-Language: ru, en-us, en MIME-Version: 1.0 To: freebsd-standards@FreeBSD.org X-Enigmail-Version: 0.71.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: SO_ACCEPTCONN in getsockopt X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Apr 2003 20:35:02 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi POSIX-compliant getsockopt should have possibility to obtain SO_ACCEPTCONN flag value from so_options. See http://www.opengroup.org/onlinepubs/007904975/functions/getsockopt.html But FreeBSD getopt doesn't have this possibility. I think that commiters can add one line to sys/kern/uipc_socket.c (to sogetopt function) to provide that functionality. It can be something like this: ==== ~ case SO_USELOOPBACK: ~ case SO_DONTROUTE: ~ case SO_DEBUG: ~ case SO_KEEPALIVE: ~ case SO_REUSEADDR: ~ case SO_REUSEPORT: ~ case SO_BROADCAST: ~ case SO_OOBINLINE: + case SO_ACCEPTCONN: ~ case SO_TIMESTAMP: ~ optval = so->so_options & sopt->sopt_name; ~ integer: ~ error = sooptcopyout(sopt, &optval, sizeof optval); ~ ==== PS. Is there any other way to obtain this value from kernel to userspace? May be ioctl? - -- Alexander Chetyrbock -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQE+jJtCjQ0dJI1fBVgRAjqyAJ9PTYiEiHg3r9s/s9qzmkx1acWD7ACfdugX ur61a95xva37YIvxg+7rbNk= =6P3M -----END PGP SIGNATURE----- From owner-freebsd-standards@FreeBSD.ORG Thu Apr 3 19:10:02 2003 Return-Path: Delivered-To: freebsd-standards@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0A2E037B401 for ; Thu, 3 Apr 2003 19:10:02 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id F1B6043FA3 for ; Thu, 3 Apr 2003 19:10:00 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h343A0Up041976 for ; Thu, 3 Apr 2003 19:10:00 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h343A0a8041975; Thu, 3 Apr 2003 19:10:00 -0800 (PST) Resent-Date: Thu, 3 Apr 2003 19:10:00 -0800 (PST) Resent-Message-Id: <200304040310.h343A0a8041975@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-standards@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Craig Rodrigues Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3925C37B401; Thu, 3 Apr 2003 19:08:54 -0800 (PST) Received: from h00609772adf0.ne.client2.attbi.com (h00609772adf0.ne.client2.attbi.com [24.61.43.152]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5F9C543F3F; Thu, 3 Apr 2003 19:08:53 -0800 (PST) (envelope-from rodrigc@attbi.com) Received: from h00609772adf0.ne.client2.attbi.com (localhost.ne.attbi.com [127.0.0.1])h3439FcJ011874; Thu, 3 Apr 2003 22:09:15 -0500 (EST) (envelope-from rodrigc@h00609772adf0.ne.client2.attbi.com) Received: (from rodrigc@localhost)h3439EcJ011873; Thu, 3 Apr 2003 22:09:15 -0500 (EST) Message-Id: <200304040309.h3439EcJ011873@h00609772adf0.ne.client2.attbi.com> Date: Thu, 3 Apr 2003 22:09:15 -0500 (EST) From: Craig Rodrigues To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 cc: mike@FreeBSD.org Subject: standards/50582: Define WCHAR_MIN and WCHAR_MAX in X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Craig Rodrigues List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Apr 2003 03:10:02 -0000 >Number: 50582 >Category: standards >Synopsis: Define WCHAR_MIN and WCHAR_MAX in >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-standards >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Apr 03 19:10:00 PST 2003 >Closed-Date: >Last-Modified: >Originator: Craig Rodrigues >Release: FreeBSD 5.0-CURRENT i386 >Organization: >Environment: System: FreeBSD h00609772adf0.ne.client2.attbi.com 5.0-CURRENT FreeBSD 5.0-CURRENT #19: Sat Mar 22 21:49:42 EST 2003 rodrigc@h00609772adf0.ne.client2.attbi.com:/usr/obj/usr/src/sys/MYKERNEL1 i386 >Description: FreeBSD's needs to define WCHAR_MIN and WCHAR_MAX. After discussions with Mike Barcroft, I submitted PR 50523 ( http://www.freebsd.org/cgi/query-pr.cgi?pr=50523 ) to deprecate and create a private header and a public header . After the patch 50523 is applied, then this patch can be applied to define WCHAR_MIN and WCHAR_MAX in >How-To-Repeat: >Fix: Index: wchar.h =================================================================== RCS file: /home/ncvs/src/include/wchar.h,v retrieving revision 1.34 diff -u -r1.34 wchar.h --- wchar.h 2003/03/13 06:29:53 1.34 +++ wchar.h 2003/04/04 03:03:05 @@ -69,6 +69,7 @@ #include #include +#include #ifndef NULL #define NULL 0 @@ -98,6 +99,14 @@ #ifndef WEOF #define WEOF ((wint_t)-1) +#endif + +#ifndef WCHAR_MIN +#define WCHAR_MIN __WCHAR_MIN +#endif + +#ifndef WCHAR_MAX +#define WCHAR_MAX __WCHAR_MAX #endif struct __sFILE; >Release-Note: >Audit-Trail: >Unformatted: