[GRASS-dev] Re: testing native winGRASS

Paul Kelly paul-grass at stjohnspoint.co.uk
Tue Mar 20 05:23:55 EDT 2007


On Tue, 20 Mar 2007, Moritz Lennert wrote:

> Glynn Clements wrote:
>> Wolf Bergenheim wrote:
>> 
>>>> Any reasons why it can't be a macro instead?
>>> Yeah a macro would probably be much better
>> 
>> Agreed.
>> 
>>> #ifdef __MINGW32__
>>> #define G_DEV_NULL "NUL:"
>>> #else
>>> #define G_DEV_NULL "/dev/null"
>>> #endif
>>> 
>>> should do the trick, and then replace all "/dev/null" strings with
>>> GRASS_DEV_NULL
>> 
>> Or even G_DEV_NULL ;)
>> 
>
> Ok, so where should this go ? include/gis.h ?

Suggested:
Index: gis.h
===================================================================
RCS file: /home/grass/grassrepository/grass6/include/gis.h,v
retrieving revision 1.42
diff -u -r1.42 gis.h
--- gis.h       6 Mar 2007 01:34:47 -0000       1.42
+++ gis.h       20 Mar 2007 09:22:55 -0000
@@ -145,8 +145,10 @@
  #define GRASS_DIRSEP '/'
  #ifdef __MINGW32__
  #  define HOST_DIRSEP '\\'
+#  define G_DEV_NULL 'NUL:'
  #else
  #  define HOST_DIRSEP '/'
+#  define G_DEV_NULL '/dev/null'
  #endif





More information about the grass-dev mailing list