wok diff xorg-server-tinyX/stuff/xorg-server-tinyX-1.5.3-boottimestamp.u @ rev 3351

Add: PolicyKit, version series 0_x
author Matthew Sheets <rcx@zoominternet.net>
date Thu Jun 11 11:19:20 2009 +0000 (2009-06-11)
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/xorg-server-tinyX/stuff/xorg-server-tinyX-1.5.3-boottimestamp.u	Thu Jun 11 11:19:20 2009 +0000
     1.3 @@ -0,0 +1,38 @@
     1.4 +diff --git xorg-server-1.5.3/os/log.c xorg-server-1.5.3/os/log.c
     1.5 +index 0860847..2c46f1a 100644
     1.6 +--- xorg-server-1.5.3/os/log.c
     1.7 ++++ xorg-server-1.5.3/os/log.c
     1.8 +@@ -255,6 +255,33 @@ LogVWrite(int verb, const char *f, va_list args)
     1.9 +     static char tmpBuffer[1024];
    1.10 +     int len = 0;
    1.11 + 
    1.12 ++    struct timeval time;
    1.13 ++    time_t tv_sec;
    1.14 ++    suseconds_t tv_usec;
    1.15 ++    static Bool first = TRUE;
    1.16 ++    static time_t start_tv_sec;
    1.17 ++    static suseconds_t start_usec;
    1.18 ++    int diff_sec, diff_usec;
    1.19 ++
    1.20 ++    gettimeofday(&time, NULL);
    1.21 ++    tv_sec = time.tv_sec;
    1.22 ++    tv_usec = time.tv_usec;
    1.23 ++    if (first == TRUE) {
    1.24 ++        start_tv_sec = tv_sec;
    1.25 ++        start_usec = tv_usec;
    1.26 ++        first = FALSE;
    1.27 ++    }
    1.28 ++    diff_sec = (int)difftime(tv_sec, start_tv_sec);
    1.29 ++    diff_usec = (tv_usec - start_usec);
    1.30 ++    if (diff_usec < 0) {
    1.31 ++        diff_sec--;
    1.32 ++        diff_usec += 1000000;
    1.33 ++    }
    1.34 ++    sprintf(tmpBuffer, "[%d sec: %06d usec]", diff_sec , diff_usec);
    1.35 ++    len = strlen(tmpBuffer);
    1.36 ++    if (logFile)
    1.37 ++          fwrite(tmpBuffer, len, 1, logFile);
    1.38 ++
    1.39 +     /*
    1.40 +      * Since a va_list can only be processed once, write the string to a
    1.41 +      * buffer, and then write the buffer out to the appropriate output