fix include orders because python defines _GNU_SOURCE unconditionally and it can collide with other libs

This commit is contained in:
Vincent Castellano 2015-05-23 18:26:58 -07:00
parent 0cf690a8aa
commit 6aa4dabf5f
2 changed files with 11 additions and 6 deletions

10
loop.c
View File

@ -21,7 +21,13 @@
#include "config.h"
#endif
#if USE_PYTHON
#include "python-tg.h"
#endif
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
#define READLINE_CALLBACKS
#include <assert.h>
@ -59,9 +65,7 @@
#if USE_LUA
#include "lua-tg.h"
#endif
#if USE_PYTHON
#include "python-tg.h"
#endif
#include <tgl/tgl.h>
#include <tgl/tgl-binlog.h>
#include <tgl/tgl-net.h>

7
main.c
View File

@ -21,6 +21,10 @@
#include "config.h"
#endif
#ifdef USE_PYTHON
# include "python-tg.h"
#endif
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
@ -75,9 +79,6 @@
# include "lua-tg.h"
#endif
#ifdef USE_PYTHON
# include "python-tg.h"
#endif
#include <tgl/tgl.h>