diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2001-11-20 13:28:54 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2001-11-20 13:28:54 (GMT) |
commit | 572e5146f8a88894c86c4652add4d4134779ff60 (patch) | |
tree | 5d6a5a4042a7e1432fcc52c6ddf88ee94e369b23 /Source | |
parent | da17f30cb515775000ec7dd1d3fab8b3621c2587 (diff) | |
download | CMake-572e5146f8a88894c86c4652add4d4134779ff60.zip CMake-572e5146f8a88894c86c4652add4d4134779ff60.tar.gz CMake-572e5146f8a88894c86c4652add4d4134779ff60.tar.bz2 |
define hacks and such for the dec compiler
Diffstat (limited to 'Source')
-rw-r--r-- | Source/CursesDialog/cmCursesMainForm.cxx | 8 | ||||
-rw-r--r-- | Source/CursesDialog/cmCursesStandardIncludes.h | 15 | ||||
-rw-r--r-- | Source/cmStandardIncludes.h | 12 |
3 files changed, 28 insertions, 7 deletions
diff --git a/Source/CursesDialog/cmCursesMainForm.cxx b/Source/CursesDialog/cmCursesMainForm.cxx index 6b700cc..e0ed962 100644 --- a/Source/CursesDialog/cmCursesMainForm.cxx +++ b/Source/CursesDialog/cmCursesMainForm.cxx @@ -241,9 +241,9 @@ void cmCursesMainForm::PrintKeys() sprintf(firstLine, "C)onfigure G)enerate and Exit"); sprintf(secondLine, "Q)uit H)elp"); - move(y-2,0); + curses_move(y-2,0); printw(firstLine); - move(y-1,0); + curses_move(y-1,0); printw(secondLine); pos_form_cursor(m_Form); @@ -258,7 +258,7 @@ void cmCursesMainForm::UpdateStatusBar() if ( x < cmCursesMainForm::MIN_WIDTH || y < cmCursesMainForm::MIN_HEIGHT ) { - move(0,0); + curses_move(0,0); printw("Window is too small. A size of at least %dx%d is required.", cmCursesMainForm::MIN_WIDTH, cmCursesMainForm::MIN_HEIGHT); touchwin(m_Window); @@ -310,7 +310,7 @@ void cmCursesMainForm::UpdateStatusBar() bar[cmCursesMainForm::MAX_WIDTH-1] = '\0'; } - move(y-3,0); + curses_move(y-3,0); attron(A_STANDOUT); printw(bar); attroff(A_STANDOUT); diff --git a/Source/CursesDialog/cmCursesStandardIncludes.h b/Source/CursesDialog/cmCursesStandardIncludes.h index b932d16..d993a60 100644 --- a/Source/CursesDialog/cmCursesStandardIncludes.h +++ b/Source/CursesDialog/cmCursesStandardIncludes.h @@ -1,3 +1,5 @@ +#ifndef cmCursesStandardIncludes_h +#define cmCursesStandardIncludes_h #if defined(__sun__) && defined(__GNUC__) #define _MSE_INT_H #endif @@ -19,3 +21,16 @@ #endif +// on some machines move erase and clear conflict with stl +// so remove them from the namespace +inline void curses_move(unsigned int x, unsigned int y) +{ + move(x,y); +} + +#undef move +#undef erase +#undef clear + + +#endif // cmCursesStandardIncludes_h diff --git a/Source/cmStandardIncludes.h b/Source/cmStandardIncludes.h index 0b0852a..bf4d8a1 100644 --- a/Source/cmStandardIncludes.h +++ b/Source/cmStandardIncludes.h @@ -102,12 +102,18 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # if (_COMPILER_VERSION >= 730) # define CM_SGI_CC_730 # elif (_COMPILER_VERSION >= 720) -# define CM_SGI_CC_720 +# define CM_HAS_STD_BUT_NOT_FOR_IOSTREAM # endif #endif -# ifdef CM_SGI_CC_720 -// the 720 sgi compiler has std:: but not for the stream library, +#ifdef __DECCXX_VER +# if __DECCXX_VER <= 60390002 +# define CM_HAS_STD_BUT_NOT_FOR_IOSTREAM +# endif +#endif + +#ifdef CM_HAS_STD_BUT_NOT_FOR_IOSTREAM +// some compilers have std:: but not for the stream library, // so we have to bring it into the std namespace by hand. namespace std { using ::ostream; |