[GRASS-SVN] r55519 - grass/trunk/include/defs
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Mar 26 02:03:13 PDT 2013
Author: mmetz
Date: 2013-03-26 02:03:11 -0700 (Tue, 26 Mar 2013)
New Revision: 55519
Modified:
grass/trunk/include/defs/gis.h
Log:
gis.h: fix for BSD
Modified: grass/trunk/include/defs/gis.h
===================================================================
--- grass/trunk/include/defs/gis.h 2013-03-25 19:53:42 UTC (rev 55518)
+++ grass/trunk/include/defs/gis.h 2013-03-26 09:03:11 UTC (rev 55519)
@@ -37,7 +37,19 @@
# ifdef __MINGW32__
# include <malloc.h>
# else
-# include <alloca.h>
+# if (defined(__unix__) || defined(unix)) && !defined(USG)
+# include <sys/param.h>
+# endif
+# if (defined(BSD))
+ /* no malloc.h, no alloca.h ?
+ * TODO: better
+ * check if alloca.h exists,
+ * if not, check if malloc.h exists,
+ * if not use stdlib.h */
+# include <stdlib.h>
+# else
+# include <alloca.h>
+# endif
# endif
# define G__alloca(n) alloca(n)
# define G__freea(p)
More information about the grass-commit
mailing list