aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/include/sys
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2001-02-26 09:50:24 +0000
committerCorinna Vinschen <corinna@vinschen.de>2001-02-26 09:50:24 +0000
commit88429768bb3cc21d871e912cde3efaf92eec8213 (patch)
tree4de90a5d28b9f8085313c98567486bb40a93090c /winsup/cygwin/include/sys
parent6626ebfef761d9a6bcfe1894fe2459251ad436a6 (diff)
downloadnewlib-88429768bb3cc21d871e912cde3efaf92eec8213.zip
newlib-88429768bb3cc21d871e912cde3efaf92eec8213.tar.gz
newlib-88429768bb3cc21d871e912cde3efaf92eec8213.tar.bz2
* strace.cc (strace::vprntf): Move prntf functionality to this function
adding an va_list interface to strace. (strace::printf): Calls strace::vprntf now. (strace_printf): New function providing an extern "C" interface to trace output. * include/sys/strace.h: Make plain C clean. (class strace): Add `vprntf' method.
Diffstat (limited to 'winsup/cygwin/include/sys')
-rw-r--r--winsup/cygwin/include/sys/strace.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/winsup/cygwin/include/sys/strace.h b/winsup/cygwin/include/sys/strace.h
index 37e9758..66f2c2c 100644
--- a/winsup/cygwin/include/sys/strace.h
+++ b/winsup/cygwin/include/sys/strace.h
@@ -21,6 +21,8 @@
#include <stdarg.h>
+#ifdef __cplusplus
+
class strace
{
int vsprntf (char *buf, const char *func, const char *infmt, va_list ap);
@@ -33,11 +35,14 @@ public:
int execing;
strace() : version(1) {}
void prntf (unsigned, const char *func, const char *, ...);
+ void vprntf (unsigned, const char *func, const char *, va_list ap);
void wm (int message, int word, int lon);
};
extern strace strace;
+#endif /* __cplusplus */
+
#define _STRACE_INTERFACE_ACTIVATE_ADDR -1
#define _STRACE_INTERFACE_ACTIVATE_ADDR1 -2
@@ -63,7 +68,18 @@ extern strace strace;
#define _STRACE_THREAD 0x40000 // thread-locking calls
#define _STRACE_NOTALL 0x80000 // don't include if _STRACE_ALL
-extern "C" void small_printf (const char *, ...);
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void small_printf (const char *, ...);
+void strace_printf (unsigned, const char *func, const char *, ...);
+
+#ifdef __cplusplus
+}
+#endif
+
+#ifdef __cplusplus
#ifdef NOSTRACE
#define define_strace(c, f)
@@ -120,4 +136,5 @@ extern "C" void small_printf (const char *, ...);
#define thread_printf(fmt, args...) strace_printf_wrap1(THREAD, fmt , ## args)
#endif /*NEW_MACRO_VARARGS*/
#endif /*NOSTRACE*/
+#endif /* __cplusplus */
#endif /* _SYS_STRACE_H */