浏览代码

ERR: Added forward declarations of system functions for como compiler.

Brad King 22 年之前
父节点
当前提交
0c641ebc32
共有 1 个文件被更改,包括 12 次插入0 次删除
  1. 12 0
      Source/kwsys/SystemTools.cxx

+ 12 - 0
Source/kwsys/SystemTools.cxx

@@ -77,6 +77,18 @@ inline int Chdir(const char* dir)
 }
 #endif
 
+#if !defined(_WIN32) && defined(__COMO__)
+// Hack for como strict mode to avoid defining _SVID_SOURCE or _BSD_SOURCE.
+extern "C"
+{
+extern FILE *popen (__const char *__command, __const char *__modes) __THROW;
+extern int pclose (FILE *__stream) __THROW;
+extern char *realpath (__const char *__restrict __name,
+                       char *__restrict __resolved) __THROW;
+extern char *strdup (__const char *__s) __THROW;
+extern int putenv (char *__string) __THROW;
+}
+#endif
 
 /* Implement floattime() for various platforms */
 // Taken from Python 2.1.3