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:
parent
5bcbbfb09c
commit
9d04c09f10
@ -34,6 +34,8 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if defined(_WIN32)
|
||||||
|
|
||||||
#ifndef SERIAL_IMPL_WINDOWS_H
|
#ifndef SERIAL_IMPL_WINDOWS_H
|
||||||
#define SERIAL_IMPL_WINDOWS_H
|
#define SERIAL_IMPL_WINDOWS_H
|
||||||
|
|
||||||
@ -195,3 +197,5 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endif // SERIAL_IMPL_WINDOWS_H
|
#endif // SERIAL_IMPL_WINDOWS_H
|
||||||
|
|
||||||
|
#endif // if defined(_WIN32)
|
||||||
|
|||||||
@ -1,5 +1,7 @@
|
|||||||
/* Copyright 2012 William Woodall and John Harrison */
|
/* Copyright 2012 William Woodall and John Harrison */
|
||||||
|
|
||||||
|
#if !defined(_WIN32)
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
@ -910,3 +912,5 @@ Serial::SerialImpl::writeUnlock ()
|
|||||||
THROW (IOException, result);
|
THROW (IOException, result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // !defined(_WIN32)
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
#if defined(_WIN32)
|
||||||
|
|
||||||
/* Copyright 2012 William Woodall and John Harrison */
|
/* Copyright 2012 William Woodall and John Harrison */
|
||||||
|
|
||||||
#include "serial/impl/win.h"
|
#include "serial/impl/win.h"
|
||||||
@ -594,3 +596,6 @@ Serial::SerialImpl::writeUnlock()
|
|||||||
THROW (IOException, "Error releasing write mutex.");
|
THROW (IOException, "Error releasing write mutex.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // #if defined(_WIN32)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user