]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Define _GNU_SOURCE in src/Makefile.am
authorColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Mon, 22 Aug 2011 22:35:13 +0000 (15:35 -0700)
committerColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Mon, 22 Aug 2011 22:35:13 +0000 (15:35 -0700)
We end up needing _GNU_SOURCE in a bunch of places-- to get direct i/o,
pipe2, and some other Linux-specific interfaces.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
qa/workunits/direct_io/direct_io_test.c
qa/workunits/direct_io/test_short_dio_read.c
qa/workunits/direct_io/test_sync_io.c
src/Makefile.am
src/common/HeartbeatMap.cc
src/common/pipe.c
src/common/sync_filesystem.h
src/test/gprof-helper.c

index 3ad6592cba3ae412cd08414dee65d85539c0b938..ccfbbb86079d13403c97ae4c3a541c1c0d13aa5b 100644 (file)
@@ -9,7 +9,6 @@
  * Foundation.  See file COPYING.
  *
  */
-#define _GNU_SOURCE // for O_DIRECT
 
 #include <errno.h>
 #include <inttypes.h>
index e262201e3ebf2ef5f2a2f9f2bb48ce741e7c6935..7cc43959747cf1bd236a9c5ec22195f5516844b9 100644 (file)
@@ -1,4 +1,3 @@
-#define _GNU_SOURCE
 #include <unistd.h>
 #include <sys/types.h>
 #include <sys/stat.h>
index a5e4713c70d978ed5cd02738a5618c1e719f0ccb..1a84fee55c99cc4515d6584ef27f91dc86fc9205 100644 (file)
@@ -1,6 +1,3 @@
-
-#define _GNU_SOURCE
-
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
index 3869f546b437785fdeaee1ba821afd8ebec96a51..52b6ae3aa4135a99595532a71aeeea226c25ab3d 100644 (file)
@@ -659,7 +659,7 @@ CLEANFILES += \
 ##
 
 AM_COMMON_FLAGS = -Wall -D__CEPH__ -D_FILE_OFFSET_BITS=64 -D_REENTRANT \
--D_THREAD_SAFE -D__STDC_FORMAT_MACROS -rdynamic \
+-D_THREAD_SAFE -D__STDC_FORMAT_MACROS -D_GNU_SOURCE -rdynamic \
 ${WARN_TYPE_LIMITS} ${WARN_IGNORED_QUALIFIERS} -Winit-self -Wpointer-arith \
 -fno-strict-aliasing
 
index ca1aaea46d5bf497c5cf29dc3fa4e31119c664d4..99970e4237ebe8d33d38fb2edfd8ea6c5736bde5 100644 (file)
  * 
  */
 
-#ifndef _GNU_SOURCE
-# define _GNU_SOURCE
-#endif
-
 #include <time.h>
 #include <sys/types.h>
 #include <sys/stat.h>
index 0cfdb519ddb317c6fe17ed43359c90a4c88d8c46..312f486f7a0c98691b809f78b65100837bdc03be 100644 (file)
  *
  */
 
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE /* need for pipe2 */
-#endif
-
 #include "common/pipe.h"
 
 #include <errno.h>
index 78afdf13479fa154a51678a64accb10637936bda..04cfc99939017470b2aa00f4dc5a5c8dee8642c4 100644 (file)
@@ -15,9 +15,6 @@
 #ifndef CEPH_SYNC_FILESYSTEM_H
 #define CEPH_SYNC_FILESYSTEM_H
 
-#ifndef _GNU_SOURCE
-# define _GNU_SOURCE
-#endif
 #include <unistd.h>
 
 inline int sync_filesystem(int fd)
index 9f013ba5b630e7fb85d75045fd1eb8d6b6e60d22..a64c406ec26e39bdfad34042a64e0a2f69377b99 100644 (file)
@@ -15,7 +15,6 @@
  * LD_PRELOAD=./gprof-helper.so your_program
  */
 
-#define _GNU_SOURCE
 #include <sys/time.h>
 #include <stdio.h>
 #include <stdlib.h>