]> sigrok.org Git - sigrok-cli.git/commitdiff
Build: Include <config.h> first in all source files
authorDaniel Elstner <redacted>
Sun, 13 Sep 2015 20:42:51 +0000 (22:42 +0200)
committerDaniel Elstner <redacted>
Sun, 13 Sep 2015 20:42:51 +0000 (22:42 +0200)
Since Autoconf places some important feature flags only into the
configuration header, it is necessary to include it globally to
guarantee a consistent build.

anykey.c
decode.c
device.c
input.c
main.c
options.c
parsers.c
session.c
show.c
sigrok-cli.h

index eaa53f627aeb2af08243316bf64c478861448e34..7c801f1ce8b8bb6dbb3983346ff264330c8e1ab3 100644 (file)
--- a/anykey.c
+++ b/anykey.c
@@ -17,6 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <config.h>
 #include <stdio.h>
 #ifdef _WIN32
 #include <windows.h>
index e2a0f8563524447982d19f71381bb9fa99c01fef..67d8f1ef33c196310bfa24ee1a12f7663e2bbeeb 100644 (file)
--- a/decode.c
+++ b/decode.c
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <config.h>
 #include <stdlib.h>
 #include <string.h>
 #include <glib.h>
 #include "sigrok-cli.h"
-#include "config.h"
 
 #ifdef HAVE_SRD
 static GHashTable *pd_ann_visible = NULL;
index df7a7ed6d8ad4de2f29cda9c4455de0188a30969..a159ff003c7f07f7b2669885e87fdbb44d5730b7 100644 (file)
--- a/device.c
+++ b/device.c
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <config.h>
 #include <glib.h>
 #include <string.h>
 #include "sigrok-cli.h"
-#include "config.h"
 
 static void free_drvopts(struct sr_config *src)
 {
diff --git a/input.c b/input.c
index 79b6270158b318e0d0f77cdaa984f8fac464bbb9..df1fdfc4d4746ec16eb39e63100a0c8b3e0f1a11 100644 (file)
--- a/input.c
+++ b/input.c
@@ -17,6 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <config.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
@@ -26,7 +27,6 @@
 #include <string.h>
 #include <glib.h>
 #include "sigrok-cli.h"
-#include "config.h"
 
 #define BUFSIZE (16 * 1024)
 
diff --git a/main.c b/main.c
index 17065101af2bfcbe96ec75e36eabd91d98e532ab..51053bc9a8a3ed2135622ffd7f841eff8d1d91d7 100644 (file)
--- a/main.c
+++ b/main.c
@@ -17,6 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <config.h>
 #include <stdlib.h>
 #include <glib.h>
 #include "sigrok-cli.h"
index 6a97595740bfc51e2fa44d176982df2da3a3ced4..f2acb19243892197a8f9add31004d6516fb164d4 100644 (file)
--- a/options.c
+++ b/options.c
@@ -17,6 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <config.h>
 #include <glib.h>
 #include "sigrok-cli.h"
 
index 333e6e49053e24c0555e2443d75b9a748ca4b63d..5ec655f78ad3dce8a05f01186a2a7ec61febb437 100644 (file)
--- a/parsers.c
+++ b/parsers.c
@@ -17,6 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <config.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdint.h>
index b136dd4863955cb6662b7f70e16141b8888cf041..6f402056c0eadfdac17b4ad829bf191aa2bdbf5e 100644 (file)
--- a/session.c
+++ b/session.c
@@ -17,6 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <config.h>
 #include <glib.h>
 #include <glib/gstdio.h>
 #include <string.h>
diff --git a/show.c b/show.c
index 26ac3183f547c4f355752d97da88cef617257b30..e20705833a2d41a40bec65ddd45898c3e15e3665 100644 (file)
--- a/show.c
+++ b/show.c
@@ -17,6 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <config.h>
 #include <glib.h>
 #include <string.h>
 #include "sigrok-cli.h"
index 443d4f6c629cd37b118b5c5879e7c2d68619c6ac..93a3b58de3689a6734d62c1234463f3a70462f30 100644 (file)
@@ -20,7 +20,6 @@
 #ifndef SIGROK_CLI_SIGROK_CLI_H
 #define SIGROK_CLI_SIGROK_CLI_H
 
-#include <config.h>
 #ifdef HAVE_SRD
 /* First, so we avoid a _POSIX_C_SOURCE warning. */
 #include <libsigrokdecode/libsigrokdecode.h>