There is no reason to include headers in the main body of the source code.
Move it to the top so it's more readable.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
*/
#include <errno.h>
+#include <pthread.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <sys/time.h>
#include "githead.h"
#include "log.h"
#include "shl_misc.h"
* We need a global locking mechanism. Use pthread here.
*/
-#include <pthread.h>
-
static pthread_mutex_t log__mutex = PTHREAD_MUTEX_INITIALIZER;
static inline void log_lock()
* log-message.
*/
-#include <sys/time.h>
-
static struct timeval log__ftime;
static void log__time(long long *sec, long long *usec)