From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32332 invoked by alias); 11 Sep 2013 18:24:32 -0000 Mailing-List: contact pthreads-win32-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: pthreads-win32-owner@sourceware.org Received: (qmail 32323 invoked by uid 89); 11 Sep 2013 18:24:32 -0000 Received: from mx0a-00105401.pphosted.com (HELO mx0a-00105401.pphosted.com) (67.231.144.184) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Wed, 11 Sep 2013 18:24:32 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.8 required=5.0 tests=AWL,BAYES_20,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_NO autolearn=ham version=3.3.2 X-HELO: mx0a-00105401.pphosted.com Received: from pps.filterd (m0004020.ppops.net [127.0.0.1]) by mx0a-00105401.pphosted.com (8.14.5/8.14.5) with SMTP id r8BIJCZI016455 for ; Wed, 11 Sep 2013 14:24:29 -0400 Received: from xmnpv32.utc.com (xmnpv32.utc.com [159.82.164.212]) by mx0a-00105401.pphosted.com with ESMTP id 1etq7kbxp5-1 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=OK) for ; Wed, 11 Sep 2013 14:24:28 -0400 Received: from pps.filterd (XMNPV32.utc.com [127.0.0.1]) by xmnpv32.utc.com (8.14.5/8.14.5) with SMTP id r8BIJO10004864; Wed, 11 Sep 2013 14:24:26 -0400 Received: from uusmna1q.utc.com (uusmna1q.utc.com [159.82.219.65]) by xmnpv32.utc.com with ESMTP id 1eeq4wh51a-1 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=FAIL) for ; Wed, 11 Sep 2013 14:24:26 -0400 Received: from NHC0EX51.goodrich.root.local ([170.126.248.98]) by uusmna1q.utc.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r8BIOPkV023726 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL) for ; Wed, 11 Sep 2013 14:24:26 -0400 Received: from NHC0EX54.goodrich.root.local ([fe80::8152:1d20:5265:a81d]) by NHC0EX51.goodrich.root.local ([fe80::d8c6:b87e:9668:15c%18]) with mapi id 14.02.0328.011; Wed, 11 Sep 2013 11:24:18 -0700 From: "Burkhardt, Glenn UTAS" To: "pthreads-win32@sourceware.org" Subject: warning with _POSIX_C_SOURCE and PTW32_LEVEL Date: Wed, 11 Sep 2013 18:24:00 -0000 Message-ID: <86DD1E0283018749B08AA5A580CB853E39FCF43D@NHC0EX54.goodrich.root.local> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 kscore.is_bulkscore=5.55111512312578e-15 kscore.compositescore=0.997324618378348 circleOfTrustscore=9.552 compositescore=0.000966437637709619 urlsuspect_oldscore=0.00254981286595091 suspectscore=0 recipient_domain_to_sender_totalscore=241 phishscore=0 bulkscore=0 kscore.is_spamscore=0 recipient_to_sender_totalscore=0 recipient_domain_to_sender_domain_totalscore=230 rbsscore=0.000966437637709619 spamscore=0 recipient_to_sender_domain_totalscore=0 urlsuspectscore=0.9 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1305240000 definitions=main-1309110103 X-IsSubscribed: yes X-SW-Source: 2013/txt/msg00017.txt.bz2 I'm seeing a CPP warning when _POSIX_C_SOURCE is defined $ cpp -D_POSIX_C_SOURCE=3D200809L pthread.h > /dev/null pthread.h:108:0: warning: "PTW32_LEVEL" redefined [enabled by default] pthread.h:95:0: note: this is the location of the previous definition $ cpp -D_POSIX_C_SOURCE=3D200809L sched.h > /dev/null sched.h:64:0: warning: "PTW32_SCHED_LEVEL" redefined [enabled by default] sched.h:51:0: note: this is the location of the previous definition $ cpp --version cpp.exe (GCC) 4.7.0 and my reading of the code in pthread.h indicates that the warning is valid: first: #if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >=3D 199309 #undef PTW32_LEVEL #define PTW32_LEVEL 1 /* Include 1b, 1c and 1d */ #endif defines PTW32_LEVEL, and then #if ( defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >=3D 200112 ) || !define= d(PTW32_LEVEL) #define PTW32_LEVEL PTW32_LEVEL_MAX /* Include everything */ #endif so when _POSIX_C_SOURCE=3D200809L, PTW32_LEVEL gets defined twice. Seems like a bug...