X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=lib%2Flib.h;h=a0f6788a58661d30bdf7d020dc78064cc1d5f325;hb=be8d99292164b5708998ce8d46424574fc866f80;hp=ddd03121077fe5e57a969438fb401db794efcef6;hpb=a372c96ccaa1c49942947b6a13b2b915a4318f19;p=libucw.git diff --git a/lib/lib.h b/lib/lib.h index ddd03121..a0f6788a 100644 --- a/lib/lib.h +++ b/lib/lib.h @@ -1,7 +1,7 @@ /* * The UCW Library -- Miscellaneous Functions * - * (c) 1997--2005 Martin Mares + * (c) 1997--2006 Martin Mares * (c) 2005 Tomas Valla * * This software may be freely distributed and used according to the terms @@ -16,7 +16,9 @@ /* Tell libc we're going to use all extensions available */ +#ifndef _GNU_SOURCE #define _GNU_SOURCE +#endif /* Ugly structure handling macros */ @@ -77,8 +79,9 @@ extern char *log_title; /* NULL - print no title, default is log_progname */ extern char *log_filename; /* Expanded name of the current log file */ -extern int log_switch_nest; /* log_switch() nesting counter, increment to disable automatic switches */ +extern volatile int log_switch_nest; /* log_switch() nesting counter, increment to disable automatic switches */ extern int log_pid; /* 0 if shouldn't be logged */ +extern int log_precise_timings; /* Include microsecond timestamps in log messages */ extern void (*log_die_hook)(void); struct tm; extern void (*log_switch_hook)(struct tm *tm); @@ -137,7 +140,7 @@ static inline void log_switch_enable(void) { ASSERT(log_switch_nest); log_switch */ void *xmalloc(unsigned); void *xrealloc(void *, unsigned); -#define sh_xfree(x) free(x) +void xfree(void *); #endif void *xmalloc_zero(unsigned);