diff mbox

[1/4] slirp/slirp.h: Remove now-empty #ifdefs

Message ID 1456237112-32662-2-git-send-email-peter.maydell@linaro.org (mailing list archive)
State New, archived
Headers show

Commit Message

Peter Maydell Feb. 23, 2016, 2:18 p.m. UTC
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(-)

Comments

Eric Blake Feb. 23, 2016, 3:04 p.m. UTC | #1
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).
Thomas Huth Feb. 24, 2016, 6:58 p.m. UTC | #2
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>
Peter Maydell Feb. 24, 2016, 10:23 p.m. UTC | #3
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
diff mbox

Patch

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