[or-cvs] work on versioning; new log_fn function

Nick Mathewson nickm at seul.org
Fri May 9 02:25:42 UTC 2003


Update of /home/or/cvsroot/src/common
In directory moria.mit.edu:/tmp/cvs-serv23089/src/common

Modified Files:
	fakepoll.h log.h 
Log Message:
work on versioning; new log_fn function

Index: fakepoll.h
===================================================================
RCS file: /home/or/cvsroot/src/common/fakepoll.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- fakepoll.h	3 Sep 2002 18:43:50 -0000	1.1
+++ fakepoll.h	9 May 2003 02:25:37 -0000	1.2
@@ -9,6 +9,9 @@
 /*
  * Changes :
  * $Log$
+ * Revision 1.2  2003/05/09 02:25:37  nickm
+ * work on versioning; new log_fn function
+ *
  * Revision 1.1  2002/09/03 18:43:50  nickm
  * Add function to fake a poll call using select
  *
@@ -17,7 +20,6 @@
 #define __FAKEPOLL_H
 
 #include "orconfig.h"
-#undef VERSION
 
 #ifndef HAVE_POLL_H
 #ifndef HAVE_SYS_POLL_H

Index: log.h
===================================================================
RCS file: /home/or/cvsroot/src/common/log.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- log.h	26 Jun 2002 22:45:50 -0000	1.1.1.1
+++ log.h	9 May 2003 02:25:37 -0000	1.2
@@ -8,6 +8,9 @@
 /*
  * Changes :
  * $Log$
+ * Revision 1.2  2003/05/09 02:25:37  nickm
+ * work on versioning; new log_fn function
+ *
  * Revision 1.1.1.1  2002/06/26 22:45:50  arma
  * initial commit: current code
  *
@@ -35,6 +38,13 @@
 
 /* Outputs a message to stdout and also logs the same message using syslog. */
 void log(int severity, const char *format, ...);
+
+#ifdef __GNUCC__
+#define log_fn(severity, format, args...) \
+  log((severity), __PRETTY_FUNCTION__ # "(): " # format, ##args)
+#else
+#define log_fn log
+#endif
 
 # define __LOG_H
 #endif



More information about the tor-commits mailing list