From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jarek Czekalski Newsgroups: gmane.emacs.devel Subject: Re: after r114507 cannot build on msys - dup2 problem Date: Thu, 31 Oct 2013 20:22:14 +0100 Message-ID: <5272ADE6.1050905@poczta.onet.pl> References: <527296F1.9020300@poczta.onet.pl> <83ppqlcnjn.fsf@gnu.org> <5272A824.3000300@poczta.onet.pl> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1383247343 20168 80.91.229.3 (31 Oct 2013 19:22:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 31 Oct 2013 19:22:23 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Oct 31 20:22:29 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Vbxp6-0001pP-1e for ged-emacs-devel@m.gmane.org; Thu, 31 Oct 2013 20:22:28 +0100 Original-Received: from localhost ([::1]:58949 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vbxp5-0004NF-K4 for ged-emacs-devel@m.gmane.org; Thu, 31 Oct 2013 15:22:27 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39656) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vbxox-0004Mu-VP for emacs-devel@gnu.org; Thu, 31 Oct 2013 15:22:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vbxos-0006zM-DT for emacs-devel@gnu.org; Thu, 31 Oct 2013 15:22:19 -0400 Original-Received: from smtpo11.poczta.onet.pl ([213.180.142.142]:41326) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vbxos-0006yz-3U for emacs-devel@gnu.org; Thu, 31 Oct 2013 15:22:14 -0400 Original-Received: from [192.168.17.9] (cj.e-siemianowice.pl [95.215.234.30]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: jarekczek@poczta.onet.pl) by smtp.poczta.onet.pl (Onet) with ESMTPSA id 3d9byD2Hr9z9v5Q5 for ; Thu, 31 Oct 2013 20:22:11 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=poczta.onet.pl; s=2011; t=1383247332; bh=KwVWK+t7LodUnMKJ0iDUU9G3Rsw7A04jPRnoHepclIE=; h=Message-ID:Date:From:MIME-Version:To:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=i/5WaCuLLzxniPW8laYtlfK/RgL7bUjteN5ubk69RoTCL6wJC3JTWJSQawZakrnIP E9KcIbq4ehce1CuJpW4RvQcNLGW/RF8vmm1IXIWXuyx4bs5Zqu6DpqalicbPM0GqG0 h2yZNW7Yjqa1hXhC23teWzMuGDVKKn2xJxn8jwnY= User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120824 Thunderbird/15.0 In-Reply-To: <5272A824.3000300@poczta.onet.pl> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 213.180.142.142 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:164751 Archived-At: If there are ever any problems with dup2 here is my analyze: Emacs code never uses the feature of dup2, that it returns the descriptor. In most cases the return value is ignored. In emacs.c the return value is tested for < 0, which is compatible with both msvcrt and posix. So the test in m4/dup2.m4 whether dup2(1, 1) returns 1 is not needed and could be skipped. Other tests for dup2 are passed on mingw. Jarek