浏览代码

Trying to fix build problems related to curses.

Berk Geveci 24 年之前
父节点
当前提交
a3f6e2f9c4
共有 1 个文件被更改,包括 16 次插入3 次删除
  1. 16 3
      Source/CursesDialog/cmCursesStandardIncludes.h

+ 16 - 3
Source/CursesDialog/cmCursesStandardIncludes.h

@@ -1,7 +1,20 @@
 #ifdef __hpux
- #define _XOPEN_SOURCE_EXTENDED
  #define _BOOL_DEFINED
+ #ifndef _XOPEN_SOURCE_EXTENDED
+  #include <sys/time.h>
+  #define _XOPEN_SOURCE_EXTENDED
+  #include <curses.h>
+  #include <form.h>
+  #undef _XOPEN_SOURCE_EXTENDED
+ #else
+  #include <curses.h>
+  #include <form.h>
+ #endif  
+#else  /* __hpux */
+ #include <curses.h>
+ #include <form.h>
 #endif /* __hpux */
 
-#include <curses.h>
-#include <form.h>
+#ifndef getmaxyx
+ #define getmaxyx(w,y,x) ((y) = getmaxy(w), (x) = getmaxx(w))
+#endif