[PATCH v2 10/16] libasm: stdio_ext.h are not present on win32
Mark Wielaard
mark@klomp.org
Thu Feb 23 12:35:48 GMT 2023
Hi,
On Sun, 2022-12-18 at 00:52 +0800, Yonggang Luo via Elfutils-devel
wrote:
> Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
> ---
> libasm/asm_begin.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/libasm/asm_begin.c b/libasm/asm_begin.c
> index 9e4dfe43..9b6d974e 100644
> --- a/libasm/asm_begin.c
> +++ b/libasm/asm_begin.c
> @@ -34,10 +34,13 @@
> #include <assert.h>
> #include <errno.h>
> #include <stdio.h>
> -#include <stdio_ext.h>
> #include <stdlib.h>
> #include <string.h>
>
> +#if !defined(_WIN32)
> +#include <stdio_ext.h>
> +#endif
> +
Can we have a configure check instead?
> #include <gelf.h>
> #include "libasmP.h"
>
> @@ -56,8 +59,10 @@ prepare_text_output (AsmCtx_t *result)
> free (result);
> result = NULL;
> }
> +#if !defined(_WIN32)
> else
> __fsetlocking (result->out.file, FSETLOCKING_BYCALLER);
> +#endif
> }
>
> return result;
__fsetlocking is used in a lot of other places.
Cheers,
Mark
More information about the Elfutils-devel
mailing list