stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject svn commit: r562580 - /incubator/stdcxx/trunk/util/util.cpp
Date Fri, 03 Aug 2007 21:07:06 GMT
Author: sebor
Date: Fri Aug  3 14:07:05 2007
New Revision: 562580

URL: http://svn.apache.org/viewvc?view=rev&rev=562580
Log:
2007-08-03  Martin Sebor  <sebor@roguewave.com>

	* util.cpp (DEV_NULL): Defined macro.
	(input_name): Used it.

Modified:
    incubator/stdcxx/trunk/util/util.cpp

Modified: incubator/stdcxx/trunk/util/util.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/util/util.cpp?view=diff&rev=562580&r1=562579&r2=562580
==============================================================================
--- incubator/stdcxx/trunk/util/util.cpp (original)
+++ incubator/stdcxx/trunk/util/util.cpp Fri Aug  3 14:07:05 2007
@@ -38,6 +38,14 @@
 
 #include "util.h"
 
+
+#ifdef _WIN32
+#  define DEV_NULL   "NUL:"
+#else
+#  define DEV_NULL   "/dev/null"
+#endif   // _WIN32
+
+
 void
 warn (const char* const format, ...)
 {
@@ -201,8 +209,8 @@
     }
 
     /* If we didn't find a source file, use /dev/null */
-    fname = (char*)RW_MALLOC (sizeof "/dev/null");
-    strcpy (fname, "/dev/null");
+    fname = (char*)RW_MALLOC (sizeof DEV_NULL);
+    strcpy (fname, DEV_NULL);
     return fname;
 }
 



Mime
View raw message