public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@suse.de>
To: Florian Weimer <fweimer@redhat.com>
Cc: libc-alpha@sourceware.org
Subject: Re: [PATCH 9/7] nss_nis: Use NSS_DECLARE_MODULE_FUNCTIONS
Date: Thu, 13 Feb 2020 09:16:00 -0000	[thread overview]
Message-ID: <mvmftfec0e6.fsf@suse.de> (raw)
In-Reply-To: <875zgadfo5.fsf@oldenburg2.str.redhat.com> (Florian Weimer's message of "Thu, 13 Feb 2020 10:01:30 +0100")

On Feb 13 2020, Florian Weimer wrote:

> diff --git a/nis/nss_nis/nis-hosts.c b/nis/nss_nis/nis-hosts.c
> index 2d08076382..1ee5444cfc 100644
> --- a/nis/nss_nis/nis-hosts.c
> +++ b/nis/nss_nis/nis-hosts.c
> @@ -90,9 +90,16 @@ static bool_t new_start = 1;
>  static char *oldkey = NULL;
>  static int oldkeylen = 0;
>  
> +hidden_proto (_nss_nis_endhostent)
>  
>  enum nss_status
>  _nss_nis_sethostent (int stayopen)
> +{
> +  return _nss_nis_endhostent ();
> +}
> +
> +enum nss_status
> +_nss_nis_endhostent (void)
>  {
>    __libc_lock_lock (lock);
>  
> @@ -108,11 +115,7 @@ _nss_nis_sethostent (int stayopen)
>  
>    return NSS_STATUS_SUCCESS;
>  }
> -/* Make _nss_nis_endhostent an alias of _nss_nis_sethostent.  We do this
> -   even though the prototypes don't match.  The argument of sethostent
> -   is used so this makes no difference.  */
> -strong_alias (_nss_nis_sethostent, _nss_nis_endhostent)
> -
> +hidden_def (_nss_nis_endhostent)

Please also remove the #define/#undef above.

> diff --git a/nis/nss_nis/nis-network.c b/nis/nss_nis/nis-network.c
> index dcafd26148..511de00bd3 100644
> --- a/nis/nss_nis/nis-network.c
> +++ b/nis/nss_nis/nis-network.c
> @@ -45,10 +45,18 @@ static bool_t new_start = 1;
>  static char *oldkey;
>  static int oldkeylen;
>  
> +hidden_proto (_nss_nis_endnetent)
> +
>  enum nss_status
>  _nss_nis_setnetent (int stayopen)
>  {
> -  __libc_lock_lock (lock);
> +  return _nss_nis_endnetent ();
> +}
> +
> +enum nss_status
> +_nss_nis_endnetent (void)
> +{
> +__libc_lock_lock (lock);
>  
>    new_start = 1;
>    if (oldkey != NULL)
> @@ -62,10 +70,7 @@ _nss_nis_setnetent (int stayopen)
>  
>    return NSS_STATUS_SUCCESS;
>  }
> -/* Make _nss_nis_endnetent an alias of _nss_nis_setnetent.  We do this
> -   even though the prototypes don't match.  The argument of setnetent
> -   is not used so this makes no difference.  */
> -strong_alias (_nss_nis_setnetent, _nss_nis_endnetent)
> +hidden_def (_nss_nis_endnetent)

Likewise.

> diff --git a/nis/nss_nis/nis-spwd.c b/nis/nss_nis/nis-spwd.c
> index 6cd46b4022..660447b544 100644
> --- a/nis/nss_nis/nis-spwd.c
> +++ b/nis/nss_nis/nis-spwd.c
> @@ -46,8 +46,16 @@ static bool ent_adjunct_used;
>  static char *oldkey;
>  static int oldkeylen;
>  
> +hidden_proto (_nss_nis_endspent)
> +
>  enum nss_status
>  _nss_nis_setspent (int stayopen)
> +{
> +  return _nss_nis_endspent ();
> +}
> +
> +enum nss_status
> +_nss_nis_endspent (void)
>  {
>    __libc_lock_lock (lock);
>  
> @@ -61,10 +69,7 @@ _nss_nis_setspent (int stayopen)
>  
>    return NSS_STATUS_SUCCESS;
>  }
> -/* Make _nss_nis_endspent an alias of _nss_nis_setspent.  We do this
> -   even though the prototypes don't match.  The argument of setspent
> -   is not used so this makes no difference.  */
> -strong_alias (_nss_nis_setspent, _nss_nis_endspent)
> +hidden_def (_nss_nis_endspent)

Likewise.

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

  reply	other threads:[~2020-02-13  9:16 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-12 14:34 [PATCH 0/7] More type safety for NSS modules Florian Weimer
2020-02-12 14:34 ` [PATCH 5/7] nss_db: Use NSS_DECLARE_MODULE_FUNCTIONS Florian Weimer
2020-02-13  1:18   ` DJ Delorie
2020-02-12 14:34 ` [PATCH 1/7] nss_compat: Do not use nss_* names for function pointers Florian Weimer
2020-02-12 22:36   ` DJ Delorie
2020-02-12 14:34 ` [PATCH 4/7] nss_compat: Use NSS_DECLARE_MODULE_FUNCTIONS Florian Weimer
2020-02-13  1:14   ` DJ Delorie
2020-02-12 14:34 ` [PATCH 2/7] nss: Add function types and NSS_DECLARE_MODULE_FUNCTIONS macro to <nss.h> Florian Weimer
2020-02-13  1:10   ` DJ Delorie
2020-02-12 14:35 ` [PATCH 7/7] nss_dns: Use NSS_DECLARE_MODULE_FUNCTIONS Florian Weimer
2020-02-13  1:19   ` DJ Delorie
2020-02-12 14:35 ` [PATCH 6/7] nss_files: " Florian Weimer
2020-02-13  1:26   ` DJ Delorie
2020-02-13  8:12     ` Florian Weimer
2020-02-12 14:35 ` [PATCH 3/7] nss_hesiod: " Florian Weimer
2020-02-13  1:11   ` DJ Delorie
2020-02-12 14:39 ` [PATCH 8/7] nss_nisplus: " Florian Weimer
2020-02-13  1:31   ` DJ Delorie
2020-02-13  8:11     ` Florian Weimer
2020-02-13  9:01 ` [PATCH 9/7] nss_nis: " Florian Weimer
2020-02-13  9:16   ` Andreas Schwab [this message]
2020-02-13  9:21   ` Andreas Schwab
2020-02-13  9:32     ` Florian Weimer
2020-02-13  9:38       ` Andreas Schwab
2020-02-25 14:50         ` Florian Weimer
2020-02-25 15:09           ` Andreas Schwab
2020-02-25 16:10             ` Florian Weimer
2020-02-25 16:41               ` Andreas Schwab
2020-02-25 16:44                 ` Florian Weimer

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=mvmftfec0e6.fsf@suse.de \
    --to=schwab@suse.de \
    --cc=fweimer@redhat.com \
    --cc=libc-alpha@sourceware.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).