From: Bartosz Golaszewski Date: Wed, 28 Jun 2017 14:15:04 +0000 (+0200) Subject: core: move gpiod_version_string() to misc.c X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=406c568fffc68527e3a2cd67c35fc5b38c2b1218;p=qemu-gpiodev%2Flibgpiod.git core: move gpiod_version_string() to misc.c Create a separate .c file for misc definitions. Signed-off-by: Bartosz Golaszewski --- diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am index 9128f64..6cf3e9a 100644 --- a/src/lib/Makefile.am +++ b/src/lib/Makefile.am @@ -7,7 +7,7 @@ # lib_LTLIBRARIES = libgpiod.la -libgpiod_la_SOURCES = core.c iter.c simple.c +libgpiod_la_SOURCES = core.c iter.c misc.c simple.c libgpiod_la_CFLAGS = -Wall -Wextra -g libgpiod_la_CFLAGS += -fvisibility=hidden -I$(top_srcdir)/include/ libgpiod_la_CFLAGS += -include $(top_builddir)/config.h diff --git a/src/lib/core.c b/src/lib/core.c index 59c525c..27ccbe8 100644 --- a/src/lib/core.c +++ b/src/lib/core.c @@ -885,8 +885,3 @@ struct gpiod_chip * gpiod_line_get_chip(struct gpiod_line *line) { return line->chip; } - -const char * gpiod_version_string(void) -{ - return GPIOD_VERSION_STR; -} diff --git a/src/lib/misc.c b/src/lib/misc.c new file mode 100644 index 0000000..c7f7cf9 --- /dev/null +++ b/src/lib/misc.c @@ -0,0 +1,16 @@ +/* + * Misc definitions for libgpiod. + * + * Copyright (C) 2017 Bartosz Golaszewski + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of version 2.1 of the GNU Lesser General Public License + * as published by the Free Software Foundation. + */ + +#include + +const char * gpiod_version_string(void) +{ + return GPIOD_VERSION_STR; +}