Create a separate .c file for misc definitions.
Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
#
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
{
return line->chip;
}
-
-const char * gpiod_version_string(void)
-{
- return GPIOD_VERSION_STR;
-}
--- /dev/null
+/*
+ * Misc definitions for libgpiod.
+ *
+ * Copyright (C) 2017 Bartosz Golaszewski <bartekgola@gmail.com>
+ *
+ * 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 <gpiod.h>
+
+const char * gpiod_version_string(void)
+{
+ return GPIOD_VERSION_STR;
+}