Browse Source

iscsi, nfs, opt, tap: use config.h instead of defining _GNU_SOURCE.

Rusty Russell 15 years ago
parent
commit
39dc9e4612

+ 1 - 1
ccan/iscsi/discovery.c

@@ -15,7 +15,7 @@
    along with this program; if not, see <http://www.gnu.org/licenses/>.
    along with this program; if not, see <http://www.gnu.org/licenses/>.
 */
 */
 
 
-#define _GNU_SOURCE
+#include "config.h"
 #include <stdio.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdlib.h>
 #include <string.h>
 #include <string.h>

+ 1 - 1
ccan/iscsi/login.c

@@ -15,7 +15,7 @@
    along with this program; if not, see <http://www.gnu.org/licenses/>.
    along with this program; if not, see <http://www.gnu.org/licenses/>.
 */
 */
 
 
-#define _GNU_SOURCE
+#include "config.h"
 #include <stdio.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdlib.h>
 #include <string.h>
 #include <string.h>

+ 1 - 1
ccan/nfs/init.c

@@ -15,7 +15,7 @@
    along with this program; if not, see <http://www.gnu.org/licenses/>.
    along with this program; if not, see <http://www.gnu.org/licenses/>.
 */
 */
 
 
-#define _GNU_SOURCE
+#include "config.h"
 #include <stdio.h>
 #include <stdio.h>
 #include <stdarg.h>
 #include <stdarg.h>
 #include <unistd.h>
 #include <unistd.h>

+ 1 - 1
ccan/opt/test/run-checkopt.c

@@ -1,4 +1,4 @@
-#define _GNU_SOURCE
+#include "config.h"
 #include <stdio.h>
 #include <stdio.h>
 #include <ccan/tap/tap.h>
 #include <ccan/tap/tap.h>
 #include <setjmp.h>
 #include <setjmp.h>

+ 1 - 1
ccan/opt/test/run-helpers.c

@@ -1,4 +1,4 @@
-#define _GNU_SOURCE
+#include "config.h"
 #include <stdio.h>
 #include <stdio.h>
 #include <ccan/tap/tap.h>
 #include <ccan/tap/tap.h>
 #include <setjmp.h>
 #include <setjmp.h>

+ 0 - 1
ccan/opt/test/run-iter.c

@@ -1,4 +1,3 @@
-#define _GNU_SOURCE
 #include <ccan/tap/tap.h>
 #include <ccan/tap/tap.h>
 #include <stdarg.h>
 #include <stdarg.h>
 #include <setjmp.h>
 #include <setjmp.h>

+ 0 - 1
ccan/opt/test/run-usage.c

@@ -1,4 +1,3 @@
-#define _GNU_SOURCE
 #include <ccan/tap/tap.h>
 #include <ccan/tap/tap.h>
 #include <stdarg.h>
 #include <stdarg.h>
 #include <setjmp.h>
 #include <setjmp.h>

+ 1 - 1
ccan/opt/test/utils.c

@@ -1,4 +1,4 @@
-#define _GNU_SOURCE
+#include "config.h"
 #include <ccan/tap/tap.h>
 #include <ccan/tap/tap.h>
 #include <stdarg.h>
 #include <stdarg.h>
 #include <stdlib.h>
 #include <stdlib.h>

+ 1 - 4
ccan/tap/tap.c

@@ -23,10 +23,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * SUCH DAMAGE.
  */
  */
-/* FIXME: The real fix is an asprintf module. */
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE 1
-#endif
+#include "config.h"
 #include <ctype.h>
 #include <ctype.h>
 #include <stdarg.h>
 #include <stdarg.h>
 #include <stdio.h>
 #include <stdio.h>