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 *