* [PATCH] Include <string.h> to dis-asm.h to get strchr declaration
@ 2019-01-11 9:47 Павел Крюков
2019-01-14 21:45 ` Simon Marchi
0 siblings, 1 reply; 5+ messages in thread
From: Павел Крюков @ 2019-01-11 9:47 UTC (permalink / raw)
To: gdb-patches
Include <string.h> to dis-asm.h to get strchr declaration
include/Changelog:
2019-01-11 Pavel I. Kryukov <kryukov@frtk.ru>
* dis-asm.h: include <string.h>
diff --git a/include/dis-asm.h b/include/dis-asm.h
index 77b9e61..02c7214 100644
--- a/include/dis-asm.h
+++ b/include/dis-asm.h
@@ -32,6 +32,7 @@ extern "C" {
#endif
#include <stdio.h>
+#include <string.h>
#include "bfd.h"
typedef int (*fprintf_ftype) (void *, const char*, ...)
ATTRIBUTE_FPTR_PRINTF_2;
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Include <string.h> to dis-asm.h to get strchr declaration
2019-01-11 9:47 [PATCH] Include <string.h> to dis-asm.h to get strchr declaration Павел Крюков
@ 2019-01-14 21:45 ` Simon Marchi
2019-01-15 14:01 ` Nick Clifton
0 siblings, 1 reply; 5+ messages in thread
From: Simon Marchi @ 2019-01-14 21:45 UTC (permalink / raw)
To: Павел
Крюков
Cc: gdb-patches, binutils
On 2019-01-11 04:47, Ðавел ÐÑÑков wrote:
> Include <string.h> to dis-asm.h to get strchr declaration
>
> include/Changelog:
> 2019-01-11 Pavel I. Kryukov <kryukov@frtk.ru>
>
> * dis-asm.h: include <string.h>
>
> diff --git a/include/dis-asm.h b/include/dis-asm.h
> index 77b9e61..02c7214 100644
> --- a/include/dis-asm.h
> +++ b/include/dis-asm.h
> @@ -32,6 +32,7 @@ extern "C" {
> #endif
>
> #include <stdio.h>
> +#include <string.h>
> #include "bfd.h"
>
> typedef int (*fprintf_ftype) (void *, const char*, ...)
> ATTRIBUTE_FPTR_PRINTF_2;
[Adding binutils@ in CC.]
I took the liberty of pushing this patch which touches code in include/,
since it seemed obvious enough to me.
Simon
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Include <string.h> to dis-asm.h to get strchr declaration
2019-01-14 21:45 ` Simon Marchi
@ 2019-01-15 14:01 ` Nick Clifton
2019-01-15 14:14 ` Simon Marchi
0 siblings, 1 reply; 5+ messages in thread
From: Nick Clifton @ 2019-01-15 14:01 UTC (permalink / raw)
To: Simon Marchi,
Павел
Крюков
Cc: gdb-patches, binutils
Hi Simon,
>> Include <string.h> to dis-asm.h to get strchr declaration
>> Â #include <stdio.h>
>> +#include <string.h>
>> Â #include "bfd.h"
> I took the liberty of pushing this patch which touches code in include/, since it seemed obvious enough to me.
Do we need to worry about systems that have <strings.h> rather than <string.h> ?
There are various places in the binutils sources (eg binutils/sysdep.h) which
check for configure macros for these headers, which makes me wonder...
Cheers
Nick
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Include <string.h> to dis-asm.h to get strchr declaration
2019-01-15 14:01 ` Nick Clifton
@ 2019-01-15 14:14 ` Simon Marchi
2019-01-15 17:50 ` John Baldwin
0 siblings, 1 reply; 5+ messages in thread
From: Simon Marchi @ 2019-01-15 14:14 UTC (permalink / raw)
To: Nick Clifton
Cc: Павел
Крюков,
gdb-patches, binutils
On 2019-01-15 09:01, Nick Clifton wrote:
> Hi Simon,
>
>>> Include <string.h> to dis-asm.h to get strchr declaration
>
>>> Â #include <stdio.h>
>>> +#include <string.h>
>>> Â #include "bfd.h"
>
>> I took the liberty of pushing this patch which touches code in
>> include/, since it seemed obvious enough to me.
>
> Do we need to worry about systems that have <strings.h> rather than
> <string.h> ?
>
> There are various places in the binutils sources (eg binutils/sysdep.h)
> which
> check for configure macros for these headers, which makes me wonder...
From what I understand, these systems (BSDs, mostly) have strings.h in
addition to string.h, where strings.h provide additional, non-standard
functions. But strchr would still be found in string.h.
Simon
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Include <string.h> to dis-asm.h to get strchr declaration
2019-01-15 14:14 ` Simon Marchi
@ 2019-01-15 17:50 ` John Baldwin
0 siblings, 0 replies; 5+ messages in thread
From: John Baldwin @ 2019-01-15 17:50 UTC (permalink / raw)
To: Simon Marchi, Nick Clifton
Cc: Павел
Крюков,
gdb-patches, binutils
On 1/15/19 6:14 AM, Simon Marchi wrote:
> On 2019-01-15 09:01, Nick Clifton wrote:
>> Hi Simon,
>>
>>>> Include <string.h> to dis-asm.h to get strchr declaration
>>
>>>> Â #include <stdio.h>
>>>> +#include <string.h>
>>>> Â #include "bfd.h"
>>
>>> I took the liberty of pushing this patch which touches code in
>>> include/, since it seemed obvious enough to me.
>>
>> Do we need to worry about systems that have <strings.h> rather than
>> <string.h> ?
>>
>> There are various places in the binutils sources (eg binutils/sysdep.h)
>> which
>> check for configure macros for these headers, which makes me wonder...
>
> From what I understand, these systems (BSDs, mostly) have strings.h in
> addition to string.h, where strings.h provide additional, non-standard
> functions. But strchr would still be found in string.h.
Yes, that is true on both FreeBSD and OS X at least (both of which have
<strings.h>). On those, <strings.h> defines prototypes for things like
bzero() and bcmp().
--
John Baldwin
                                                                           Â
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-01-15 17:50 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-11 9:47 [PATCH] Include <string.h> to dis-asm.h to get strchr declaration Павел Крюков
2019-01-14 21:45 ` Simon Marchi
2019-01-15 14:01 ` Nick Clifton
2019-01-15 14:14 ` Simon Marchi
2019-01-15 17:50 ` John Baldwin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).