opcodes: d10v: simplify header includes

Message ID 20211031091412.23983-1-vapier@gentoo.org
State New
Headers show
Series
  • opcodes: d10v: simplify header includes
Related show

Commit Message

Mike Frysinger via Binutils Oct. 31, 2021, 9:14 a.m.
This file doesn't use anything from bfd (sysdep.h), so drop that
include.  This avoids an implicit dependency on the generated
config.h which can be problematic for build-time tools.

Also swap stdio.h for stddef.h.  This file isn't doing or using
any I/O structures, but it does need NULL.
---
 opcodes/d10v-opc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

-- 
2.33.0

Comments

Mike Frysinger via Binutils Nov. 3, 2021, 1:04 a.m. | #1
On Sun, Oct 31, 2021 at 05:14:12AM -0400, Mike Frysinger via Binutils wrote:
> This file doesn't use anything from bfd (sysdep.h), so drop that

> include.  This avoids an implicit dependency on the generated

> config.h which can be problematic for build-time tools.

> 

> Also swap stdio.h for stddef.h.  This file isn't doing or using

> any I/O structures, but it does need NULL.


OK, thanks.

-- 
Alan Modra
Australia Development Lab, IBM

Patch

diff --git a/opcodes/d10v-opc.c b/opcodes/d10v-opc.c
index c68fc6878a26..f87a0779b898 100644
--- a/opcodes/d10v-opc.c
+++ b/opcodes/d10v-opc.c
@@ -19,8 +19,7 @@ 
    Software Foundation, 51 Franklin Street - Fifth Floor, Boston,
    MA 02110-1301, USA.  */
 
-#include "sysdep.h"
-#include <stdio.h>
+#include <stddef.h>
 #include "opcode/d10v.h"