Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Jun 2008 23:32:04 GMT
From:      Rui Paulo <rpaulo@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 143793 for review
Message-ID:  <200806192332.m5JNW4W4089699@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=143793

Change 143793 by rpaulo@rpaulo_epsilon on 2008/06/19 23:31:54

	Add more robust debugging macro.

Affected files ...

.. //depot/projects/soc2008/rpaulo-tcpad/debug.h#3 edit

Differences ...

==== //depot/projects/soc2008/rpaulo-tcpad/debug.h#3 (text+ko) ====

@@ -23,14 +23,17 @@
  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  *
- * $P4: //depot/projects/soc2008/rpaulo-tcpad/debug.h#2 $
+ * $P4: //depot/projects/soc2008/rpaulo-tcpad/debug.h#3 $
  */
 
 #ifndef _DEBUG_H_
 #define _DEBUG_H_
 
 #ifdef DEBUG
-#define DPRINTF	printf
+#define DPRINTF(...) do {			\
+	fprintf(stderr, "%s: ", __func__);	\
+	fprintf(stderr, __VA_ARGS__);		\
+} while (0)
 #else
 #define DPRINTF
 #endif



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200806192332.m5JNW4W4089699>