Skip to content
Myr

Remove all #define _GNU_SOURCE in source files

Before adoption: this commit came in with the history the project adopted, so no landing records it.

This is unnecessary since we are using AC_USE_SYSTEM_EXTENSIONS in configure.ac, which makes the compiler always run with -D_GNU_SOURCE=1 when building for GNU/Linux. Also, the #define _GNU_SOURCE in src/util.c, and in src/inject_errors.c (--enable-inject-errors), were not guarded by a #ifndef _GNU_SOURCE so they were just triggering redefinition warnings.

authored by Emanuele Torre · committed by GitHub · parent cf3c11b · Browse files · 4 files+0 added−13 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

4 files+0 added−13 removed

  • other:+0 added−13 removed

4 files+0 added−13 removed

modified:src/builtin.c-3 removed
1#ifndef _GNU_SOURCE2# define _GNU_SOURCE3#endif1#ifndef __sun__2# define _XOPEN_SOURCE3# define _XOPEN_SOURCE_EXTENDED 14#else
1874 unmodified lines
modified:src/compile.c-3 removed
1#ifndef _GNU_SOURCE2#define _GNU_SOURCE // for strdup3#endif1#include <assert.h>2#include <math.h>3#include <string.h>4#include <stdlib.h>
1395 unmodified lines
modified:src/inject_errors.c-2 removed
12#define _GNU_SOURCE /* for RTLD_NEXT */1#include <assert.h>2#include <dlfcn.h>3#include <errno.h>4#include <stdio.h>
106 unmodified lines
modified:src/util.c-5 removed
12#ifdef HAVE_MEMMEM3#define _GNU_SOURCE4#endif51#include <sys/types.h>2#include <sys/stat.h>3#include <assert.h>4#include <errno.h>
440 unmodified lines