HP3000-L Archives

August 2002, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Mark Bixby <[log in to unmask]>
Reply To:
Mark Bixby <[log in to unmask]>
Date:
Thu, 8 Aug 2002 09:42:21 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (24 lines)
Peter Smithson wrote:

>         short filenum = fileno(stdin);

...snip...

>         FDEVICECONTROL(filenum, &buffer, bufferlen, controlcode,

POSIX file descriptors are not the same as MPE file numbers.  From
/usr/include/fcntl.h:

#define _MPE_FILENO(fd)   (((fd)>2 && (fd)<10) ? (fd)+1014 : (fd))
    /* POSIX file number to MPE file number */
#define _POSIX_FILENO(fn) (((fn)>1013 && (fn)<1024) ? (fn)-1014 : (fn))
    /* MPE file number to POSIX file number */

You need to compile with -D_POSIX_SOURCE or -D_SOCKET_SOURCE to get those defines.
--
[log in to unmask]
Remainder of .sig suppressed to conserve expensive California electrons...

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2