build on non-linux again
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@631 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
parent
1b6ced7cf4
commit
7becf22dce
10
parallel.c
10
parallel.c
@ -8,9 +8,12 @@
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <linux/lp.h>
|
||||
#include <errno.h>
|
||||
|
||||
#if defined(__linux__)
|
||||
#include <linux/lp.h>
|
||||
#endif
|
||||
|
||||
extern int errno;
|
||||
|
||||
extern RDPDR_DEVICE g_rdpdr_device[];
|
||||
@ -86,7 +89,10 @@ parallel_create(uint32 device_id, uint32 access, uint32 share_mode, uint32 dispo
|
||||
if (fcntl(parallel_fd, F_SETFL, O_NONBLOCK) == -1)
|
||||
perror("fcntl");
|
||||
|
||||
#if defined(LPABORT)
|
||||
/* Retry on errors */
|
||||
ioctl(parallel_fd, LPABORT, (int) 1);
|
||||
#endif
|
||||
|
||||
g_rdpdr_device[device_id].handle = parallel_fd;
|
||||
|
||||
@ -134,11 +140,13 @@ parallel_write(HANDLE handle, uint8 * data, uint32 length, uint32 offset, uint32
|
||||
default:
|
||||
rc = STATUS_DEVICE_POWERED_OFF;
|
||||
}
|
||||
#if defined(LPGETSTATUS)
|
||||
if (ioctl(handle, LPGETSTATUS, &status) == 0)
|
||||
{
|
||||
/* coming soon: take care for the printer status */
|
||||
printf("parallel_write: status = %d, errno = %d\n", status, errno);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
*result = n;
|
||||
return rc;
|
||||
|
Loading…
Reference in New Issue
Block a user