X-Spam-Check-By: sourceware.org Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Subject: posix_openpt Date: Tue, 21 Feb 2006 18:22:06 -0800 Message-ID: From: "Elliott Hughes" To: Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm 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 Note-from-DJ: This may be spam Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by delorie.com id k1M2MG3w023713 Cygwin doesn't seem to have POSIX's unfortunately-named "posix_openpt" function in its stdlib.h. The function's documented here: http://www.opengroup.org/onlinepubs/000095399/functions/posix_openpt.html I'm currently successfully using the implementation below in my application, but wondered if there was any interest in adding it to Cygwin itself? #ifdef __CYGWIN__ // Cygwin doesn't currently have posix_openpt(3). int posix_openpt(int oflag) { return open("/dev/ptmx", oflag); } #endif (Given the simplicity of the implementation, you might be wondering why anyone would care about this trivial little function, other than a standards pedant? The answer is that although that implementation suffices on Cygwin and Linux, OSes such as Darwin require a complicated trawl through /dev looking for suitable candidates.) -- Elliott Hughes, BlueArc Engineering