All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steve Dickson <SteveD@redhat.com>
To: Nick Alcock <nix@esperi.org.uk>
Cc: linux-nfs@vger.kernel.org, Nick Alcock <nick.alcock@oracle.com>
Subject: Re: [PATCH 1/4] Fix debugging reference from non-GSS to optional GSS code.
Date: Thu, 26 Apr 2012 16:06:31 -0400	[thread overview]
Message-ID: <4F99AAC7.3060709@RedHat.com> (raw)
In-Reply-To: <1328472138-25750-1-git-send-email-nix@esperi.org.uk>



On 02/05/2012 03:02 PM, Nick Alcock wrote:
> From: Nick Alcock <nick.alcock@oracle.com>
> 
> AUTH_DESTROY() and auth_destroy() are pulling in log_debug() from
> authgss_prot.c, but are used from outside the GSS code, thus preventing libtirpc
> from being used if compiled without GSS support.
> 
> The (somewhat ugly) fix here defines a new macro to do the job. Because we're
> not compiling as C99, I use the GNU C variadic macro extension: if we mean to
> be compiled with other compilers, this needs to change.
> 
> Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
> ---
>  tirpc/rpc/auth.h |   11 +++++++++--
>  1 files changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/tirpc/rpc/auth.h b/tirpc/rpc/auth.h
> index 5f66e67..e7bbe36 100644
> --- a/tirpc/rpc/auth.h
> +++ b/tirpc/rpc/auth.h
> @@ -51,6 +51,7 @@
>  #include <sys/cdefs.h>
>  #include <sys/socket.h>
>  #include <sys/types.h>
> +#include <stdio.h>
>  
>  
>  #define MAX_AUTH_BYTES	400
> @@ -248,12 +249,18 @@ auth_put(AUTH *auth)
>  #define auth_refresh(auth, msg)		\
>  		((*((auth)->ah_ops->ah_refresh))(auth, msg))
>  
> +#if defined(__GNUC__) && defined(DEBUG)
> +#define auth_log_debug(fmt,args...) printf(stderr, fmt, args)
> +#else
> +#define auth_log_debug(fmt,args...)
> +#endif
> +
>  #define AUTH_DESTROY(auth)						\
>  		do {							\
>  			int refs;					\
>  			if ((refs = auth_put((auth))) == 0)		\
>  				((*((auth)->ah_ops->ah_destroy))(auth));\
> -			log_debug("%s: auth_put(), refs %d\n",		\
> +			auth_log_debug("%s: auth_put(), refs %d\n",	\
>  				__func__, refs);			\
>  		} while (0)
>  
> @@ -262,7 +269,7 @@ auth_put(AUTH *auth)
>  			int refs;					\
>  			if ((refs = auth_put((auth))) == 0)		\
>  				((*((auth)->ah_ops->ah_destroy))(auth));\
> -			log_debug("%s: auth_put(), refs %d\n",		\
> +			auth_log_debug("%s: auth_put(), refs %d\n",	\
>  				__func__, refs);			\
>  		} while (0)
>  
Committed...

steved.

      parent reply	other threads:[~2012-04-26 20:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-05 20:02 [PATCH 1/4] Fix debugging reference from non-GSS to optional GSS code Nick Alcock
2012-02-05 20:02 ` [PATCH 2/4] Make svc_auth_none always available Nick Alcock
2012-04-26 20:06   ` Steve Dickson
2012-02-05 20:02 ` [PATCH 3/4] No longer require NIS Nick Alcock
2012-04-26 20:07   ` Steve Dickson
2012-02-05 20:02 ` [PATCH 4/4] Fix debugging-related namespace pollution Nick Alcock
2012-04-26 20:07   ` Steve Dickson
2012-04-26 20:06 ` Steve Dickson [this message]

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=4F99AAC7.3060709@RedHat.com \
    --to=steved@redhat.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=nick.alcock@oracle.com \
    --cc=nix@esperi.org.uk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.