From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 124696 invoked by alias); 9 Nov 2016 19:41:21 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 124061 invoked by uid 89); 9 Nov 2016 19:41:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=ham version=3.3.2 spammy=UD:features.h, features.h, featuresh, H*MI:sk:d61199c X-HELO: mail-it0-f51.google.com Received: from mail-it0-f51.google.com (HELO mail-it0-f51.google.com) (209.85.214.51) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 09 Nov 2016 19:41:14 +0000 Received: by mail-it0-f51.google.com with SMTP id u205so293902557itc.0 for ; Wed, 09 Nov 2016 11:41:14 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=I3FGnf1JfiFSHC1xth39c431RAioMeWn1gCaTEg3YeM=; b=e5MleeB+gy/zhOzG6QaK8uaw9SFOQFOfxc3euuvWF69nyRbu3mZXdqAcvTBp9RhK79 0Bn/mNuPe3XJbmCd/NzP90WnH5qBVCMpxnFHXNnD/2UqGL63TCyP+ZBKUMzPyW/g2/lf HI+gmGgHALizEDgzPahdFNRIsTBQaffu1O/eUpjI7pbtPsBppylVVwkTkvP8Pllh1s8r mIyGPhvfgnZh2+K4S2sfV0c/L4BjNWvOQy+ZoSFG+TjH12G184MpzNWWOMkmK0cG0f1X QbrPAp5Ram16VKJYA8hX4yEzBtm/e1z0NcAejoqDEYy7BzMXriXbuX+oeAEwtBVSfxE8 Fpbw== X-Gm-Message-State: ABUngvdWZZn/4nxei8g6WJiwUEaDBrX2exqZf4D4a4EbJKWhXfVSbiriwzxj+0DVS7qgsw== X-Received: by 10.107.180.212 with SMTP id d203mr2012890iof.101.1478720472588; Wed, 09 Nov 2016 11:41:12 -0800 (PST) Received: from [192.168.0.6] (d27-96-48-76.nap.wideopenwest.com. [96.27.76.48]) by smtp.gmail.com with ESMTPSA id v74sm626605ioi.2.2016.11.09.11.41.11 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Nov 2016 11:41:12 -0800 (PST) Subject: Re: issetugid - not declared when _XOPEN_SOURCE is also defined To: cygwin@cygwin.com References: From: cyg Simple Message-ID: <9bb90c12-b50b-faf9-b309-f916dd84bebe@gmail.com> Date: Wed, 09 Nov 2016 19:41:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2016-11/txt/msg00077.txt.bz2 On 11/9/2016 1:13 PM, cyg Simple wrote: > The following program demonstrates the issue. Should issetugid be > declared with this scenario? > > /*****************************************************/ > #define _XOPEN_SOURCE 1 /* Causes declare warning */ > #define __BSD_VISIBLE 1 > #include > > int main(int argc, char ** argv) { > int result; > result = issetugid(); > } > /****************************************************/ > Because when _XOPEN_SOURCE is 1 _DEFAULT_SOURCE doesn't get set which then #undef __BSD_VISIBLE and and sets it to 0. See /usr/include/sys/features.h. If I #define _DEFAULT_SOURCE 1 before the #include then the above code works. However, should it? -- cyg Simple -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple