A week or two ago, upstream gnulib was fixed to be more namespace friendly in how it creates replacement headers. For some of its replacements (e.g., <stdio.h>, used via gnulib/lib/stdio.h), it would unnecessarily include another header, e.g., <stdlib.h>. That would make it so that an application using gnulib's <stdio.h> could think it's fine *not* to include stdlib.h, even though it uses a function like exit whose declaration usually requires an explicit inclusion of <stdlib.h>. [the example above is made up -- in reality it was more subtle] Well, now, those excess inclusions have been removed, and when I upgraded libvirt to use the latest gnulib, I saw many compilation failures due to missing #include directives. This series fixes the problems, then adds a change-set to update to the latest gnulib. Here are the one-line summaries: util.c: include required header, no longer masked by gnulib cpu_x86_data.h: include required header vbox: include required headers esx_vi_types.c: include required headers storage_backend.h: include required headers build: update gnulib submodule to latest >From ed2e5140a5a5529ca19e730d061f6d5b3872bb7f Mon Sep 17 00:00:00 2001 From: Jim Meyering <meyering@xxxxxxxxxx> Date: Fri, 15 Jan 2010 10:31:23 +0100 Subject: [PATCH 1/6] util.c: include required header, no longer masked by gnulib Until recently, some gnulib-generated replacement headers included *other* headers that were not strictly necessary, thus masking the need in this file for an explicit <stdlib.h>. * src/util/util.c: Include <stdlib.h> for declarations of e.g., strtol, random_r, getenv, etc. --- src/util/util.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/src/util/util.c b/src/util/util.c index 45ca657..67fae00 100644 --- a/src/util/util.c +++ b/src/util/util.c @@ -1,7 +1,7 @@ /* * utils.c: common, generic utility functions * - * Copyright (C) 2006, 2007, 2008, 2009 Red Hat, Inc. + * Copyright (C) 2006-2010 Red Hat, Inc. * Copyright (C) 2006 Daniel P. Berrange * Copyright (C) 2006, 2007 Binary Karma * Copyright (C) 2006 Shuveb Hussain @@ -28,6 +28,7 @@ #include <stdio.h> #include <stdarg.h> +#include <stdlib.h> #include <unistd.h> #include <fcntl.h> #include <errno.h> -- 1.6.6.556.gd6679 >From c920cd6ae55e4b89aa32c7303ed206a83071f5c0 Mon Sep 17 00:00:00 2001 From: Jim Meyering <meyering@xxxxxxxxxx> Date: Fri, 15 Jan 2010 10:33:32 +0100 Subject: [PATCH 2/6] cpu_x86_data.h: include required header * src/cpu/cpu_x86_data.h: Include <stdint.h>. --- src/cpu/cpu_x86_data.h | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/src/cpu/cpu_x86_data.h b/src/cpu/cpu_x86_data.h index 8b09d23..25ee2a5 100644 --- a/src/cpu/cpu_x86_data.h +++ b/src/cpu/cpu_x86_data.h @@ -1,7 +1,7 @@ /* * cpu_x86_data.h: x86 specific CPU data * - * Copyright (C) 2009 Red Hat, Inc. + * Copyright (C) 2009-2010 Red Hat, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -24,6 +24,8 @@ #ifndef __VIR_CPU_X86_DATA_H__ #define __VIR_CPU_X86_DATA_H__ +#include <stdint.h> + struct cpuX86cpuid { uint32_t function; uint32_t eax; -- 1.6.6.556.gd6679 >From 5efa5755bd38f0e7fb0f802c21dbd798e49ba5a3 Mon Sep 17 00:00:00 2001 From: Jim Meyering <meyering@xxxxxxxxxx> Date: Fri, 15 Jan 2010 10:35:41 +0100 Subject: [PATCH 3/6] vbox: include required headers * src/vbox/vbox_driver.c: Include <stdint.h> <unistd.h> <sys/types.h>. --- src/vbox/vbox_driver.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/src/vbox/vbox_driver.c b/src/vbox/vbox_driver.c index ad5f239..ef3eb4b 100644 --- a/src/vbox/vbox_driver.c +++ b/src/vbox/vbox_driver.c @@ -28,6 +28,10 @@ #include <config.h> +#include <stdint.h> +#include <unistd.h> +#include <sys/types.h> + #include "internal.h" #include "datatypes.h" -- 1.6.6.556.gd6679 >From b860fa5ed20cb54c56f50e25b40a9864b9ff4b60 Mon Sep 17 00:00:00 2001 From: Jim Meyering <meyering@xxxxxxxxxx> Date: Fri, 15 Jan 2010 10:37:03 +0100 Subject: [PATCH 4/6] esx_vi_types.c: include required headers * src/esx/esx_vi_types.c: Include <stdint.h>. --- src/esx/esx_vi_types.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/esx/esx_vi_types.c b/src/esx/esx_vi_types.c index 8c5b17b..c042e89 100644 --- a/src/esx/esx_vi_types.c +++ b/src/esx/esx_vi_types.c @@ -22,6 +22,7 @@ #include <config.h> +#include <stdint.h> #include <libxml/parser.h> #include <libxml/xpathInternals.h> -- 1.6.6.556.gd6679 >From b57e46d562501d449f5e56bdf780496899494bf4 Mon Sep 17 00:00:00 2001 From: Jim Meyering <meyering@xxxxxxxxxx> Date: Fri, 15 Jan 2010 10:38:36 +0100 Subject: [PATCH 5/6] storage_backend.h: include required headers * src/storage/storage_backend.h: Include <stdint.h>. --- src/storage/storage_backend.h | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/src/storage/storage_backend.h b/src/storage/storage_backend.h index 88c6161..1c38eeb 100644 --- a/src/storage/storage_backend.h +++ b/src/storage/storage_backend.h @@ -1,7 +1,7 @@ /* * storage_backend.h: internal storage driver backend contract * - * Copyright (C) 2007-2008 Red Hat, Inc. + * Copyright (C) 2007-2010 Red Hat, Inc. * Copyright (C) 2007-2008 Daniel P. Berrange * * This library is free software; you can redistribute it and/or @@ -24,6 +24,7 @@ #ifndef __VIR_STORAGE_BACKEND_H__ #define __VIR_STORAGE_BACKEND_H__ +#include <stdint.h> #include "internal.h" #include "storage_conf.h" -- 1.6.6.556.gd6679 >From e2617c6132f1da930f3c52926e71ec79a80dde1f Mon Sep 17 00:00:00 2001 From: Jim Meyering <meyering@xxxxxxxxxx> Date: Fri, 15 Jan 2010 10:23:22 +0100 Subject: [PATCH 6/6] build: update gnulib submodule to latest --- .gnulib | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/.gnulib b/.gnulib index 3fd9a2d..4c52807 160000 --- a/.gnulib +++ b/.gnulib @@ -1 +1 @@ -Subproject commit 3fd9a2df88c558b27be3a585ca2978dbf9b5da53 +Subproject commit 4c52807f41f238cf0e352317b2dc54f9ba0f0c4f -- 1.6.6.556.gd6679 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list