winpr-comm: made its current implementation verific specific to __linux__ since it was done on top of NTTY.

This commit is contained in:
Emmanuel Ledoux 2014-07-04 16:16:26 +02:00 committed by Emmanuel Ledoux
parent 9217de3bb1
commit 7bbeff3427
13 changed files with 24 additions and 37 deletions

View File

@ -30,19 +30,6 @@
#include <stdlib.h>
#include <string.h>
#ifdef HAVE_SYS_MODEM_H
#include <sys/modem.h>
#endif
#ifdef HAVE_SYS_FILIO_H
#include <sys/filio.h>
#endif
#ifdef HAVE_SYS_STRTIO_H
#include <sys/strtio.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <winpr/collections.h>
#include <winpr/comm.h>
#include <winpr/crt.h>

View File

@ -29,7 +29,7 @@
#include <winpr/wtypes.h>
#ifndef _WIN32
#ifdef __linux__
#define NOPARITY 0
#define ODDPARITY 1
@ -583,7 +583,7 @@ BOOL CommWriteFile(HANDLE hDevice, LPCVOID lpBuffer, DWORD nNumberOfBytesToWrite
}
#endif
#endif /* _WIN32 */
#endif /* __linux__ */
#endif /* WINPR_COMM_H */

View File

@ -24,7 +24,7 @@
#include "config.h"
#endif
#ifndef _WIN32
#ifdef __linux__
#include <assert.h>
#include <errno.h>
@ -1496,4 +1496,4 @@ BOOL CommCloseHandle(HANDLE handle)
}
#endif /* _WIN32 */
#endif /* __linux__ */

View File

@ -21,7 +21,7 @@
#ifndef WINPR_COMM_PRIVATE_H
#define WINPR_COMM_PRIVATE_H
#ifndef _WIN32
#ifdef __linux__
#include <linux/serial.h>
#include <sys/eventfd.h>
@ -92,6 +92,6 @@ void CommLog_Print(int wlog_level, char *fmt, ...);
BOOL CommIsHandled(HANDLE handle);
BOOL CommCloseHandle(HANDLE handle);
#endif /* _WIN32 */
#endif /* __linux__ */
#endif /* WINPR_COMM_PRIVATE_H */

View File

@ -21,7 +21,7 @@
#include "config.h"
#endif
#ifndef _WIN32
#ifdef __linux__
#include <assert.h>
#include <errno.h>
@ -547,4 +547,4 @@ BOOL CommWriteFile(HANDLE hDevice, LPCVOID lpBuffer, DWORD nNumberOfBytesToWrite
}
#endif /* _WIN32 */
#endif /* __linux__ */

View File

@ -24,7 +24,7 @@
#include "config.h"
#endif
#ifndef _WIN32
#ifdef __linux__
#include <assert.h>
@ -736,4 +736,4 @@ int _comm_ioctl_tcsetattr(int fd, int optional_actions, const struct termios *te
}
#endif /* _WIN32 */
#endif /* __linux__ */

View File

@ -22,7 +22,7 @@
#ifndef WINPR_COMM_IOCTL_H_
#define WINPR_COMM_IOCTL_H_
#ifndef _WIN32
#ifdef __linux__
#include <termios.h>
@ -239,6 +239,6 @@ int _comm_ioctl_tcsetattr(int fd, int optional_actions, const struct termios *te
}
#endif
#endif /* _WIN32 */
#endif /* __linux__ */
#endif /* WINPR_COMM_IOCTL_H_ */

View File

@ -20,7 +20,7 @@
* limitations under the License.
*/
#ifndef _WIN32
#ifdef __linux__
#include <winpr/wlog.h>
@ -204,4 +204,4 @@ SERIAL_DRIVER* SerCx2Sys_s()
return &_SerCx2Sys;
}
#endif /* _WIN32 */
#endif /* __linux__ */

View File

@ -20,7 +20,7 @@
#ifndef COMM_SERCX2_SYS_H
#define COMM_SERCX2_SYS_H
#ifndef _WIN32
#ifdef __linux__
#include "comm_ioctl.h"
@ -34,6 +34,6 @@ SERIAL_DRIVER* SerCx2Sys_s();
}
#endif
#endif /* _WIN32 */
#endif /* __linux__ */
#endif /* COMM_SERCX2_SYS_H */

View File

@ -20,7 +20,7 @@
* limitations under the License.
*/
#ifndef _WIN32
#ifdef __linux__
#include <assert.h>
#include <termios.h>
@ -452,4 +452,4 @@ SERIAL_DRIVER* SerCxSys_s()
return &_SerCxSys;
}
#endif /* _WIN32 */
#endif /* __linux__ */

View File

@ -20,7 +20,7 @@
#ifndef COMM_SERCX_SYS_H
#define COMM_SERCX_SYS_H
#ifndef _WIN32
#ifdef __linux__
#include "comm_ioctl.h"
@ -35,7 +35,7 @@ SERIAL_DRIVER* SerCxSys_s();
#endif
#endif /* _WIN32 */
#endif /* __linux__ */
#endif /* COMM_SERCX_SYS_H */

View File

@ -20,7 +20,7 @@
* limitations under the License.
*/
#ifndef _WIN32
#ifdef __linux__
#include <assert.h>
#include <errno.h>
@ -1545,4 +1545,4 @@ SERIAL_DRIVER* SerialSys_s()
return &_SerialSys;
}
#endif /* _WIN32 */
#endif /* __linux__ */

View File

@ -20,7 +20,7 @@
#ifndef COMM_SERIAL_SYS_H
#define COMM_SERIAL_SYS_H
#ifndef _WIN32
#ifdef __linux__
#include "comm_ioctl.h"
@ -35,6 +35,6 @@ SERIAL_DRIVER* SerialSys_s();
#endif
#endif /* _WIN32 */
#endif /* __linux__ */
#endif /* COMM_SERIAL_SYS_H */