PERFORCE change 143793 for review
Rui Paulo
rpaulo at FreeBSD.org
Thu Jun 19 23:32:05 UTC 2008
http://perforce.freebsd.org/chv.cgi?CH=143793
Change 143793 by rpaulo at 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
More information about the p4-projects
mailing list