all: include config.h only when available and use its defines

... rather than explicitly redefining HAVE_STDINT_H and _GNU_SOURCE.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
main
Emil Velikov 2014-07-27 14:46:45 +01:00
parent 391bba9c4c
commit 8e93afc976
14 changed files with 35 additions and 8 deletions

View File

@ -21,7 +21,9 @@
* IN THE SOFTWARE. * IN THE SOFTWARE.
*/ */
#define _GNU_SOURCE #ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
@ -33,7 +35,6 @@
#include <sys/mman.h> #include <sys/mman.h>
#include <err.h> #include <err.h>
#include "config.h"
#include "intel_bufmgr.h" #include "intel_bufmgr.h"
#include "intel_chipset.h" #include "intel_chipset.h"

View File

@ -26,7 +26,9 @@
**************************************************************************/ **************************************************************************/
#ifdef HAVE_CONFIG_H
#include "config.h" #include "config.h"
#endif
#include <errno.h> #include <errno.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>

View File

@ -26,7 +26,9 @@
**************************************************************************/ **************************************************************************/
#define HAVE_STDINT_H #ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#define _FILE_OFFSET_BITS 64 #define _FILE_OFFSET_BITS 64
#include <errno.h> #include <errno.h>

View File

@ -11,7 +11,9 @@
* option) any later version. * option) any later version.
*/ */
#define HAVE_STDINT_H #ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#define _FILE_OFFSET_BITS 64 #define _FILE_OFFSET_BITS 64
#include <errno.h> #include <errno.h>

View File

@ -26,7 +26,9 @@
**************************************************************************/ **************************************************************************/
#define HAVE_STDINT_H #ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#define _FILE_OFFSET_BITS 64 #define _FILE_OFFSET_BITS 64
#include <errno.h> #include <errno.h>

View File

@ -30,7 +30,9 @@
*/ */
#ifdef HAVE_CONFIG_H
#include "config.h" #include "config.h"
#endif
#include <errno.h> #include <errno.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>

View File

@ -26,7 +26,9 @@
**************************************************************************/ **************************************************************************/
#define HAVE_STDINT_H #ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#define _FILE_OFFSET_BITS 64 #define _FILE_OFFSET_BITS 64
#include <errno.h> #include <errno.h>

View File

@ -26,7 +26,9 @@
**************************************************************************/ **************************************************************************/
#define HAVE_STDINT_H #ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#define _FILE_OFFSET_BITS 64 #define _FILE_OFFSET_BITS 64
#include <errno.h> #include <errno.h>

View File

@ -26,7 +26,9 @@
**************************************************************************/ **************************************************************************/
#define HAVE_STDINT_H #ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#define _FILE_OFFSET_BITS 64 #define _FILE_OFFSET_BITS 64
#include <errno.h> #include <errno.h>

View File

@ -28,7 +28,9 @@
* *
*/ */
#ifdef HAVE_CONFIG_H
#include "config.h" #include "config.h"
#endif
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>

View File

@ -24,7 +24,9 @@
* IN THE SOFTWARE. * IN THE SOFTWARE.
*/ */
#ifdef HAVE_CONFIG_H
#include "config.h" #include "config.h"
#endif
#include <assert.h> #include <assert.h>
#include <errno.h> #include <errno.h>

View File

@ -22,7 +22,9 @@
* IN THE SOFTWARE. * IN THE SOFTWARE.
*/ */
#ifdef HAVE_CONFIG_H
#include "config.h" #include "config.h"
#endif
#include <assert.h> #include <assert.h>
#include <errno.h> #include <errno.h>

View File

@ -37,7 +37,9 @@
* TODO: use cairo to write the mode info on the selected output once * TODO: use cairo to write the mode info on the selected output once
* the mode has been programmed, along with possible test patterns. * the mode has been programmed, along with possible test patterns.
*/ */
#ifdef HAVE_CONFIG_H
#include "config.h" #include "config.h"
#endif
#include <assert.h> #include <assert.h>
#include <ctype.h> #include <ctype.h>

View File

@ -37,7 +37,9 @@
* TODO: use cairo to write the mode info on the selected output once * TODO: use cairo to write the mode info on the selected output once
* the mode has been programmed, along with possible test patterns. * the mode has been programmed, along with possible test patterns.
*/ */
#ifdef HAVE_CONFIG_H
#include "config.h" #include "config.h"
#endif
#include <assert.h> #include <assert.h>
#include <stdio.h> #include <stdio.h>