#if USE_LINKER_SECTIONS
#define VLOG_DEFINE_MODULE(MODULE) \
VLOG_DEFINE_MODULE__(MODULE) \
+ extern struct vlog_module *vlog_module_ptr_##MODULE; \
struct vlog_module *vlog_module_ptr_##MODULE \
__attribute__((section("vlog_modules"))) = &VLM_##MODULE
#else
unsigned int tokens; /* Current number of tokens. */
time_t last_fill; /* Last time tokens added. */
time_t first_dropped; /* Time first message was dropped. */
+ time_t last_dropped; /* Time of most recent message drop. */
unsigned int n_dropped; /* Number of messages dropped. */
};
0, /* tokens */ \
0, /* last_fill */ \
0, /* first_dropped */ \
+ 0, /* last_dropped */ \
0, /* n_dropped */ \
}
/* Command line processing. */
#define VLOG_OPTION_ENUMS OPT_LOG_FILE
#define VLOG_LONG_OPTIONS \
- {"verbose", optional_argument, 0, 'v'}, \
- {"log-file", optional_argument, 0, OPT_LOG_FILE}
+ {"verbose", optional_argument, NULL, 'v'}, \
+ {"log-file", optional_argument, NULL, OPT_LOG_FILE}
#define VLOG_OPTION_HANDLERS \
case 'v': \
vlog_set_verbosity(optarg); \
} while (0)
#define VLOG_DEFINE_MODULE__(MODULE) \
+ extern struct vlog_module VLM_##MODULE; \
struct vlog_module VLM_##MODULE = \
{ \
#MODULE, /* name */ \