CVS: rdesktop disk.c,1.41,1.42 serial.c,1.25,1.26

Jeroen Meijer <[email protected]>
Newsgroups gmane.network.rdesktop.cvs
Message-ID <[email protected]>
Update of /cvsroot/rdesktop/rdesktop
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11568

Modified Files:
	disk.c serial.c 
Log Message:
fix compilation on cygwin

Index: disk.c
===================================================================
RCS file: /cvsroot/rdesktop/rdesktop/disk.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -C2 -d -r1.41 -r1.42
*** disk.c	23 Dec 2004 20:43:47 -0000	1.41
--- disk.c	14 Feb 2005 00:34:23 -0000	1.42
***************
*** 19,22 ****
--- 19,23 ----
  */
  
+ #include "rdesktop.h"
  #include "disk.h"
  
***************
*** 68,72 ****
  
  #elif (defined(__alpha) && !defined(linux))
! #include <sys/mount.h>                /* osf1 statfs */
  #define STATFS_FN(path, buf) (statfs(path,buf,sizeof(buf)))
  #define STATFS_T statfs
--- 69,73 ----
  
  #elif (defined(__alpha) && !defined(linux))
! #include <sys/mount.h>		/* osf1 statfs */
  #define STATFS_FN(path, buf) (statfs(path,buf,sizeof(buf)))
  #define STATFS_T statfs
***************
*** 83,88 ****
  #endif
  
- #include "rdesktop.h"
- 
  extern RDPDR_DEVICE g_rdpdr_device[];
  
--- 84,87 ----

Index: serial.c
===================================================================
RCS file: /cvsroot/rdesktop/rdesktop/serial.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** serial.c	10 Jan 2005 21:54:47 -0000	1.25
--- serial.c	14 Feb 2005 00:34:23 -0000	1.26
***************
*** 122,129 ****
  /* FIONREAD should really do the same thing as TIOCINQ, where it is
   * not available */
! #ifndef TIOCINQ
  #define TIOCINQ FIONREAD
  #endif
! #ifndef TIOCOUTQ
  #define TIOCOUTQ FIONWRITE
  #endif
--- 122,129 ----
  /* FIONREAD should really do the same thing as TIOCINQ, where it is
   * not available */
! #if !defined(TIOCINQ) && defined(FIONREAD)
  #define TIOCINQ FIONREAD
  #endif
! #if !defined(TIOCOUTQ) && defined(FIONWRITE)
  #define TIOCOUTQ FIONWRITE
  #endif
***************
*** 647,651 ****
  	tcsetattr(handle, TCSANOW, ptermios);
  
! #ifdef WITH_DEBUG_SERIAL
  	ioctl(handle, TIOCINQ, &bytes_inqueue);
  	DEBUG_SERIAL(("serial_read inqueue: %d expected %d\n", bytes_inqueue, length));
--- 647,651 ----
  	tcsetattr(handle, TCSANOW, ptermios);
  
! #if defined(WITH_DEBUG_SERIAL) && defined(TIOCINQ)
  	ioctl(handle, TIOCINQ, &bytes_inqueue);
  	DEBUG_SERIAL(("serial_read inqueue: %d expected %d\n", bytes_inqueue, length));
***************
*** 795,799 ****
  		case SERIAL_GET_WAIT_MASK:
  			DEBUG_SERIAL(("serial_ioctl -> SERIAL_GET_WAIT_MASK %X\n",
! 				      pser_inf->wait_mask); out_uint32(out, pser_inf->wait_mask));
  			break;
  		case SERIAL_SET_WAIT_MASK:
--- 795,800 ----
  		case SERIAL_GET_WAIT_MASK:
  			DEBUG_SERIAL(("serial_ioctl -> SERIAL_GET_WAIT_MASK %X\n",
! 				      pser_inf->wait_mask);
! 				     out_uint32(out, pser_inf->wait_mask));
  			break;
  		case SERIAL_SET_WAIT_MASK:
***************
*** 855,859 ****
--- 856,862 ----
  
  			result = 0;
+ #ifdef TIOCINQ
  			ioctl(handle, TIOCINQ, &result);
+ #endif
  			out_uint32_le(out, result);	/* Amount in in queue */
  			if (result)
***************
*** 862,866 ****
--- 865,871 ----
  
  			result = 0;
+ #ifdef TIOCOUTQ
  			ioctl(handle, TIOCOUTQ, &result);
+ #endif
  			out_uint32_le(out, result);	/* Amount in out queue */
  			if (result)
***************
*** 935,941 ****
  		return False;
  
  	pser_inf = (SERIAL_DEVICE *) g_rdpdr_device[index].pdevice_data;
  
- 
  	ioctl(handle, TIOCINQ, &bytes);
  
--- 940,946 ----
  		return False;
  
+ #ifdef TIOCINQ
  	pser_inf = (SERIAL_DEVICE *) g_rdpdr_device[index].pdevice_data;
  
  	ioctl(handle, TIOCINQ, &bytes);
  
***************
*** 973,978 ****
  		pser_inf->event_rlsd = 0;
  	}
  
! 
  	ioctl(handle, TIOCOUTQ, &bytes);
  	if ((bytes == 0)
--- 978,984 ----
  		pser_inf->event_rlsd = 0;
  	}
+ #endif
  
! #ifdef TIOCOUTQ
  	ioctl(handle, TIOCOUTQ, &bytes);
  	if ((bytes == 0)
***************
*** 985,989 ****
  	}
  	pser_inf->event_txempty = bytes;
! 
  
  	ioctl(handle, TIOCMGET, &bytes);
--- 991,995 ----
  	}
  	pser_inf->event_txempty = bytes;
! #endif
  
  	ioctl(handle, TIOCMGET, &bytes);



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.