public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Zack Weinberg <zackw@panix.com>
To: Florian Weimer <fweimer@redhat.com>
Cc: GNU C Library <libc-alpha@sourceware.org>,
	"Carlos O'Donell" <carlos@redhat.com>,
	 Nikos Mavrogiannopoulos <nmav@redhat.com>
Subject: Re: [PATCH] New configure option --disable-libcrypt.
Date: Mon, 16 Apr 2018 15:56:00 -0000	[thread overview]
Message-ID: <CAKCAbMgbEBd1beqZ-UrVXW0T51LpL-n5i2YQwmHVS0x51X1vVw@mail.gmail.com> (raw)
In-Reply-To: <f29b7ad6-854c-3bda-2ad1-4905659c86d3@redhat.com>

On Mon, Apr 16, 2018 at 11:10 AM, Florian Weimer <fweimer@redhat.com> wrote:
> On 04/16/2018 03:36 AM, Zack Weinberg wrote:
>>
>> diff --git a/elf/tst-linkall-static.c b/elf/tst-linkall-static.c
>> index e8df38f74e..0ffae7c723 100644
>> --- a/elf/tst-linkall-static.c
>> +++ b/elf/tst-linkall-static.c
>> @@ -18,7 +18,9 @@
>>     #include <math.h>
>>   #include <pthread.h>
>> +#if USE_CRYPT
>>   #include <crypt.h>
>> +#endif
>
> The #include should be indented.

Will fix.

>> +/* The X/Open Encryption Option Group may or may not be supported in
>> +   this release of the GNU C Library.  */
>> +#include <bits/unistd-crypt.h>
>
> Based on the Fedora experience, I wonder if it's not best to keep support
> _XOPEN_CRYPT unconditionally.  GCC still supports implicit function
> definitions by default and coerces the implied int return type to a pointer
> value.
...
> From a developer perspective, it would avoid a bit of hassle if we just said
> that if a distribution builds with --disable-libcrypt, it still needs to
> supply a compatible libcrypt with a definition of crypt and a default symbol
> version.
>
> With encrypt and setkey, the situation is less pronounced because these
> functions are obsolete, and we can produce link errors if developers use
> them.

Let me see if I understand what you have in mind:  In
--disable-libcrypt mode, we would preserve _XOPEN_CRYPT, with value 1,
and the prototype for crypt in unistd.h.  We would also preserve the
prototypes for encrypt and setkey, but maybe with
__attribute__((deprecated)).  We just wouldn't provide crypt.h or
libcrypt.  It's not a conformance violation for us to continue
defining _XOPEN_CRYPT as 1 because, as long as you get libcrypt from
_somewhere_, it will work at runtime.  Is that right?

I like this plan because it means the patch doesn't have to touch Makerules :)

zw

p.s. Maybe someone with the ability to file Austin Group defect
reports or interpretation requests or whatever they're called should
request the formal deprecation of encrypt and setkey?

  reply	other threads:[~2018-04-16 15:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-16  1:36 Zack Weinberg
2018-04-16 15:11 ` Florian Weimer
2018-04-16 15:56   ` Zack Weinberg [this message]
2018-04-16 18:41     ` Zack Weinberg
2018-04-17 10:21     ` Florian Weimer
2018-04-18 13:43       ` Zack Weinberg

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=CAKCAbMgbEBd1beqZ-UrVXW0T51LpL-n5i2YQwmHVS0x51X1vVw@mail.gmail.com \
    --to=zackw@panix.com \
    --cc=carlos@redhat.com \
    --cc=fweimer@redhat.com \
    --cc=libc-alpha@sourceware.org \
    --cc=nmav@redhat.com \
    /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).