Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Apr 2002 09:31:32 -0700 (PDT)
From:      Dado Colussi <gdc@iki.fi>
To:        freebsd-gnats-submit@freebsd.org
Subject:   kern/37347: _POSIX_THREADS defined but sysconf(_SC_THREADS) fails to compile
Message-ID:  <200204221631.g3MGVWm75045@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Apr 22 12:00:08 PDT 2002
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200204221631.g3MGVWm75045>