On Mon, Nov 27, 2006 at 11:46:02AM -0300, Mart??n Ferrari wrote:
> I have a problem with this, gcc says
> pty_dev.c:45: warning: implicit declaration of function 'getpt'
> 
> The manpage of getpt says it is a GNU extension, so maybe it gets
> undefined with _XOPEN_SOURCE, but I don't quite understand the
> semantics of those #defines.. Can you help me solving this cleanly?

hrm... well you could try using ptsname_r instead of ptsname - this
requires defining _GNU_SOURCE instead of _XOPEN_SOURCE. See the
ptsname manpage.

Another option is to call open("/dev/ptmx",O_RDWR|O_NOCTTY) instead of
getpt(), as per the manpage. It reduces portability, but will work for
Linux.

-- 
dann frazier | HP Open Source and Linux Organization


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to