X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=vu5BMDM9QXjOJldl AWY4ajTuNv8FkKwZFkp4GFCqDKJ+xD7hWURy6qvdFqSO4bV7y/jDjKSBuVh0H7BV 47ETbF3x3eKOs82cYZ9EdC5U7kSIy6XiZ7PPGBpLkroXs/+PyFPTNJ/OFJtAXoQS XuLZRdy9p7P02Li+6bCwLosyRUE= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=sQG/7denF/tBcLeVFV/kHk 0leh4=; b=hoLZXMKPnQEFlTW/MCmGYU3xrP4VOuPdM86v7tRGs3GHYZz3V7q7D8 1xUXjZ/WTPruRTZB5Kqsdrp2rMS46YtmvEppXZKdLFC1Zl/X2e7IceN81QiHYkos VSJDRUt4D0kW+caS/cXEjgYZPw54dV2VPU6EGNihAZony1Wwu++w8= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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 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) Subject: Re: issetugid - not declared when _XOPEN_SOURCE is also defined To: cygwin AT cygwin DOT com References: From: cyg Simple Message-ID: <9bb90c12-b50b-faf9-b309-f916dd84bebe@gmail.com> Date: Wed, 9 Nov 2016 14:41:04 -0500 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 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