diff options
author | Brad King <brad.king@kitware.com> | 2005-05-05 13:08:05 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2005-05-05 13:08:05 (GMT) |
commit | 69cf728623ce787c1059f4eedc82571b6e809f88 (patch) | |
tree | 0607dee468a01b17e711c88f546ce9de86592aef /Source/kwsys | |
parent | 3336b74c01123f7ef190e6d24abc9a569b203754 (diff) | |
download | CMake-69cf728623ce787c1059f4eedc82571b6e809f88.zip CMake-69cf728623ce787c1059f4eedc82571b6e809f88.tar.gz CMake-69cf728623ce787c1059f4eedc82571b6e809f88.tar.bz2 |
COMP: Added work-around to avoid warnings about unreferenced inline functions from SGI termios.
Diffstat (limited to 'Source/kwsys')
-rw-r--r-- | Source/kwsys/SystemTools.cxx | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx index ebb26dc..0383661 100644 --- a/Source/kwsys/SystemTools.cxx +++ b/Source/kwsys/SystemTools.cxx @@ -58,6 +58,27 @@ #include <termios.h> #endif +// This is a hack to prevent warnings about these functions being +// declared but not referenced. +#if defined(__sgi) && !defined(__GNUC__) +# include <sys/termios.h> +namespace KWSYS_NAMESPACE +{ +class SystemToolsHack +{ +public: + enum + { + Ref1 = sizeof(cfgetospeed(0)), + Ref2 = sizeof(cfgetispeed(0)), + Ref3 = sizeof(tcgetattr(0, 0)), + Ref4 = sizeof(tcsetattr(0, 0, 0)), + Ref5 = sizeof(cfsetospeed(0,0)), + Ref6 = sizeof(cfsetispeed(0,0)) + }; +}; +} +#endif #if defined(_WIN32) && (defined(_MSC_VER) || defined(__BORLANDC__) || defined(__MINGW32__)) #include <io.h> |