--- OLD/xc/programs/Xserver/os/utils.c Thu Jan 1 00:00:00 1970 +++ NEW/xc/programs/Xserver/os/utils.c Thu Jan 1 00:00:00 1970 @@ -51,6 +51,7 @@ #endif #include "Xos.h" #include +#include #include "misc.h" #include "X.h" #include "input.h" @@ -839,7 +840,6 @@ Xalloc (amount) unsigned long amount; { - char *malloc(); register pointer ptr; if ((long)amount <= 0) @@ -867,7 +867,6 @@ XNFalloc (amount) unsigned long amount; { - char *malloc(); register pointer ptr; if ((long)amount <= 0) @@ -909,9 +908,6 @@ register pointer ptr; unsigned long amount; { - char *malloc(); - char *realloc(); - #ifdef MEMBUG if (!Must_have_memory && Memory_fail && ((random() % MEM_FAIL_SCALE) < Memory_fail)) @@ -982,24 +978,20 @@ AuditPrefix(f) char *f; { -#ifdef X_NOT_STDC_ENV - long tm; -#else - time_t tm; -#endif - char *autime, *s; - if (*f != ' ') - { - time(&tm); - autime = ctime(&tm); - if (s = strchr(autime, '\n')) - *s = '\0'; - if (s = strrchr(argvGlobal[0], '/')) - s++; - else - s = argvGlobal[0]; - ErrorF("AUDIT: %s: %d %s: ", autime, getpid(), s); - } + time_t tt; + struct tm tmb; + struct tm *tm; + char buf[24]; + char *pn; + + if (*f != ' ') + { time(&tt); + tm = localtime_r(&tt,&tmb); + strftime(&buf[0],sizeof(buf),"%Y-%m-%d %H:%M:%S",tm); + pn = strrchr(argvGlobal[0],'/'); + if (pn) pn ++; else pn = argvGlobal[0]; + ErrorF("AUDIT: %s: %d %s: ", &buf[0], getpid(), pn); + } } /*VARARGS1*/