diff options
Diffstat (limited to 'src/debug.c')
-rw-r--r-- | src/debug.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/debug.c b/src/debug.c index 754c8e11..34c5d18f 100644 --- a/src/debug.c +++ b/src/debug.c @@ -33,9 +33,13 @@ #include <errno.h> #include <time.h> #ifndef HAVE_DOSISH_SYSTEM +# ifdef HAVE_SYS_TYPES_H # include <sys/types.h> +# endif +# ifdef HAVE_SYS_STAT_H # include <sys/stat.h> -# include <fcntl.h> +# endif +# include <fcntl.h> #endif #include <assert.h> @@ -205,6 +209,15 @@ _gpgme_debug (int level, const char *format, ...) va_start (arg_ptr, format); LOCK (debug_lock); { +#ifdef HAVE_W32CE_SYSTEM + SYSTEMTIME t; + + GetLocalTime (&t); + fprintf (errfp, "GPGME %04d-%02d-%02d %02d:%02d:%02d <0x%04llx> ", + t.wYear, t.wMonth, t.wDay, + t.wHour, t.wMinute, t.wSecond, + (unsigned long long) ath_self ()); +#else struct tm *tp; time_t atime = time (NULL); @@ -213,6 +226,7 @@ _gpgme_debug (int level, const char *format, ...) 1900+tp->tm_year, tp->tm_mon+1, tp->tm_mday, tp->tm_hour, tp->tm_min, tp->tm_sec, (unsigned long long) ath_self ()); +#endif } #ifdef FRAME_NR { |