Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com Message-ID: <389D9A79.91C096E2@handshake.de> Date: Sun, 06 Feb 2000 14:59:53 +0000 From: Daniel Kroening X-Mailer: Mozilla 4.7 [de] (Win98; U) X-Accept-Language: de MIME-Version: 1.0 To: cygwin AT sourceware DOT cygnus DOT com Subject: DCD on serial ports, was: ioctl() function Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hello, I know it´s an old mail, but I have the very same problem. I need a function call which allows to detect if DCD on a serial port is active. Linux offers the TIOCMGET and TIOCM_CAR extention to ioctl(). Anyone with a solution? > I was trying to port some unix code and it uses ioctl() for serial comms. > sys/ioctl.h was either missing or blank - I can't remember. > I added some #defs from linux. > and now the code appears to read and write to/from the port. > The code I have checks if DCD is active to see if a call is being made to a > modem. > But this is where things don't work. > > ioctl(portfd, TIOCMGET, &stat) returns -1 > so it never detects carrier. where can I get correct values for ioctl.h or > should I be using a different call under NT?? > (NT4, sp3, 64MB) Daniel Kröning -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com