From 48046e593efc9583335632f25805153cc2ca8114 Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Fri, 3 Oct 2014 14:13:50 +0200 Subject: [PATCH] Don't include config.h in util.h The config module is used by ptp4l only, but util is shared with other programs. Signed-off-by: Miroslav Lichvar --- config.h | 8 -------- phc_ctl.c | 1 + util.h | 12 +++++++++++- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/config.h b/config.h index 9b74f12..d580496 100644 --- a/config.h +++ b/config.h @@ -51,14 +51,6 @@ struct interface { #define CFG_IGNORE_USE_SYSLOG (1 << 5) #define CFG_IGNORE_VERBOSE (1 << 6) -enum parser_result { - PARSED_OK, - NOT_PARSED, - BAD_VALUE, - MALFORMED, - OUT_OF_RANGE, -}; - struct config { /* configuration override */ int cfg_ignore; diff --git a/phc_ctl.c b/phc_ctl.c index dc9c29c..461f2ac 100644 --- a/phc_ctl.c +++ b/phc_ctl.c @@ -43,6 +43,7 @@ #include "missing.h" #include "phc.h" #include "print.h" +#include "sk.h" #include "sysoff.h" #include "util.h" #include "version.h" diff --git a/util.h b/util.h index cf05e49..bb29e11 100644 --- a/util.h +++ b/util.h @@ -20,7 +20,6 @@ #ifndef HAVE_UTIL_H #define HAVE_UTIL_H -#include "config.h" #include "ddt.h" /** @@ -125,6 +124,17 @@ int is_utc_ambiguous(uint64_t ts); */ int leap_second_status(uint64_t ts, int leap_set, int *leap, int *utc_offset); +/** + * Values returned by get_ranged_*(). + */ +enum parser_result { + PARSED_OK, + NOT_PARSED, + BAD_VALUE, + MALFORMED, + OUT_OF_RANGE, +}; + /** * Get an integer value from string with error checking and range * specification.