From nobody@FreeBSD.org  Mon Apr 22 11:54:25 2002
Return-Path: <nobody@FreeBSD.org>
Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21])
	by hub.freebsd.org (Postfix) with ESMTP id 1A2EA37B47F
	for <freebsd-gnats-submit@freebsd.org>; Mon, 22 Apr 2002 11:53:05 -0700 (PDT)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.11.6/8.11.6) id g3MGVWm75045;
	Mon, 22 Apr 2002 09:31:32 -0700 (PDT)
	(envelope-from nobody)
Message-Id: <200204221631.g3MGVWm75045@freefall.freebsd.org>
Date: Mon, 22 Apr 2002 09:31:32 -0700 (PDT)
From: Dado Colussi <gdc@iki.fi>
To: freebsd-gnats-submit@freebsd.org
Subject: _POSIX_THREADS defined but sysconf(_SC_THREADS) fails to compile
X-Send-Pr-Version: www-1.0

>Number:         37347
>Category:       kern
>Synopsis:       _POSIX_THREADS defined but sysconf(_SC_THREADS) fails to compile
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Apr 22 12:00:08 PDT 2002
>Closed-Date:    Sun Nov 17 07:59:35 PST 2002
>Last-Modified:  Sun Nov 17 07:59:35 PST 2002
>Originator:     Dado Colussi
>Release:        4.3-RELEASE
>Organization:
>Environment:
FreeBSD soul 4.3-RELEASE FreeBSD 4.3-RELEASE #0: Wed Jul 11 12:21:35 CEST 2001
gdc@soul.de.entirem.com:/usr/src/sys/compile/SOUL  i386

>Description:
Macro _POSIX_THREADS indicates presense of POSIX threads at compile
time. sysconf(_SC_THREADS) should be used to check whether POSIX
threads is available at runtime. However, code using _SC_THREADS
fail to compile because _SC_THREADS does not exist.
>How-To-Repeat:
#include <unistd.h>
#include <stdio.h>

int
main()
{

#ifdef _POSIX_THREADS
        printf("sysconf(_SC_THREADS): %d\n", sysconf(_SC_THREADS));
#else
        printf("_POSIX_THREADS not defined\n");
#endif

        return 0;
}

>Fix:
      
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: mike 
State-Changed-When: Sun Nov 17 07:58:49 PST 2002 
State-Changed-Why:  
This issue has been fixed in -current. 

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