@@ -2,7 +2,7 @@
lib_LTLIBRARIES = src/libcxgb3.la
-AM_CFLAGS = -g -Wall -D_GNU_SOURCE
+AM_CFLAGS = -g -Wall
if HAVE_LD_VERSION_SCRIPT
cxgb3_version_script = -Wl,--version-script=$(srcdir)/src/iwch.map
@@ -1,6 +1,6 @@
lib_LTLIBRARIES = src/libcxgb4.la
-AM_CFLAGS = -g -Wall -D_GNU_SOURCE -DNDEBUG -DOVERFLOW_DETECTION -fno-strict-aliasing
+AM_CFLAGS = -g -Wall -DNDEBUG -DOVERFLOW_DETECTION -fno-strict-aliasing
if HAVE_LD_VERSION_SCRIPT
cxgb4_version_script = -Wl,--version-script=$(srcdir)/src/cxgb4.map
@@ -51,7 +51,7 @@
# Copyright (c) 2007. QLogic Corp. All rights reserved.
# Copyright (c) 2003, 2004, 2005. PathScale, Inc. All rights reserved.
-AM_CFLAGS = -g -Wall -D_GNU_SOURCE
+AM_CFLAGS = -g -Wall
hfiverbs_version_script = @HFIVERBS_VERSION_SCRIPT@
@@ -1,7 +1,7 @@
lib_LTLIBRARIES = src/libi40iw.la
AM_CPPFLAGS = -I$(srcdir)/src
-AM_CFLAGS = -O2 -Wall -D_GNU_SOURCE
+AM_CFLAGS = -O2 -Wall
if HAVE_LD_VERSION_SCRIPT
i40iw_version_script = -Wl,--version-script=$(srcdir)/src/i40iw.map
@@ -3,7 +3,7 @@ INCLUDES = -I$(srcdir)/include
lib_LTLIBRARIES = src/libibcm.la
ACLOCAL_AMFLAGS = -I config
-AM_CFLAGS = -g -Wall -D_GNU_SOURCE
+AM_CFLAGS = -g -Wall
src_libibcm_la_CFLAGS = $(AM_CFLAGS)
@@ -32,7 +32,7 @@
*
* $Id$
*/
-
+#define _GNU_SOURCE
#if HAVE_CONFIG_H
# include <config.h>
#endif /* HAVE_CONFIG_H */
@@ -30,9 +30,6 @@
* SOFTWARE.
*
*/
-
-#define _GNU_SOURCE
-
#if HAVE_CONFIG_H
# include <config.h>
#endif /* HAVE_CONFIG_H */
@@ -11,7 +11,6 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
dnl Checks for programs
AC_PROG_CC
-AC_USE_SYSTEM_EXTENSIONS
AC_PROG_LN_S
LT_INIT
@@ -29,7 +29,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
-
+#define _GNU_SOURCE
#if HAVE_CONFIG_H
# include <config.h>
#endif /* HAVE_CONFIG_H */
@@ -29,7 +29,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
-
+#define _GNU_SOURCE
#if HAVE_CONFIG_H
# include <config.h>
#endif /* HAVE_CONFIG_H */
@@ -29,7 +29,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
-
+#define _GNU_SOURCE
#if HAVE_CONFIG_H
# include <config.h>
#endif /* HAVE_CONFIG_H */
@@ -29,7 +29,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
-
+#define _GNU_SOURCE
#if HAVE_CONFIG_H
# include <config.h>
#endif /* HAVE_CONFIG_H */
@@ -29,7 +29,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
-
+#define _GNU_SOURCE
#if HAVE_CONFIG_H
# include <config.h>
#endif /* HAVE_CONFIG_H */
@@ -30,7 +30,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
-
+#define _GNU_SOURCE
#if HAVE_CONFIG_H
# include <config.h>
#endif /* HAVE_CONFIG_H */
@@ -30,7 +30,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
-
+#define _GNU_SOURCE
#if HAVE_CONFIG_H
# include <config.h>
#endif /* HAVE_CONFIG_H */
@@ -30,7 +30,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
-
+#define _GNU_SOURCE
#if HAVE_CONFIG_H
# include <config.h>
#endif /* HAVE_CONFIG_H */
@@ -29,7 +29,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
-
+#define _GNU_SOURCE
#if HAVE_CONFIG_H
# include <config.h>
#endif /* HAVE_CONFIG_H */
@@ -33,7 +33,7 @@
# combinations of this program with other software, or any other
# product whatsoever.
-AM_CFLAGS = -g -Wall -D_GNU_SOURCE
+AM_CFLAGS = -g -Wall
ipathverbs_version_script = @IPATHVERBS_VERSION_SCRIPT@
@@ -1,4 +1,4 @@
-AM_CFLAGS = -g -Wall -D_GNU_SOURCE
+AM_CFLAGS = -g -Wall
mlx4_version_script = @MLX4_VERSION_SCRIPT@
@@ -29,7 +29,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
-
+#define _GNU_SOURCE
#if HAVE_CONFIG_H
# include <config.h>
#endif /* HAVE_CONFIG_H */
@@ -1,4 +1,4 @@
-AM_CFLAGS = -g -Wall -D_GNU_SOURCE
+AM_CFLAGS = -g -Wall
ACLOCAL_AMFLAGS = -I m4
mlx5_version_script = @MLX5_VERSION_SCRIPT@
@@ -29,8 +29,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
-
-
+#define _GNU_SOURCE
#if HAVE_CONFIG_H
# include <config.h>
#endif /* HAVE_CONFIG_H */
@@ -29,8 +29,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
-
-
+#define _GNU_SOURCE
#if HAVE_CONFIG_H
# include <config.h>
#endif /* HAVE_CONFIG_H */
@@ -1,4 +1,4 @@
-AM_CFLAGS = -g -Wall -D_GNU_SOURCE
+AM_CFLAGS = -g -Wall
mthca_version_script = @MTHCA_VERSION_SCRIPT@
@@ -29,7 +29,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
-
+#define _GNU_SOURCE
#if HAVE_CONFIG_H
# include <config.h>
#endif /* HAVE_CONFIG_H */
@@ -1,7 +1,7 @@
lib_LTLIBRARIES = src/libnes.la
-AM_CFLAGS = -g -Wall -D_GNU_SOURCE
+AM_CFLAGS = -g -Wall
if HAVE_LD_VERSION_SCRIPT
nes_version_script = -Wl,--version-script=$(srcdir)/src/nes.map
@@ -1,7 +1,7 @@
lib_LTLIBRARIES = src/libocrdma.la
-AM_CFLAGS = -Wall -D_GNU_SOURCE
+AM_CFLAGS = -Wall
if HAVE_LD_VERSION_SCRIPT
ocrdma_version_script = -Wl,--version-script=$(srcdir)/src/ocrdma.map
@@ -5,7 +5,7 @@ lib_LTLIBRARIES = src/librdmacm.la
rslib_LTLIBRARIES = src/librspreload.la
ACLOCAL_AMFLAGS = -I config
-AM_CFLAGS = -g -Wall -D_GNU_SOURCE -DSYSCONFDIR=\"$(sysconfdir)\" -DRDMADIR=\"@rdmadir@\"
+AM_CFLAGS = -g -Wall -DSYSCONFDIR=\"$(sysconfdir)\" -DRDMADIR=\"@rdmadir@\"
src_librdmacm_la_CFLAGS = $(AM_CFLAGS)
src_librspreload_la_CFLAGS = $(AM_CFLAGS)
@@ -30,7 +30,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
-
+#define _GNU_SOURCE
#include <getopt.h>
#include <stdlib.h>
#include <string.h>
@@ -30,7 +30,7 @@
* SOFTWARE.
*
*/
-
+#define _GNU_SOURCE
#if HAVE_CONFIG_H
# include <config.h>
#endif /* HAVE_CONFIG_H */
@@ -30,7 +30,7 @@
* SOFTWARE.
*
*/
-
+#define _GNU_SOURCE
#if HAVE_CONFIG_H
# include <config.h>
#endif /* HAVE_CONFIG_H */
@@ -1,4 +1,4 @@
-AM_CFLAGS = -g -Wall -D_GNU_SOURCE
+AM_CFLAGS = -g -Wall
rxe_version_script = @RXE_VERSION_SCRIPT@
The recommended way to use this macro is at the top of the source file, avoid globally setting it via 'gcc -D' as few source files actually need it. In this tree we only need it in 17 out of 83 sources. _GNU_SOURCE changes the behaviour of a few select calls away from the C99 standard and should generally be minimized. Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> --- libcxgb3/Makefile.am | 2 +- libcxgb4/Makefile.am | 2 +- libhfi1verbs/Makefile.am | 2 +- libi40iw/Makefile.am | 2 +- libibcm/Makefile.am | 2 +- libibcm/src/cm.c | 2 +- libibumad/src/sysfs.c | 3 --- libibverbs/configure.ac | 1 - libibverbs/examples/asyncwatch.c | 2 +- libibverbs/examples/rc_pingpong.c | 2 +- libibverbs/examples/srq_pingpong.c | 2 +- libibverbs/examples/uc_pingpong.c | 2 +- libibverbs/examples/ud_pingpong.c | 2 +- libibverbs/examples/xsrq_pingpong.c | 2 +- libibverbs/src/device.c | 2 +- libibverbs/src/init.c | 2 +- libibverbs/src/sysfs.c | 2 +- libipathverbs/Makefile.am | 2 +- libmlx4/Makefile.am | 2 +- libmlx4/src/dbrec.c | 2 +- libmlx5/Makefile.am | 2 +- libmlx5/src/dbrec.c | 3 +-- libmlx5/src/mlx5.c | 3 +-- libmthca/Makefile.am | 2 +- libmthca/src/memfree.c | 2 +- libnes/Makefile.am | 2 +- libocrdma/Makefile.am | 2 +- librdmacm/Makefile.am | 2 +- librdmacm/examples/rping.c | 2 +- librdmacm/src/preload.c | 2 +- librdmacm/src/rsocket.c | 2 +- librxe/Makefile.am | 2 +- 32 files changed, 30 insertions(+), 36 deletions(-)