From nobody@FreeBSD.org  Fri Sep 22 01:08:54 2006
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id A5A2516A40F
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 22 Sep 2006 01:08:54 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 070A843D5C
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 22 Sep 2006 01:08:46 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k8M18kx6044136
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 22 Sep 2006 01:08:46 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id k8M18kVt044135;
	Fri, 22 Sep 2006 01:08:46 GMT
	(envelope-from nobody)
Message-Id: <200609220108.k8M18kVt044135@www.freebsd.org>
Date: Fri, 22 Sep 2006 01:08:46 GMT
From: Diego Petten <flameeyes@gentoo.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: __evOptMonoTime is inconsistently declared in lib/libc/isc
X-Send-Pr-Version: www-2.3

>Number:         103470
>Category:       kern
>Synopsis:       [libc] [patch] __evOptMonoTime is inconsistently declared in lib/libc/isc
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kan
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Sep 22 01:10:17 GMT 2006
>Closed-Date:    Fri Sep 22 02:14:14 GMT 2006
>Last-Modified:  Fri Sep 22 02:14:14 GMT 2006
>Originator:     Diego Petten
>Release:        6.2-BETA1
>Organization:
Gentoo
>Environment:
FreeBSD defiant 6.2-BETA1 FreeBSD Gentoo 6.2_beta1 #1: Thu Sep 21 23:24:32 CEST 2006     root@defiant:/usr/src/sys-6.2_beta1/i386/compile/GENERIC  i386

>Description:
Although I know that this is totally non-priority for FreeBSD developers,
I'd like to report that the variable __evOptMonoTime is declared
inconsistently in lib/libc/isc from the sources of the just released
6.2-BETA1 FreeBSD:

lib/libc/isc/eventlib_p.h:283:extern int        __evOptMonoTime;
lib/libc/isc/ev_timers.c:53:static int  __evOptMonoTime;

This leads to a failure in build with GCC 4.1, and it really makes no
sense, so that the behaviour is really undefined even on other GCC versions.
As __evOptMonoTime seems to be an exported symbol to set global options,
the static keyword should be dropped from ev_timers.c.

>How-To-Repeat:
Building with GCC 4.1 will show the error:

lib/libc/isc/ev_timers.c:53: error: static declaration of '__evOptMonoTime' follows non-static declaration
lib/libc/isc/eventlib_p.h:283: error: previous declaration of '__evOptMonoTime' was here

>Fix:
Index: fbsd-6.2/lib/libc/isc/ev_timers.c
===================================================================
--- fbsd-6.2.orig/lib/libc/isc/ev_timers.c
+++ fbsd-6.2/lib/libc/isc/ev_timers.c
@@ -50,7 +50,7 @@ __FBSDID("$FreeBSD: src/lib/libc/isc/ev_
 /* Forward. */

 #ifdef _LIBC
-static int     __evOptMonoTime;
+int    __evOptMonoTime;
 #else
 static int due_sooner(void *, void *);
 static void set_index(void *, int);

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: kan 
State-Changed-When: Fri Sep 22 02:09:46 UTC 2006 
State-Changed-Why:  
I stumbled upon this while working on GCC4 import. 
Slightly different patch was sitting in my tree uncommitted, so 
I just checked it in. 



Responsible-Changed-From-To: freebsd-bugs->kan 
Responsible-Changed-By: kan 
Responsible-Changed-When: Fri Sep 22 02:09:46 UTC 2006 
Responsible-Changed-Why:  
I stumbled upon this while working on GCC4 import. 
Slightly different patch was sitting in my tree uncommitted, so 
I just checked it in. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=103470 
>Unformatted:
