#define _GNU_SOURCE in files that need it (instead of globally).

This commit is contained in:
Russell Sears 2013-02-13 17:47:21 -08:00
parent 1a94f8bf89
commit f198ec1b84
8 changed files with 19 additions and 12 deletions

View file

@ -6,14 +6,6 @@
#include <unistd.h>
#include <pthread.h>
// if we're using linux's crazy version of the pthread header,
// it probably forgot to include PTHREAD_STACK_MIN
#ifndef PTHREAD_STACK_MIN
#include <limits.h>
#endif
int i = 0;
int max_active = 0;

View file

@ -4,6 +4,9 @@
* Created on: Aug 26, 2011
* Author: sears
*/
#ifndef _GNU_SOURCE
#define _GNU_SOURCE // for O_DIRECT
#endif
#include <config.h>
#include <stasis/common.h>
#include <stasis/util/random.h>

View file

@ -1,3 +1,6 @@
#ifndef _GNU_SOURCE
#define _GNU_SOURCE // for O_DIRECT
#endif
#include <config.h>
#include <stasis/transactional.h>

View file

@ -1,8 +1,5 @@
#ifndef STASIS_CONFIG_H
#define STASIS_CONFIG_H
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
#cmakedefine HAVE_POSIX_FALLOCATE
#cmakedefine HAVE_POSIX_MEMALIGN
#cmakedefine HAVE_POSIX_FADVISE

View file

@ -3,6 +3,9 @@
This file handles all of the file I/O for pages.
*/
#ifndef _GNU_SOURCE
#define _GNU_SOURCE // for sync file range constants.
#endif
#include "config.h"
#include <stasis/page.h>

View file

@ -1,4 +1,7 @@
#include <config.h> //for O_NOATIME
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
#include <config.h>
#include <stasis/common.h>
#include <stasis/flags.h>
#include <stasis/constants.h>

View file

@ -1,3 +1,6 @@
#ifndef _GNU_SOURCE
#define _GNU_SOURCE // for sync file range constants.
#endif
#include <config.h>
#include <stasis/common.h>
#include <fcntl.h>

View file

@ -1,3 +1,6 @@
#ifndef _GNU_SOURCE
#define _GNU_SOURCE // for sync_file_range constants
#endif
#include <config.h>
#include <stasis/io/handle.h>