From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 85588 invoked by alias); 31 Dec 2019 13:26:29 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 85578 invoked by uid 89); 31 Dec 2019 13:26:29 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-4.0 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: albireo.enyo.de From: Florian Weimer To: Samuel Thibault Cc: libc-alpha@sourceware.org Subject: Re: posix_openpt vs getpt?? References: <20191230213550.icqt2er7dwnxcrrb@function> Date: Tue, 31 Dec 2019 13:26:00 -0000 In-Reply-To: <20191230213550.icqt2er7dwnxcrrb@function> (Samuel Thibault's message of "Mon, 30 Dec 2019 22:35:50 +0100") Message-ID: <87a778mxta.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2019-12/txt/msg00805.txt.bz2 * Samuel Thibault: > In sysdeps/unix/bsd/getpt.c we can read: > > /* We cannot define posix_openpt in general for BSD systems. */ > > I do not see why posix_openpt can't be defined like getpt is. Is there > a semantic difference between them beyond the open flags that could be > just passed to the open() call? Notably, Linux' getpt() is actually > implemented as __posix_openpt (O_RDWR)... We don't have an in-tree BSD port, and the BSD at the time was probably quite different from what we have today. I suggest to ignore the comment and rearrange things in the way that make the most sense for Linux and Hurd.