diff mbox

[COMMITTED] resolv: Remove _LIBC conditionals

Message ID 57222BCF.1060007@redhat.com
State New
Headers show

Commit Message

Florian Weimer April 28, 2016, 3:27 p.m. UTC
On 04/28/2016 04:16 PM, Joseph Myers wrote:
> On Thu, 28 Apr 2016, Florian Weimer wrote:
>
>> -#ifdef _LIBC
>>   # include <endian.h>
>>   # include <stdint.h>
>>   # include <stdlib.h>
>>   # include <limits.h>
>>   # include <errno.h>
>> -#endif
>
> In cases such as this you need to update the preprocessor indentation
> inside the removed conditionals.

Right, I fixed up only some cases.  The attached patch addresses the 
remaining ones.

> I presume all these patches have been tested not to change the generated
> code unless line numbers in assertions are involved.

Yes, the series as whole did not change object code, except for line 
numbers in asserts.

Florian
diff mbox

Patch

2016-04-28  Florian Weimer  <fweimer@redhat.com>

	* resolv/inet_addr.c: Reindent preprocessor conditionals.
	* resolv/res_init.c: Likewise.
	* resolv/res_mkquery.c: Likewise.

diff --git a/resolv/inet_addr.c b/resolv/inet_addr.c
index 10d9a1e..022f7ea 100644
--- a/resolv/inet_addr.c
+++ b/resolv/inet_addr.c
@@ -72,11 +72,11 @@ 
 
 #include <ctype.h>
 
-# include <endian.h>
-# include <stdint.h>
-# include <stdlib.h>
-# include <limits.h>
-# include <errno.h>
+#include <endian.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <limits.h>
+#include <errno.h>
 
 /*
  * Ascii internet address interpretation routine.
diff --git a/resolv/res_init.c b/resolv/res_init.c
index 915a70a..cea4c8a 100644
--- a/resolv/res_init.c
+++ b/resolv/res_init.c
@@ -542,7 +542,7 @@  res_nclose(res_state statp)
 }
 libc_hidden_def (__res_nclose)
 
-# ifdef _LIBC_REENTRANT
+#ifdef _LIBC_REENTRANT
 /* This is called when a thread is exiting to free resources held in _res.  */
 static void __attribute__ ((section ("__libc_thread_freeres_fn")))
 res_thread_freeres (void)
@@ -558,4 +558,4 @@  res_thread_freeres (void)
 }
 text_set_element (__libc_thread_subfreeres, res_thread_freeres);
 text_set_element (__libc_subfreeres, res_thread_freeres);
-# endif
+#endif
diff --git a/resolv/res_mkquery.c b/resolv/res_mkquery.c
index 9a11d16..12f9730 100644
--- a/resolv/res_mkquery.c
+++ b/resolv/res_mkquery.c
@@ -77,11 +77,11 @@ 
 /* Options.  Leave them on. */
 /* #define DEBUG */
 
-# include <hp-timing.h>
-# include <stdint.h>
-# if HP_TIMING_AVAIL
-#  define RANDOM_BITS(Var) { uint64_t v64; HP_TIMING_NOW (v64); Var = v64; }
-# endif
+#include <hp-timing.h>
+#include <stdint.h>
+#if HP_TIMING_AVAIL
+# define RANDOM_BITS(Var) { uint64_t v64; HP_TIMING_NOW (v64); Var = v64; }
+#endif
 
 /*
  * Form all types of queries.