Skip to content

Commit

Permalink
Build: Include <config.h> first in all source files
Browse files Browse the repository at this point in the history
Since Autoconf places some important feature flags only into the
configuration header, it is necessary to include it globally to
guarantee a consistent build.
  • Loading branch information
danielkitta committed Sep 13, 2015
1 parent 89025e7 commit d486cbd
Show file tree
Hide file tree
Showing 10 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions anykey.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion decode.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
* 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;
Expand Down
2 changes: 1 addition & 1 deletion device.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
* 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)
{
Expand Down
2 changes: 1 addition & 1 deletion input.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -26,7 +27,6 @@
#include <string.h>
#include <glib.h>
#include "sigrok-cli.h"
#include "config.h"

#define BUFSIZE (16 * 1024)

Expand Down
1 change: 1 addition & 0 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions options.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
1 change: 1 addition & 0 deletions parsers.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
1 change: 1 addition & 0 deletions session.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
1 change: 1 addition & 0 deletions show.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion sigrok-cli.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit d486cbd

Please sign in to comment.