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 <mlichvar@redhat.com>
master
Miroslav Lichvar 2014-10-03 14:13:50 +02:00 committed by Richard Cochran
parent aa24ba58e1
commit 48046e593e
3 changed files with 12 additions and 9 deletions

View File

@ -51,14 +51,6 @@ struct interface {
#define CFG_IGNORE_USE_SYSLOG (1 << 5) #define CFG_IGNORE_USE_SYSLOG (1 << 5)
#define CFG_IGNORE_VERBOSE (1 << 6) #define CFG_IGNORE_VERBOSE (1 << 6)
enum parser_result {
PARSED_OK,
NOT_PARSED,
BAD_VALUE,
MALFORMED,
OUT_OF_RANGE,
};
struct config { struct config {
/* configuration override */ /* configuration override */
int cfg_ignore; int cfg_ignore;

View File

@ -43,6 +43,7 @@
#include "missing.h" #include "missing.h"
#include "phc.h" #include "phc.h"
#include "print.h" #include "print.h"
#include "sk.h"
#include "sysoff.h" #include "sysoff.h"
#include "util.h" #include "util.h"
#include "version.h" #include "version.h"

12
util.h
View File

@ -20,7 +20,6 @@
#ifndef HAVE_UTIL_H #ifndef HAVE_UTIL_H
#define HAVE_UTIL_H #define HAVE_UTIL_H
#include "config.h"
#include "ddt.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); 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 * Get an integer value from string with error checking and range
* specification. * specification.