瀏覽代碼

libgis: add cross-platform newline character

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@67275 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 9 年之前
父節點
當前提交
4dfad243d8
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      include/gis.h

+ 6 - 0
include/gis.h

@@ -59,7 +59,13 @@ static const char *GRASS_copyright __attribute__ ((unused))
 #define PRI_OFF_T	"ld"
 #endif
 
+/*! \brief Cross-platform Newline Character */
 #define NEWLINE     '\n'
+#ifdef __MINGW32__
+#  define HOST_NEWLINE "\r\n"
+#else
+#  define HOST_NEWLINE "\n"
+#endif
 
 /*!
   \brief List of units