* [Qemu-devel] [PATCH 1/4] slirp/slirp.h: Remove now-empty #ifdefs
2016-02-23 14:18 [Qemu-devel] [PATCH 0/4] post-include-cleanup followups Peter Maydell
@ 2016-02-23 14:18 ` Peter Maydell
2016-02-23 15:04 ` Eric Blake
2016-02-24 18:58 ` Thomas Huth
2016-02-23 14:18 ` [Qemu-devel] [PATCH 2/4] include/config.h: Remove Peter Maydell
` (4 subsequent siblings)
5 siblings, 2 replies; 10+ messages in thread
From: Peter Maydell @ 2016-02-23 14:18 UTC (permalink / raw)
To: qemu-devel; +Cc: patches
After automatic cleanup to remove unnecessary #includes of headers that
osdep.h provides, slirp.h has a few now unnecessary #ifdef/#endif pairs;
remove them.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
slirp/slirp.h | 24 ------------------------
1 file changed, 24 deletions(-)
diff --git a/slirp/slirp.h b/slirp/slirp.h
index 07c13b4..7cfcf63 100644
--- a/slirp/slirp.h
+++ b/slirp/slirp.h
@@ -26,28 +26,10 @@ typedef char *caddr_t;
#endif
-#ifdef HAVE_UNISTD_H
-#endif
-
-#ifdef HAVE_STDLIB_H
-#endif
-
-
#ifndef HAVE_MEMMOVE
#define memmove(x, y, z) bcopy(y, x, z)
#endif
-#if TIME_WITH_SYS_TIME
-#else
-# ifdef HAVE_SYS_TIME_H
-# else
-# endif
-#endif
-
-#ifdef HAVE_STRING_H
-#else
-#endif
-
#ifndef _WIN32
#include <sys/uio.h>
#endif
@@ -98,12 +80,6 @@ void free(void *ptr);
#include <ppp/slirppp.h>
#endif
-#ifdef __STDC__
-#else
-#include <varargs.h>
-#endif
-
-
/* Avoid conflicting with the libc insque() and remque(), which
have different prototypes. */
#define insque slirp_insque
--
1.9.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [PATCH 1/4] slirp/slirp.h: Remove now-empty #ifdefs
2016-02-23 14:18 ` [Qemu-devel] [PATCH 1/4] slirp/slirp.h: Remove now-empty #ifdefs Peter Maydell
@ 2016-02-23 15:04 ` Eric Blake
2016-02-24 18:58 ` Thomas Huth
1 sibling, 0 replies; 10+ messages in thread
From: Eric Blake @ 2016-02-23 15:04 UTC (permalink / raw)
To: Peter Maydell, qemu-devel; +Cc: patches
[-- Attachment #1: Type: text/plain, Size: 918 bytes --]
On 02/23/2016 07:18 AM, Peter Maydell wrote:
> After automatic cleanup to remove unnecessary #includes of headers that
> osdep.h provides, slirp.h has a few now unnecessary #ifdef/#endif pairs;
> remove them.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> slirp/slirp.h | 24 ------------------------
> 1 file changed, 24 deletions(-)
>
> diff --git a/slirp/slirp.h b/slirp/slirp.h
> index 07c13b4..7cfcf63 100644
> --- a/slirp/slirp.h
> +++ b/slirp/slirp.h
> @@ -26,28 +26,10 @@ typedef char *caddr_t;
> #endif
>
>
> -#ifdef HAVE_UNISTD_H
> -#endif
> -
> -#ifdef HAVE_STDLIB_H
> -#endif
> -
Once these are gone, slirp/slirp_config.h now has dead #defines (these
and others); it ought to be pruned down as well (either here or as
another followup).
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [PATCH 1/4] slirp/slirp.h: Remove now-empty #ifdefs
2016-02-23 14:18 ` [Qemu-devel] [PATCH 1/4] slirp/slirp.h: Remove now-empty #ifdefs Peter Maydell
2016-02-23 15:04 ` Eric Blake
@ 2016-02-24 18:58 ` Thomas Huth
2016-02-24 22:23 ` Peter Maydell
1 sibling, 1 reply; 10+ messages in thread
From: Thomas Huth @ 2016-02-24 18:58 UTC (permalink / raw)
To: Peter Maydell, qemu-devel; +Cc: patches
On 23.02.2016 15:18, Peter Maydell wrote:
> After automatic cleanup to remove unnecessary #includes of headers that
> osdep.h provides, slirp.h has a few now unnecessary #ifdef/#endif pairs;
> remove them.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> slirp/slirp.h | 24 ------------------------
> 1 file changed, 24 deletions(-)
>
> diff --git a/slirp/slirp.h b/slirp/slirp.h
> index 07c13b4..7cfcf63 100644
> --- a/slirp/slirp.h
> +++ b/slirp/slirp.h
...
> @@ -98,12 +80,6 @@ void free(void *ptr);
> #include <ppp/slirppp.h>
> #endif
>
> -#ifdef __STDC__
> -#else
> -#include <varargs.h>
> -#endif
That else branch isn't really empty ... OTOH, QEMU likely does not
compile with a non-STDC-compliant compiler anyway, so I assume this is ok.
Reviewed-by: Thomas Huth <thuth@redhat.com>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [PATCH 1/4] slirp/slirp.h: Remove now-empty #ifdefs
2016-02-24 18:58 ` Thomas Huth
@ 2016-02-24 22:23 ` Peter Maydell
0 siblings, 0 replies; 10+ messages in thread
From: Peter Maydell @ 2016-02-24 22:23 UTC (permalink / raw)
To: Thomas Huth; +Cc: QEMU Developers, Patch Tracking
On 24 February 2016 at 18:58, Thomas Huth <thuth@redhat.com> wrote:
> On 23.02.2016 15:18, Peter Maydell wrote:
>> After automatic cleanup to remove unnecessary #includes of headers that
>> osdep.h provides, slirp.h has a few now unnecessary #ifdef/#endif pairs;
>> remove them.
>>
>> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
>> ---
>> slirp/slirp.h | 24 ------------------------
>> 1 file changed, 24 deletions(-)
>>
>> diff --git a/slirp/slirp.h b/slirp/slirp.h
>> index 07c13b4..7cfcf63 100644
>> --- a/slirp/slirp.h
>> +++ b/slirp/slirp.h
> ...
>> @@ -98,12 +80,6 @@ void free(void *ptr);
>> #include <ppp/slirppp.h>
>> #endif
>>
>> -#ifdef __STDC__
>> -#else
>> -#include <varargs.h>
>> -#endif
>
> That else branch isn't really empty ... OTOH, QEMU likely does not
> compile with a non-STDC-compliant compiler anyway, so I assume this is ok.
Indeed.
> Reviewed-by: Thomas Huth <thuth@redhat.com>
Thanks.
-- PMM
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Qemu-devel] [PATCH 2/4] include/config.h: Remove
2016-02-23 14:18 [Qemu-devel] [PATCH 0/4] post-include-cleanup followups Peter Maydell
2016-02-23 14:18 ` [Qemu-devel] [PATCH 1/4] slirp/slirp.h: Remove now-empty #ifdefs Peter Maydell
@ 2016-02-23 14:18 ` Peter Maydell
2016-02-23 14:18 ` [Qemu-devel] [PATCH 3/4] update-linux-headers.sh: Fake types.h doesn't need to include anything Peter Maydell
` (3 subsequent siblings)
5 siblings, 0 replies; 10+ messages in thread
From: Peter Maydell @ 2016-02-23 14:18 UTC (permalink / raw)
To: qemu-devel; +Cc: patches
include/config.h just includes config-target.h (and used to also
include config-host.h).
It is now obsolete and unused, because osdep.h does this job, so
remove it.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
include/config.h | 1 -
scripts/clean-includes | 1 -
2 files changed, 2 deletions(-)
delete mode 100644 include/config.h
diff --git a/include/config.h b/include/config.h
deleted file mode 100644
index 992d761..0000000
--- a/include/config.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "config-target.h"
diff --git a/scripts/clean-includes b/scripts/clean-includes
index d2dd7ae..8a3f398 100755
--- a/scripts/clean-includes
+++ b/scripts/clean-includes
@@ -99,7 +99,6 @@ for f in "$@"; do
;;
*include/qemu/osdep.h | \
*include/qemu/compiler.h | \
- *include/config.h | \
*include/standard-headers/ )
# Removing include lines from osdep.h itself would be counterproductive.
echo "SKIPPING $f (special case header)"
--
1.9.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [Qemu-devel] [PATCH 3/4] update-linux-headers.sh: Fake types.h doesn't need to include anything
2016-02-23 14:18 [Qemu-devel] [PATCH 0/4] post-include-cleanup followups Peter Maydell
2016-02-23 14:18 ` [Qemu-devel] [PATCH 1/4] slirp/slirp.h: Remove now-empty #ifdefs Peter Maydell
2016-02-23 14:18 ` [Qemu-devel] [PATCH 2/4] include/config.h: Remove Peter Maydell
@ 2016-02-23 14:18 ` Peter Maydell
2016-02-23 14:18 ` [Qemu-devel] [PATCH 4/4] util/base64.c: Clean includes Peter Maydell
` (2 subsequent siblings)
5 siblings, 0 replies; 10+ messages in thread
From: Peter Maydell @ 2016-02-23 14:18 UTC (permalink / raw)
To: qemu-devel; +Cc: patches
We have a fake linux/types.h which we create in update-linux-headers.h.
Now that every QEMU source file includes osdep.h, this fake header
doesn't need to include anything at all.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
| 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--git a/scripts/update-linux-headers.sh b/scripts/update-linux-headers.sh
index ff5b0c7..0623eb4 100755
--- a/scripts/update-linux-headers.sh
+++ b/scripts/update-linux-headers.sh
@@ -136,8 +136,9 @@ for i in "$tmpdir"/include/linux/*virtio*.h "$tmpdir/include/linux/input.h" \
done
cat <<EOF >$output/include/standard-headers/linux/types.h
-#include <stdint.h>
-#include "qemu/compiler.h"
+/* For QEMU all types are already defined via osdep.h, so this
+ * header does not need to do anything.
+ */
EOF
cat <<EOF >$output/include/standard-headers/linux/if_ether.h
#define ETH_ALEN 6
--
1.9.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [Qemu-devel] [PATCH 4/4] util/base64.c: Clean includes
2016-02-23 14:18 [Qemu-devel] [PATCH 0/4] post-include-cleanup followups Peter Maydell
` (2 preceding siblings ...)
2016-02-23 14:18 ` [Qemu-devel] [PATCH 3/4] update-linux-headers.sh: Fake types.h doesn't need to include anything Peter Maydell
@ 2016-02-23 14:18 ` Peter Maydell
2016-02-23 15:05 ` [Qemu-devel] [PATCH 0/4] post-include-cleanup followups Eric Blake
2016-03-16 12:49 ` Peter Maydell
5 siblings, 0 replies; 10+ messages in thread
From: Peter Maydell @ 2016-02-23 14:18 UTC (permalink / raw)
To: qemu-devel; +Cc: patches
Remove unnecessary include of config-host.h.
(This was missed by the clean-includes script because of the
incorrect use of <> for a QEMU header.)
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
util/base64.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/util/base64.c b/util/base64.c
index 8aa2a5b..d4bf2a6 100644
--- a/util/base64.c
+++ b/util/base64.c
@@ -19,8 +19,6 @@
*/
#include "qemu/osdep.h"
-#include <config-host.h>
-
#include "qemu/base64.h"
static const char *base64_valid_chars =
--
1.9.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [PATCH 0/4] post-include-cleanup followups
2016-02-23 14:18 [Qemu-devel] [PATCH 0/4] post-include-cleanup followups Peter Maydell
` (3 preceding siblings ...)
2016-02-23 14:18 ` [Qemu-devel] [PATCH 4/4] util/base64.c: Clean includes Peter Maydell
@ 2016-02-23 15:05 ` Eric Blake
2016-03-16 12:49 ` Peter Maydell
5 siblings, 0 replies; 10+ messages in thread
From: Eric Blake @ 2016-02-23 15:05 UTC (permalink / raw)
To: Peter Maydell, qemu-devel; +Cc: patches
[-- Attachment #1: Type: text/plain, Size: 1062 bytes --]
On 02/23/2016 07:18 AM, Peter Maydell wrote:
> Four minor patches which fix some minor things missed by
> the big automated-script patchsets. None of these cause
> a problem, since they're all "thing included that doesn't
> need to be included" rather than "missing needed include".
>
> thanks
> -- PMM
>
> Peter Maydell (4):
> slirp/slirp.h: Remove now-empty #ifdefs
> include/config.h: Remove
> update-linux-headers.sh: Fake types.h doesn't need to include anything
> util/base64.c: Clean includes
Series:
Reviewed-by: Eric Blake <eblake@redhat.com>
but see comment on 1/4
>
> include/config.h | 1 -
> scripts/clean-includes | 1 -
> scripts/update-linux-headers.sh | 5 +++--
> slirp/slirp.h | 24 ------------------------
> util/base64.c | 2 --
> 5 files changed, 3 insertions(+), 30 deletions(-)
> delete mode 100644 include/config.h
>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [PATCH 0/4] post-include-cleanup followups
2016-02-23 14:18 [Qemu-devel] [PATCH 0/4] post-include-cleanup followups Peter Maydell
` (4 preceding siblings ...)
2016-02-23 15:05 ` [Qemu-devel] [PATCH 0/4] post-include-cleanup followups Eric Blake
@ 2016-03-16 12:49 ` Peter Maydell
5 siblings, 0 replies; 10+ messages in thread
From: Peter Maydell @ 2016-03-16 12:49 UTC (permalink / raw)
To: QEMU Developers; +Cc: Patch Tracking
On 23 February 2016 at 14:18, Peter Maydell <peter.maydell@linaro.org> wrote:
> Four minor patches which fix some minor things missed by
> the big automated-script patchsets. None of these cause
> a problem, since they're all "thing included that doesn't
> need to be included" rather than "missing needed include".
Just noticed this patchset got lost -- will apply to master directly.
thanks
-- PMM
^ permalink raw reply [flat|nested] 10+ messages in thread