[PATCH 4/9] Move internal err, error, and argp prototypes under !_ISOMAC

Carlos O'Donell carlos@redhat.com
Mon Nov 2 16:58:56 GMT 2026


On 10/21/26 9:54 AM, Adhemerval Zanella wrote:
> The include/err.h, include/error.h, and include/argp.h wrappers declare
> the internal __*_internal functions even when _ISOMAC is defined.
> 
> Move them, along with the <stdarg.h> inclusion they require, into the
> !_ISOMAC block.
> 
> Checked on aarch64-linux-gnu.

LGTM.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>

> ---
>   include/argp.h  | 2 +-
>   include/err.h   | 4 ++--
>   include/error.h | 3 +++
>   3 files changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/include/argp.h b/include/argp.h
> index 7077471d990..e7498872e39 100644
> --- a/include/argp.h
> +++ b/include/argp.h
> @@ -1,6 +1,7 @@
>   #ifndef _ARGP_H
>   #include <argp/argp.h>
>   
> +#ifndef _ISOMAC
>   /* Prototypes for internal argp.h functions.  */
>   #include <stdarg.h>
>   void
> @@ -12,7 +13,6 @@ __argp_failure_internal (const struct argp_state *state, int status,
>   			 int errnum, const char *fmt, va_list ap,
>   			 unsigned int mode_flags);
>   
> -#ifndef _ISOMAC

OK.

>   extern __typeof (__argp_error) __argp_error attribute_hidden;
>   extern __typeof (__argp_failure) __argp_failure attribute_hidden;
>   extern __typeof (__argp_input) __argp_input attribute_hidden;
> diff --git a/include/err.h b/include/err.h
> index b9b7516287b..f6c26477b7b 100644
> --- a/include/err.h
> +++ b/include/err.h
> @@ -1,6 +1,8 @@
>   #ifndef _ERR_H
>   #include <misc/err.h>
>   
> +# ifndef _ISOMAC
> +
>   /* Prototypes for internal err.h functions.  */
>   void
>   __vwarnx_internal (const char *format, __gnuc_va_list ap,
> @@ -10,8 +12,6 @@ void
>   __vwarn_internal (const char *format, __gnuc_va_list ap,
>   		   unsigned int mode_flags);
>   
> -# ifndef _ISOMAC
> -

OK.

>   libc_hidden_ldbl_proto (warn)
>   libc_hidden_ldbl_proto (warnx)
>   libc_hidden_ldbl_proto (vwarn)
> diff --git a/include/error.h b/include/error.h
> index 4db67cba903..7403f758c17 100644
> --- a/include/error.h
> +++ b/include/error.h
> @@ -1,6 +1,8 @@
>   #ifndef _ERROR_H
>   #include <misc/error.h>
>   
> +# ifndef _ISOMAC
> +
>   #include <stdarg.h>
>   
>   void
> @@ -12,4 +14,5 @@ __error_at_line_internal (int status, int errnum, const char *file_name,
>   			  unsigned int line_number, const char *message,
>   			  va_list args, unsigned int mode_flags) __COLD;
>   
> +# endif /* !_ISOMAC */

OK.

>   #endif


-- 
Cheers,
Carlos.



More information about the Libc-alpha mailing list