From nobody@FreeBSD.org  Tue Sep 21 06:42:44 2010
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 17E9C106566C
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 21 Sep 2010 06:42:44 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 075CD8FC12
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 21 Sep 2010 06:42:44 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o8L6ghBV085125
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 21 Sep 2010 06:42:43 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id o8L6ghK4085124;
	Tue, 21 Sep 2010 06:42:43 GMT
	(envelope-from nobody)
Message-Id: <201009210642.o8L6ghK4085124@www.freebsd.org>
Date: Tue, 21 Sep 2010 06:42:43 GMT
From: Derrick Brashear <shadow@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: csup should include limits.h instead of sys/limits.h
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         150772
>Category:       bin
>Synopsis:       [patch] csup(1) should include limits.h instead of sys/limits.h
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    crees
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Sep 21 06:50:01 UTC 2010
>Closed-Date:    Wed Sep 28 17:04:07 UTC 2011
>Last-Modified:  Wed Sep 28 17:10:08 UTC 2011
>Originator:     Derrick Brashear
>Release:        n/a
>Organization:
OpenAFS
>Environment:
Darwin scully-2.local 10.2.0 Darwin Kernel Version 10.2.0: Tue Nov  3 10:37:10 PST 2009; root:xnu-1486.2.11~1/RELEASE_I386 i386

>Description:
All but one inclusion of limits.h use the portable (/usr/include) header path; One uses sys/limits.h, which is included by limits.h.
>How-To-Repeat:
try to build on MacOS
>Fix:
Index: diff.c
===================================================================
--- diff.c      (revision 212951)
+++ diff.c      (working copy)
@@ -26,7 +26,7 @@
  * $FreeBSD$
  */
 
-#include <sys/limits.h>
+#include <limits.h>
 
 #include <assert.h>
 #include <err.h>


>Release-Note:
>Audit-Trail:

From: Bruce Evans <brde@optusnet.com.au>
To: Derrick Brashear <shadow@gmail.com>
Cc: freebsd-gnats-submit@FreeBSD.org, freebsd-bugs@FreeBSD.org
Subject: Re: bin/150772: csup should include limits.h instead of sys/limits.h
Date: Tue, 21 Sep 2010 18:24:49 +1000 (EST)

 On Tue, 21 Sep 2010, Derrick Brashear wrote:
 
 >> Description:
 > All but one inclusion of limits.h use the portable (/usr/include) header path; One uses sys/limits.h, which is included by limits.h.
 
 I wonder if we could properly break unportable includers.  In this case,
 maybe use one of:
 
 A. Don't install <sys/limits.h>.  Requires some reorganization, since
     <limits.h> incudes it now.
 B. #error if <sys/limits.h> is included by anything except <limits.h>
     outside of the kernel.
 
 Bruce

From: Garrett Cooper <yanegomi@gmail.com>
To: bug-followup@FreeBSD.org, shadow@gmail.com
Cc:  
Subject: Re: bin/150772: [patch] csup(1) should include limits.h instead of
 sys/limits.h
Date: Sat, 10 Sep 2011 20:56:49 -0700 (PDT)

   This message is in MIME format.  The first part should be readable text,
   while the remaining parts are likely unreadable without MIME-aware tools.
 
 --967339439-1160601057-1315713417=:67819
 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII
 
  	The following attached patch fixes the issue in a stylistically 
 correct way.
 Thanks,
 -Garrett
 --967339439-1160601057-1315713417=:67819
 Content-Type: TEXT/PLAIN; charset=US-ASCII; name=bin-150772.patch
 Content-Transfer-Encoding: BASE64
 Content-ID: <alpine.BSF.2.00.1109102056490.67819@toaster.local>
 Content-Description: 
 Content-Disposition: attachment; filename=bin-150772.patch
 
 SW5kZXg6IHVzci5iaW4vY3N1cC9kaWZmLmMNCj09PT09PT09PT09PT09PT09
 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
 PT09PT0NCi0tLSB1c3IuYmluL2NzdXAvZGlmZi5jCShyZXZpc2lvbiAyMjU0
 NTcpDQorKysgdXNyLmJpbi9jc3VwL2RpZmYuYwkod29ya2luZyBjb3B5KQ0K
 QEAgLTI2LDExICsyNiwxMCBAQA0KICAqICRGcmVlQlNEJA0KICAqLw0KIA0K
 LSNpbmNsdWRlIDxzeXMvbGltaXRzLmg+DQotDQogI2luY2x1ZGUgPGFzc2Vy
 dC5oPg0KICNpbmNsdWRlIDxlcnIuaD4NCiAjaW5jbHVkZSA8ZXJybm8uaD4N
 CisjaW5jbHVkZSA8bGltaXRzLmg+DQogI2luY2x1ZGUgPHN0ZGlvLmg+DQog
 I2luY2x1ZGUgPHN0ZGxpYi5oPg0KICNpbmNsdWRlIDxzdHJpbmcuaD4NCg==
 
 --967339439-1160601057-1315713417=:67819--
Responsible-Changed-From-To: freebsd-bugs->crees 
Responsible-Changed-By: crees 
Responsible-Changed-When: Fri Sep 16 20:07:11 UTC 2011 
Responsible-Changed-Why:  
I'll take it, but it'll need to wait until the RELENG_9 branch. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=150772 
State-Changed-From-To: open->closed 
State-Changed-By: crees 
State-Changed-When: Wed Sep 28 17:04:05 UTC 2011 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=150772 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/150772: commit references a PR
Date: Wed, 28 Sep 2011 17:04:07 +0000 (UTC)

 Author: crees (ports committer)
 Date: Wed Sep 28 17:03:49 2011
 New Revision: 225844
 URL: http://svn.freebsd.org/changeset/base/225844
 
 Log:
   Include limits.h instead of sys/limits.h to improve portability.
   
   PR:		bin/150772
   Submitted by:	Derrick Brashear <shadow@gmail.com>
   Reviewed by:	Garrett Cooper <yanegomi@gmail.com>
   Approved by:	cognet
 
 Modified:
   head/usr.bin/csup/diff.c
 
 Modified: head/usr.bin/csup/diff.c
 ==============================================================================
 --- head/usr.bin/csup/diff.c	Wed Sep 28 16:12:15 2011	(r225843)
 +++ head/usr.bin/csup/diff.c	Wed Sep 28 17:03:49 2011	(r225844)
 @@ -26,11 +26,10 @@
   * $FreeBSD$
   */
  
 -#include <sys/limits.h>
 -
  #include <assert.h>
  #include <err.h>
  #include <errno.h>
 +#include <limits.h>
  #include <stdio.h>
  #include <stdlib.h>
  #include <string.h>
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
>Unformatted:
