1
0
mirror of https://github.com/wjwwood/serial.git synced 2026-01-22 19:54:57 +08:00

Code guards for platform-specific implementations.

(when not using cmake / catkin)
This commit is contained in:
Christopher Baker 2013-10-27 18:49:07 -05:00
parent 5bcbbfb09c
commit 9d04c09f10
3 changed files with 13 additions and 0 deletions

View File

@ -34,6 +34,8 @@
*
*/
#if defined(_WIN32)
#ifndef SERIAL_IMPL_WINDOWS_H
#define SERIAL_IMPL_WINDOWS_H
@ -195,3 +197,5 @@ private:
}
#endif // SERIAL_IMPL_WINDOWS_H
#endif // if defined(_WIN32)

View File

@ -1,5 +1,7 @@
/* Copyright 2012 William Woodall and John Harrison */
#if !defined(_WIN32)
#include <stdio.h>
#include <string.h>
#include <sstream>
@ -910,3 +912,5 @@ Serial::SerialImpl::writeUnlock ()
THROW (IOException, result);
}
}
#endif // !defined(_WIN32)

View File

@ -1,3 +1,5 @@
#if defined(_WIN32)
/* Copyright 2012 William Woodall and John Harrison */
#include "serial/impl/win.h"
@ -594,3 +596,6 @@ Serial::SerialImpl::writeUnlock()
THROW (IOException, "Error releasing write mutex.");
}
}
#endif // #if defined(_WIN32)