public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: Samuel Thibault <samuel.thibault@ens-lyon.org>
Cc: libc-alpha@sourceware.org
Subject: Re: [PATCH,hurd] Fix arbitrary error code
Date: Tue, 12 Apr 2022 11:53:01 +0200	[thread overview]
Message-ID: <87h76yhblu.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <20220412094434.nqpydlozpprrkg6r@begin> (Samuel Thibault's message of "Tue, 12 Apr 2022 11:44:34 +0200")

* Samuel Thibault:

> ELIBBAD is Linux-specific, Hurd has EGRATUITOUS instead.
>
> diff --git a/nss/nss_test_errno.c b/nss/nss_test_errno.c
> index 680f8a07b9..d27368f4f3 100644
> --- a/nss/nss_test_errno.c
> +++ b/nss/nss_test_errno.c
> @@ -28,7 +28,13 @@ static void __attribute__ ((constructor))
>  init (void)
>  {
>    /* An arbitrary error code which is otherwise not used.  */
> +#if defined(__linux__)
>    errno = ELIBBAD;
> +#elif defined(__GNU__)
> +  errno = EGRATUITOUS;
> +#else
> +#error missing arbitrary error code
> +#endif
>  }
>  
>  /* Lookup functions for pwd follow that do not return any data.  */

I don't see a build failure because of this?

Maybe we can pick another shared error code?

Related question: Would it be possible to add ELIBEXEC to Hurd some day?

Thanks,
Florian


  reply	other threads:[~2022-04-12  9:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-12  9:44 Samuel Thibault
2022-04-12  9:53 ` Florian Weimer [this message]
2022-04-12  9:57   ` Samuel Thibault
2022-04-12 10:31     ` Florian Weimer
2022-04-12 20:18       ` Samuel Thibault
2022-04-12 20:45     ` Samuel Thibault

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87h76yhblu.fsf@oldenburg.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=libc-alpha@sourceware.org \
    --cc=samuel.thibault@ens-lyon.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).