gsasl-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU gsasl branch, master, updated. gsasl-1-7-2-17-gd12252d


From: Simon Josefsson
Subject: [SCM] GNU gsasl branch, master, updated. gsasl-1-7-2-17-gd12252d
Date: Tue, 03 Apr 2012 09:11:56 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU gsasl".

http://git.savannah.gnu.org/cgit/gsasl.git/commit/?id=d12252da23b83f21ed4d6be5e7624db700e64ae3

The branch, master has been updated
       via  d12252da23b83f21ed4d6be5e7624db700e64ae3 (commit)
       via  a609ecb1fae4685ef7076bf446fc4c54fec15c01 (commit)
       via  75581089e5e81712f70e65d871da7f41c03a645a (commit)
      from  8c266e8740a8d949caf14c484302e3c68f28c450 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit d12252da23b83f21ed4d6be5e7624db700e64ae3
Author: Simon Josefsson <address@hidden>
Date:   Tue Apr 3 11:10:09 2012 +0200

    Update gnulib files.

commit a609ecb1fae4685ef7076bf446fc4c54fec15c01
Author: Simon Josefsson <address@hidden>
Date:   Tue Apr 3 11:09:54 2012 +0200

    Fix warn_unused_result complaints.

commit 75581089e5e81712f70e65d871da7f41c03a645a
Author: Simon Josefsson <address@hidden>
Date:   Tue Apr 3 11:01:07 2012 +0200

    Indent code.

-----------------------------------------------------------------------

Summary of changes:
 doc/print-errors.c            |   24 ++++++-----
 examples/client-callback.c    |   24 +++++++++--
 examples/client-mech.c        |   25 ++++++++++--
 examples/client-serverfirst.c |    9 +++-
 examples/client-xmpp-saml20.c |    9 ++++-
 examples/client.c             |    9 +++-
 examples/server-xmpp-saml20.c |   19 ++++++--
 gl/Makefile.am                |    1 -
 gl/m4/math_h.m4               |    8 +++-
 gl/m4/stdio_h.m4              |   10 ++---
 gl/m4/warn-on-use.m4          |    6 +-
 gl/m4/warnings.m4             |   19 ++++++---
 gl/stdio.in.h                 |   25 +++--------
 gltests/strerror_r.c          |    3 +-
 lib/anonymous/client.c        |    2 +-
 lib/anonymous/mechinfo.c      |    2 +-
 lib/anonymous/server.c        |    2 +-
 lib/cram-md5/challenge.h      |    4 +-
 lib/cram-md5/client.c         |    2 +-
 lib/cram-md5/digest.c         |    2 +-
 lib/cram-md5/digest.h         |    4 +-
 lib/cram-md5/mechinfo.c       |    2 +-
 lib/cram-md5/server.c         |    2 +-
 lib/digest-md5/client.c       |    2 +-
 lib/digest-md5/digesthmac.c   |    2 +-
 lib/digest-md5/digesthmac.h   |    2 +-
 lib/digest-md5/free.h         |    2 +-
 lib/digest-md5/getsubopt.c    |    2 +-
 lib/digest-md5/mechinfo.c     |    2 +-
 lib/digest-md5/nonascii.c     |    2 +-
 lib/digest-md5/nonascii.h     |    2 +-
 lib/digest-md5/parser.c       |    2 +-
 lib/digest-md5/parser.h       |    2 +-
 lib/digest-md5/printer.c      |    2 +-
 lib/digest-md5/printer.h      |    2 +-
 lib/digest-md5/qop.c          |    2 +-
 lib/digest-md5/qop.h          |    2 +-
 lib/digest-md5/server.c       |    2 +-
 lib/digest-md5/session.c      |    2 +-
 lib/digest-md5/session.h      |    2 +-
 lib/digest-md5/test-parser.c  |    3 +-
 lib/digest-md5/tokens.h       |    2 +-
 lib/digest-md5/validate.c     |    2 +-
 lib/digest-md5/validate.h     |    2 +-
 lib/external/client.c         |    2 +-
 lib/external/mechinfo.c       |    2 +-
 lib/external/server.c         |    2 +-
 lib/gl/Makefile.am            |    1 -
 lib/gl/m4/math_h.m4           |    8 +++-
 lib/gl/m4/stdio_h.m4          |   10 ++---
 lib/gl/m4/warn-on-use.m4      |    6 +-
 lib/gl/stdio.in.h             |   25 +++--------
 lib/gs2/client.c              |    2 +-
 lib/gs2/gs2helper.c           |    2 +-
 lib/gs2/gs2helper.h           |    8 ++--
 lib/gs2/mechinfo.c            |    2 +-
 lib/gs2/server.c              |    2 +-
 lib/gssapi/client.c           |    8 ++--
 lib/gssapi/mechinfo.c         |    2 +-
 lib/gssapi/server.c           |    8 ++--
 lib/login/client.c            |    2 +-
 lib/login/mechinfo.c          |    5 +-
 lib/login/server.c            |    2 +-
 lib/maint.mk                  |    2 +-
 lib/ntlm/mechinfo.c           |    2 +-
 lib/ntlm/ntlm.c               |    2 +-
 lib/openid20/client.c         |   14 +++---
 lib/openid20/mechinfo.c       |    2 +-
 lib/openid20/openid20.h       |   24 ++++++------
 lib/openid20/server.c         |   10 ++--
 lib/plain/client.c            |    2 +-
 lib/plain/mechinfo.c          |    2 +-
 lib/plain/server.c            |    2 +-
 lib/saml20/client.c           |    2 +-
 lib/saml20/mechinfo.c         |    2 +-
 lib/saml20/saml20.h           |    6 +-
 lib/saml20/server.c           |    2 +-
 lib/scram/client.c            |   14 +++----
 lib/scram/mechinfo.c          |   88 ++++++++++++++++++++---------------------
 lib/scram/parser.c            |    4 +-
 lib/scram/parser.h            |    2 +-
 lib/scram/printer.c           |    9 +---
 lib/scram/printer.h           |    2 +-
 lib/scram/scram.h             |   12 ++----
 lib/scram/server.c            |   21 ++++------
 lib/scram/tokens.c            |    8 ++--
 lib/scram/tokens.h            |   10 ++--
 lib/scram/validate.c          |   11 ++---
 lib/scram/validate.h          |    2 +-
 lib/securid/client.c          |    2 +-
 lib/securid/mechinfo.c        |    2 +-
 lib/securid/server.c          |    2 +-
 lib/src/crypto.c              |    2 +-
 lib/src/done.c                |    2 +-
 lib/src/gsasl-compat.h        |   12 +++---
 lib/src/gsasl-mech.h          |    2 +-
 lib/src/gsasl.h               |   62 ++++++++++++++--------------
 lib/src/internal.h            |   18 ++++----
 lib/src/mechtools.c           |    4 +-
 lib/src/mechtools.h           |    9 ++--
 lib/src/obsolete.c            |    9 ++--
 lib/src/property.c            |    4 +-
 lib/src/saslprep.c            |   10 ++--
 maint.mk                      |    2 +-
 src/callbacks.c               |    2 +-
 src/gsasl.c                   |   37 +++++++++--------
 src/imap.c                    |    4 +-
 src/internal.h                |    8 ++--
 src/smtp.c                    |    2 +-
 tests/cram-md5.c              |    6 +-
 tests/crypto.c                |   14 +++---
 tests/digest-md5.c            |   15 +++----
 tests/errors.c                |   28 +++++++------
 tests/external.c              |    6 +-
 tests/gs2-krb5.c              |    8 ++--
 tests/gssapi.c                |    2 +-
 tests/md5file.c               |    2 +-
 tests/name.c                  |    2 +-
 tests/old-base64.c            |    2 +-
 tests/old-cram-md5.c          |    6 +-
 tests/old-digest-md5.c        |   10 ++--
 tests/old-gssapi.c            |    2 +-
 tests/old-md5file.c           |    2 +-
 tests/old-simple.c            |    8 ++--
 tests/readnz.c                |    5 +-
 tests/saml20.c                |   10 ++--
 tests/scram.c                 |   12 +++---
 tests/scramplus.c             |   14 +++---
 tests/simple.c                |   33 +++++++++------
 tests/suggest.c               |    2 +-
 tests/symbols.c               |   14 ++++--
 tests/utils.c                 |    2 +-
 tests/utils.h                 |    8 ++--
 133 files changed, 532 insertions(+), 488 deletions(-)

diff --git a/doc/print-errors.c b/doc/print-errors.c
index 6397950..175892a 100644
--- a/doc/print-errors.c
+++ b/doc/print-errors.c
@@ -19,7 +19,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 #include <stdio.h>
@@ -39,20 +39,22 @@ main (void)
   printf ("@c This file is automatically generated.  DO NOT EDIT!\n");
   printf ("@c Instead, edit print-errors.c and re-run.\n");
 
-  do {
-    last = this;
+  do
+    {
+      last = this;
 
-    this = gsasl_strerror (i);
-    name = gsasl_strerror_name (i);
+      this = gsasl_strerror (i);
+      name = gsasl_strerror_name (i);
 
-    if (name != NULL)
-      printf ("address@hidden @code{%s}\n%s\n", name, this);
+      if (name != NULL)
+       printf ("address@hidden @code{%s}\n%s\n", name, this);
 
-    if (this == NULL)
-      return EXIT_FAILURE;
+      if (this == NULL)
+       return EXIT_FAILURE;
 
-    i++;
-  } while (this != last);
+      i++;
+    }
+  while (this != last);
 
   return EXIT_SUCCESS;
 }
diff --git a/examples/client-callback.c b/examples/client-callback.c
index 54ab8b9..04b2b4c 100644
--- a/examples/client-callback.c
+++ b/examples/client-callback.c
@@ -37,7 +37,12 @@ client_authenticate (Gsasl_session * session)
   do
     {
       printf ("Input base64 encoded data from server:\n");
-      fgets (buf, sizeof (buf) - 1, stdin);
+      p = fgets (buf, sizeof (buf) - 1, stdin);
+      if (p == NULL)
+       {
+         perror ("fgets");
+         return;
+       }
       if (buf[strlen (buf) - 1] == '\n')
         buf[strlen (buf) - 1] = '\0';
 
@@ -46,7 +51,7 @@ client_authenticate (Gsasl_session * session)
       if (rc == GSASL_NEEDS_MORE || rc == GSASL_OK)
         {
           printf ("Output:\n%s\n", p);
-          free (p);
+          gsasl_free (p);
         }
     }
   while (rc == GSASL_NEEDS_MORE);
@@ -91,6 +96,7 @@ callback (Gsasl * ctx, Gsasl_session * sctx, Gsasl_property 
prop)
 {
   char buf[BUFSIZ] = "";
   int rc = GSASL_NO_CALLBACK;
+  char *p;
 
   /* Get user info from user. */
 
@@ -100,7 +106,12 @@ callback (Gsasl * ctx, Gsasl_session * sctx, 
Gsasl_property prop)
     {
     case GSASL_PASSCODE:
       printf ("Enter passcode:\n");
-      fgets (buf, sizeof (buf) - 1, stdin);
+      p = fgets (buf, sizeof (buf) - 1, stdin);
+      if (p == NULL)
+       {
+         perror ("fgets");
+         break;
+       }
       buf[strlen (buf) - 1] = '\0';
 
       gsasl_property_set (sctx, GSASL_PASSCODE, buf);
@@ -109,7 +120,12 @@ callback (Gsasl * ctx, Gsasl_session * sctx, 
Gsasl_property prop)
 
     case GSASL_AUTHID:
       printf ("Enter username:\n");
-      fgets (buf, sizeof (buf) - 1, stdin);
+      p = fgets (buf, sizeof (buf) - 1, stdin);
+      if (p == NULL)
+       {
+         perror ("fgets");
+         break;
+       }
       buf[strlen (buf) - 1] = '\0';
 
       gsasl_property_set (sctx, GSASL_AUTHID, buf);
diff --git a/examples/client-mech.c b/examples/client-mech.c
index c95ed82..e29e7dc 100644
--- a/examples/client-mech.c
+++ b/examples/client-mech.c
@@ -37,7 +37,12 @@ client_authenticate (Gsasl_session * session)
   do
     {
       printf ("Input base64 encoded data from server:\n");
-      fgets (buf, sizeof (buf) - 1, stdin);
+      p = fgets (buf, sizeof (buf) - 1, stdin);
+      if (p == NULL)
+       {
+         perror ("fgets");
+         return;
+       }
       if (buf[strlen (buf) - 1] == '\n')
         buf[strlen (buf) - 1] = '\0';
 
@@ -46,7 +51,7 @@ client_authenticate (Gsasl_session * session)
       if (rc == GSASL_NEEDS_MORE || rc == GSASL_OK)
         {
           printf ("Output:\n%s\n", p);
-          free (p);
+          gsasl_free (p);
         }
     }
   while (rc == GSASL_NEEDS_MORE);
@@ -71,16 +76,28 @@ client_mechanism (Gsasl * ctx)
   static char mech[GSASL_MAX_MECHANISM_SIZE + 1] = "";
   char mechlist[BUFSIZ] = "";
   const char *suggestion;
+  char *p;
 
   printf ("Enter list of server supported mechanisms, separate by SPC:\n");
-  fgets (mechlist, sizeof (mechlist) - 1, stdin);
+  p = fgets (mechlist, sizeof (mechlist) - 1, stdin);
+  if (p == NULL)
+    {
+      perror ("fgets");
+      return NULL;
+    }
 
   suggestion = gsasl_client_suggest_mechanism (ctx, mechlist);
   if (suggestion)
     printf ("Library suggests use of `%s'.\n", suggestion);
 
   printf ("Enter mechanism to use:\n");
-  fgets (mech, sizeof (mech) - 1, stdin);
+  p = fgets (mech, sizeof (mech) - 1, stdin);
+  if (p == NULL)
+    {
+      perror ("fgets");
+      return NULL;
+    }
+
   mech[strlen (mech) - 1] = '\0';
 
   return mech;
diff --git a/examples/client-serverfirst.c b/examples/client-serverfirst.c
index f322175..0a3ac9a 100644
--- a/examples/client-serverfirst.c
+++ b/examples/client-serverfirst.c
@@ -37,7 +37,12 @@ client_authenticate (Gsasl_session * session)
   do
     {
       printf ("Input base64 encoded data from server:\n");
-      fgets (buf, sizeof (buf) - 1, stdin);
+      p = fgets (buf, sizeof (buf) - 1, stdin);
+      if (p == NULL)
+       {
+         perror ("fgets");
+         return;
+       }
       if (buf[strlen (buf) - 1] == '\n')
         buf[strlen (buf) - 1] = '\0';
 
@@ -46,7 +51,7 @@ client_authenticate (Gsasl_session * session)
       if (rc == GSASL_NEEDS_MORE || rc == GSASL_OK)
         {
           printf ("Output:\n%s\n", p);
-          free (p);
+          gsasl_free (p);
         }
     }
   while (rc == GSASL_NEEDS_MORE);
diff --git a/examples/client-xmpp-saml20.c b/examples/client-xmpp-saml20.c
index 43717c3..08de5bd 100644
--- a/examples/client-xmpp-saml20.c
+++ b/examples/client-xmpp-saml20.c
@@ -66,7 +66,13 @@ client_xmpp (Gsasl_session * session)
     {
       char *b64;
 
-      fgets (buf, sizeof (buf) - 1, stdin);
+      p = fgets (buf, sizeof (buf) - 1, stdin);
+      if (p == NULL)
+       {
+         perror ("fgets");
+         return;
+       }
+
       if (buf[strlen (buf) - 1] == '\n')
         buf[strlen (buf) - 1] = '\0';
 
@@ -84,6 +90,7 @@ client_xmpp (Gsasl_session * session)
       printf ("<response xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>"
              "%s</response>\n", p);
 
+      gsasl_free (p);
     }
   while (rc == GSASL_NEEDS_MORE);
 
diff --git a/examples/client.c b/examples/client.c
index f050ce6..c13a763 100644
--- a/examples/client.c
+++ b/examples/client.c
@@ -43,14 +43,19 @@ client_authenticate (Gsasl_session * session)
         {
           /* If sucessful, print it. */
           printf ("Output:\n%s\n", p);
-          free (p);
+          gsasl_free (p);
         }
 
       if (rc == GSASL_NEEDS_MORE)
         {
           /* If the client need more data from server, get it here. */
           printf ("Input base64 encoded data from server:\n");
-          fgets (buf, sizeof (buf) - 1, stdin);
+          p = fgets (buf, sizeof (buf) - 1, stdin);
+         if (p == NULL)
+           {
+             perror ("fgets");
+             return;
+           }
           if (buf[strlen (buf) - 1] == '\n')
             buf[strlen (buf) - 1] = '\0';
         }
diff --git a/examples/server-xmpp-saml20.c b/examples/server-xmpp-saml20.c
index 7f380d6..1ea4a3a 100644
--- a/examples/server-xmpp-saml20.c
+++ b/examples/server-xmpp-saml20.c
@@ -49,8 +49,12 @@ server_xmpp (Gsasl_session * session)
     {
       char buf[BUFSIZ] = "";
 
-      if (fgets (buf, sizeof (buf) - 1, stdin) == NULL)
-       break;
+      p = fgets (buf, sizeof (buf) - 1, stdin);
+      if (p == NULL)
+       {
+         perror ("fgets");
+         break;
+       }
       if (buf[strlen (buf) - 1] == '\n')
         buf[strlen (buf) - 1] = '\0';
 
@@ -63,7 +67,7 @@ server_xmpp (Gsasl_session * session)
        {
          printf ("<challenge xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>"
                  "%s</challenge>\n", p);
-         free (p);
+         gsasl_free (p);
        }
     }
   while (rc == GSASL_NEEDS_MORE);
@@ -145,6 +149,7 @@ callback (Gsasl * ctx, Gsasl_session * sctx, Gsasl_property 
prop)
     case GSASL_VALIDATE_SAML20:
       {
        char buf[BUFSIZ] = "";
+       char *p;
 
        puts ("Authorization decision time!");
        printf ("User identity: %s\n",
@@ -152,8 +157,12 @@ callback (Gsasl * ctx, Gsasl_session * sctx, 
Gsasl_property prop)
        printf ("Accept user? (y/n) ");
        fflush (stdout);
 
-       if (fgets (buf, sizeof (buf) - 1, stdin) == NULL)
-         break;
+       p = fgets (buf, sizeof (buf) - 1, stdin);
+       if (p == NULL)
+         {
+           perror ("fgets");
+           break;
+         }
        if (buf[strlen (buf) - 1] == '\n')
          buf[strlen (buf) - 1] = '\0';
 
diff --git a/gl/Makefile.am b/gl/Makefile.am
index 4d85046..ab26e5f 100644
--- a/gl/Makefile.am
+++ b/gl/Makefile.am
@@ -1197,7 +1197,6 @@ stdio.h: stdio.in.h $(top_builddir)/config.status 
$(CXXDEFS_H) $(ARG_NONNULL_H)
              -e 's/@''GNULIB_GETCHAR''@/$(GNULIB_GETCHAR)/g' \
              -e 's/@''GNULIB_GETDELIM''@/$(GNULIB_GETDELIM)/g' \
              -e 's/@''GNULIB_GETLINE''@/$(GNULIB_GETLINE)/g' \
-             -e 's/@''GNULIB_GETS''@/$(GNULIB_GETS)/g' \
              -e 's/@''GNULIB_OBSTACK_PRINTF''@/$(GNULIB_OBSTACK_PRINTF)/g' \
              -e 
's/@''GNULIB_OBSTACK_PRINTF_POSIX''@/$(GNULIB_OBSTACK_PRINTF_POSIX)/g' \
              -e 's/@''GNULIB_PCLOSE''@/$(GNULIB_PCLOSE)/g' \
diff --git a/gl/m4/math_h.m4 b/gl/m4/math_h.m4
index ff1654e..a24d352 100644
--- a/gl/m4/math_h.m4
+++ b/gl/m4/math_h.m4
@@ -1,4 +1,4 @@
-# math_h.m4 serial 104
+# math_h.m4 serial 107
 dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -45,7 +45,7 @@ AC_DEFUN([gl_MATH_H],
      fabsf fabsl floorf floorl fma fmaf fmal
      fmod fmodf fmodl frexpf frexpl hypotf hypotl
      ldexpf ldexpl
-     logb log logf logl log10f log10l log1p log1pf log1pl log2 log2f log2l
+     logb log logf logl log10 log10f log10l log1p log1pf log1pl log2 log2f 
log2l
      modf modff modfl powf
      remainder remainderf remainderl
      rint rintf rintl round roundf roundl sinf sinl sinhf sqrtf sqrtl
@@ -119,6 +119,7 @@ AC_DEFUN([gl_MATH_H_DEFAULTS],
   GNULIB_LOG=0;        AC_SUBST([GNULIB_LOG])
   GNULIB_LOGF=0;       AC_SUBST([GNULIB_LOGF])
   GNULIB_LOGL=0;       AC_SUBST([GNULIB_LOGL])
+  GNULIB_LOG10=0;      AC_SUBST([GNULIB_LOG10])
   GNULIB_LOG10F=0;     AC_SUBST([GNULIB_LOG10F])
   GNULIB_LOG10L=0;     AC_SUBST([GNULIB_LOG10L])
   GNULIB_LOG1P=0;      AC_SUBST([GNULIB_LOG1P])
@@ -277,6 +278,9 @@ AC_DEFUN([gl_MATH_H_DEFAULTS],
   REPLACE_LOG=0;               AC_SUBST([REPLACE_LOG])
   REPLACE_LOGF=0;              AC_SUBST([REPLACE_LOGF])
   REPLACE_LOGL=0;              AC_SUBST([REPLACE_LOGL])
+  REPLACE_LOG10=0;             AC_SUBST([REPLACE_LOG10])
+  REPLACE_LOG10F=0;            AC_SUBST([REPLACE_LOG10F])
+  REPLACE_LOG10L=0;            AC_SUBST([REPLACE_LOG10L])
   REPLACE_LOG1P=0;             AC_SUBST([REPLACE_LOG1P])
   REPLACE_LOG1PF=0;            AC_SUBST([REPLACE_LOG1PF])
   REPLACE_LOG1PL=0;            AC_SUBST([REPLACE_LOG1PL])
diff --git a/gl/m4/stdio_h.m4 b/gl/m4/stdio_h.m4
index 1973e8d..b03393b 100644
--- a/gl/m4/stdio_h.m4
+++ b/gl/m4/stdio_h.m4
@@ -1,4 +1,4 @@
-# stdio_h.m4 serial 40
+# stdio_h.m4 serial 41
 dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -18,7 +18,6 @@ AC_DEFUN([gl_STDIO_H],
   GNULIB_GETC=1
   GNULIB_GETCHAR=1
   GNULIB_FGETS=1
-  GNULIB_GETS=1
   GNULIB_FREAD=1
   dnl This ifdef is necessary to avoid an error "missing file lib/stdio-read.c"
   dnl "expected source file, required through AC_LIBSOURCES, not found". It is
@@ -72,10 +71,10 @@ AC_DEFUN([gl_STDIO_H],
 
   dnl Check for declarations of anything we want to poison if the
   dnl corresponding gnulib module is not in use, and which is not
-  dnl guaranteed by C89.
+  dnl guaranteed by both C89 and C11.
   gl_WARN_ON_USE_PREPARE([[#include <stdio.h>
-    ]], [dprintf fpurge fseeko ftello getdelim getline pclose popen renameat
-    snprintf tmpfile vdprintf vsnprintf])
+    ]], [dprintf fpurge fseeko ftello getdelim getline gets pclose popen
+    renameat snprintf tmpfile vdprintf vsnprintf])
 ])
 
 AC_DEFUN([gl_STDIO_MODULE_INDICATOR],
@@ -113,7 +112,6 @@ AC_DEFUN([gl_STDIO_H_DEFAULTS],
   GNULIB_GETCHAR=0;              AC_SUBST([GNULIB_GETCHAR])
   GNULIB_GETDELIM=0;             AC_SUBST([GNULIB_GETDELIM])
   GNULIB_GETLINE=0;              AC_SUBST([GNULIB_GETLINE])
-  GNULIB_GETS=0;                 AC_SUBST([GNULIB_GETS])
   GNULIB_OBSTACK_PRINTF=0;       AC_SUBST([GNULIB_OBSTACK_PRINTF])
   GNULIB_OBSTACK_PRINTF_POSIX=0; AC_SUBST([GNULIB_OBSTACK_PRINTF_POSIX])
   GNULIB_PCLOSE=0;               AC_SUBST([GNULIB_PCLOSE])
diff --git a/gl/m4/warn-on-use.m4 b/gl/m4/warn-on-use.m4
index 03b113c..a77802e 100644
--- a/gl/m4/warn-on-use.m4
+++ b/gl/m4/warn-on-use.m4
@@ -1,4 +1,4 @@
-# warn-on-use.m4 serial 4
+# warn-on-use.m4 serial 5
 dnl Copyright (C) 2010-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -18,8 +18,8 @@ dnl with or without modifications, as long as this notice is 
preserved.
 # some systems declare functions in the wrong header, then INCLUDES
 # should do likewise.
 #
-# If you assume C89, then it is generally safe to assume declarations
-# for functions declared in that standard (such as gets) without
+# It is generally safe to assume declarations for functions declared
+# in the intersection of C89 and C11 (such as printf) without
 # needing gl_WARN_ON_USE_PREPARE.
 AC_DEFUN([gl_WARN_ON_USE_PREPARE],
 [
diff --git a/gl/m4/warnings.m4 b/gl/m4/warnings.m4
index 69d05a6..c14c480 100644
--- a/gl/m4/warnings.m4
+++ b/gl/m4/warnings.m4
@@ -1,4 +1,4 @@
-# warnings.m4 serial 5
+# warnings.m4 serial 6
 dnl Copyright (C) 2008-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -14,24 +14,29 @@ m4_ifdef([AS_VAR_APPEND],
 [m4_define([gl_AS_VAR_APPEND],
 [AS_VAR_SET([$1], [AS_VAR_GET([$1])$2])])])
 
+
 # gl_WARN_ADD(PARAMETER, [VARIABLE = WARN_CFLAGS])
 # ------------------------------------------------
 # Adds parameter to WARN_CFLAGS if the compiler supports it.  For example,
 # gl_WARN_ADD([-Wparentheses]).
+#
+# If VARIABLE is a variable name, AC_SUBST it.
 AC_DEFUN([gl_WARN_ADD],
 dnl FIXME: gl_Warn must be used unquoted until we can assume
 dnl autoconf 2.64 or newer.
-[AS_VAR_PUSHDEF([gl_Warn], [gl_cv_warn_$1])dnl
-AC_CACHE_CHECK([whether compiler handles $1], m4_defn([gl_Warn]), [
-  gl_save_CPPFLAGS="$CPPFLAGS"
-  CPPFLAGS="${CPPFLAGS} $1"
-  AC_PREPROC_IFELSE([AC_LANG_PROGRAM([])],
+[AS_VAR_PUSHDEF([gl_Warn], [gl_cv_warn_[]_AC_LANG_ABBREV[]_$1])dnl
+AS_VAR_PUSHDEF([gl_Flags], [_AC_LANG_PREFIX[]FLAGS])dnl
+AC_CACHE_CHECK([whether _AC_LANG compiler handles $1], m4_defn([gl_Warn]), [
+  gl_save_compiler_FLAGS="$gl_Flags"
+  gl_Flags="$gl_Flags $1"
+  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
                     [AS_VAR_SET(gl_Warn, [yes])],
                     [AS_VAR_SET(gl_Warn, [no])])
-  CPPFLAGS="$gl_save_CPPFLAGS"
+  gl_Flags="$gl_save_compiler_FLAGS"
 ])
 AS_VAR_IF(gl_Warn, [yes],
   [gl_AS_VAR_APPEND(m4_if([$2], [], [[WARN_CFLAGS]], [[$2]]), [" $1"])])
+AS_VAR_POPDEF([gl_Flags])dnl
 AS_VAR_POPDEF([gl_Warn])dnl
 m4_ifval([$2], [AS_LITERAL_IF([$2], [AC_SUBST([$2])], [])])dnl
 ])
diff --git a/gl/stdio.in.h b/gl/stdio.in.h
index 9dc7c4a..4d3f0bb 100644
--- a/gl/stdio.in.h
+++ b/gl/stdio.in.h
@@ -698,22 +698,11 @@ _GL_WARN_ON_USE (getline, "getline is unportable - "
 # endif
 #endif
 
-#if @GNULIB_GETS@
-# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@
-#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-#   undef gets
-#   define gets rpl_gets
-#  endif
-_GL_FUNCDECL_RPL (gets, char *, (char *s) _GL_ARG_NONNULL ((1)));
-_GL_CXXALIAS_RPL (gets, char *, (char *s));
-# else
-_GL_CXXALIAS_SYS (gets, char *, (char *s));
-#  undef gets
-# endif
-_GL_CXXALIASWARN (gets);
 /* It is very rare that the developer ever has full control of stdin,
-   so any use of gets warrants an unconditional warning.  Assume it is
-   always declared, since it is required by C89.  */
+   so any use of gets warrants an unconditional warning; besides, C11
+   removed it.  */
+#undef gets
+#if HAVE_RAW_DECL_GETS
 _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
 #endif
 
@@ -1053,9 +1042,9 @@ _GL_WARN_ON_USE (snprintf, "snprintf is unportable - "
 # endif
 #endif
 
-/* Some people would argue that sprintf should be handled like gets
-   (for example, OpenBSD issues a link warning for both functions),
-   since both can cause security holes due to buffer overruns.
+/* Some people would argue that all sprintf uses should be warned about
+   (for example, OpenBSD issues a link warning for it),
+   since it can cause security holes due to buffer overruns.
    However, we believe that sprintf can be used safely, and is more
    efficient than snprintf in those safe cases; and as proof of our
    belief, we use sprintf in several gnulib modules.  So this header
diff --git a/gltests/strerror_r.c b/gltests/strerror_r.c
index be76b0d..76f6fc6 100644
--- a/gltests/strerror_r.c
+++ b/gltests/strerror_r.c
@@ -34,6 +34,7 @@
 #if (__GLIBC__ >= 2 || defined __UCLIBC__ || defined __CYGWIN__) && 
HAVE___XPG_STRERROR_R /* glibc >= 2.3.4, cygwin >= 1.7.9 */
 
 # define USE_XPG_STRERROR_R 1
+extern int __xpg_strerror_r (int errnum, char *buf, size_t buflen);
 
 #elif HAVE_DECL_STRERROR_R && !(__GLIBC__ >= 2 || defined __UCLIBC__ || 
defined __CYGWIN__)
 
@@ -161,8 +162,6 @@ strerror_r (int errnum, char *buf, size_t buflen)
 #if USE_XPG_STRERROR_R
 
     {
-      extern int __xpg_strerror_r (int errnum, char *buf, size_t buflen);
-
       ret = __xpg_strerror_r (errnum, buf, buflen);
       if (ret < 0)
         ret = errno;
diff --git a/lib/anonymous/client.c b/lib/anonymous/client.c
index 5604f3a..dec3ed7 100644
--- a/lib/anonymous/client.c
+++ b/lib/anonymous/client.c
@@ -21,7 +21,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 /* Get specification. */
diff --git a/lib/anonymous/mechinfo.c b/lib/anonymous/mechinfo.c
index 6a17e73..6ca5c04 100644
--- a/lib/anonymous/mechinfo.c
+++ b/lib/anonymous/mechinfo.c
@@ -21,7 +21,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 /* Get specification. */
diff --git a/lib/anonymous/server.c b/lib/anonymous/server.c
index 53d5ecf..0336b76 100644
--- a/lib/anonymous/server.c
+++ b/lib/anonymous/server.c
@@ -21,7 +21,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 /* Get specification. */
diff --git a/lib/cram-md5/challenge.h b/lib/cram-md5/challenge.h
index f70d30d..966090a 100644
--- a/lib/cram-md5/challenge.h
+++ b/lib/cram-md5/challenge.h
@@ -21,9 +21,9 @@
  */
 
 #ifndef CHALLENGE_H
-# define CHALLENGE_H
+#define CHALLENGE_H
 
-# define CRAM_MD5_CHALLENGE_LEN 35
+#define CRAM_MD5_CHALLENGE_LEN 35
 
 /* Store zero terminated CRAM-MD5 challenge in output buffer.  The
    CHALLENGE buffer must be allocated by the caller, and must have
diff --git a/lib/cram-md5/client.c b/lib/cram-md5/client.c
index 6b77a5c..799025e 100644
--- a/lib/cram-md5/client.c
+++ b/lib/cram-md5/client.c
@@ -21,7 +21,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 /* Get specification. */
diff --git a/lib/cram-md5/digest.c b/lib/cram-md5/digest.c
index c154742..e9a173c 100644
--- a/lib/cram-md5/digest.c
+++ b/lib/cram-md5/digest.c
@@ -49,7 +49,7 @@
  */
 
 #if CRAM_MD5_DIGEST_LEN != 2*GC_MD5_DIGEST_SIZE
-# error MD5 length mismatch
+#error MD5 length mismatch
 #endif
 
 #define HEXCHAR(c) ((c & 0x0F) > 9 ? 'a' + (c & 0x0F) - 10 : '0' + (c & 0x0F))
diff --git a/lib/cram-md5/digest.h b/lib/cram-md5/digest.h
index a8d373e..d569fa9 100644
--- a/lib/cram-md5/digest.h
+++ b/lib/cram-md5/digest.h
@@ -21,12 +21,12 @@
  */
 
 #ifndef DIGEST_H
-# define DIGEST_H
+#define DIGEST_H
 
 /* Get size_t. */
 #include <stddef.h>
 
-# define CRAM_MD5_DIGEST_LEN 32
+#define CRAM_MD5_DIGEST_LEN 32
 
 /* Compute hex encoded HMAC-MD5 on the CHALLENGELEN long string
    CHALLENGE, keyed with SECRET of length SECRETLEN.  Use a
diff --git a/lib/cram-md5/mechinfo.c b/lib/cram-md5/mechinfo.c
index 6621834..577a0b8 100644
--- a/lib/cram-md5/mechinfo.c
+++ b/lib/cram-md5/mechinfo.c
@@ -21,7 +21,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 /* Get specification. */
diff --git a/lib/cram-md5/server.c b/lib/cram-md5/server.c
index a300b89..8c69359 100644
--- a/lib/cram-md5/server.c
+++ b/lib/cram-md5/server.c
@@ -21,7 +21,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 /* Get specification. */
diff --git a/lib/digest-md5/client.c b/lib/digest-md5/client.c
index dcfb120..73f7bbf 100644
--- a/lib/digest-md5/client.c
+++ b/lib/digest-md5/client.c
@@ -21,7 +21,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 /* Get specification. */
diff --git a/lib/digest-md5/digesthmac.c b/lib/digest-md5/digesthmac.c
index e2da6b2..3457a62 100644
--- a/lib/digest-md5/digesthmac.c
+++ b/lib/digest-md5/digesthmac.c
@@ -21,7 +21,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 /* Get specification. */
diff --git a/lib/digest-md5/digesthmac.h b/lib/digest-md5/digesthmac.h
index d00a46f..ea338ad 100644
--- a/lib/digest-md5/digesthmac.h
+++ b/lib/digest-md5/digesthmac.h
@@ -21,7 +21,7 @@
  */
 
 #ifndef DIGEST_MD5_DIGESTHMAC_H
-# define DIGEST_MD5_DIGESTHMAC_H
+#define DIGEST_MD5_DIGESTHMAC_H
 
 /* Get token types. */
 #include "tokens.h"
diff --git a/lib/digest-md5/free.h b/lib/digest-md5/free.h
index e05b2bd..be3b5c3 100644
--- a/lib/digest-md5/free.h
+++ b/lib/digest-md5/free.h
@@ -21,7 +21,7 @@
  */
 
 #ifndef DIGEST_MD5_FREE_H
-# define DIGEST_MD5_FREE_H
+#define DIGEST_MD5_FREE_H
 
 /* Get token types. */
 #include "tokens.h"
diff --git a/lib/digest-md5/getsubopt.c b/lib/digest-md5/getsubopt.c
index 421f66d..c7210ca 100644
--- a/lib/digest-md5/getsubopt.c
+++ b/lib/digest-md5/getsubopt.c
@@ -25,7 +25,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 /* Get prototypes. */
diff --git a/lib/digest-md5/mechinfo.c b/lib/digest-md5/mechinfo.c
index a48b7df..43d67c9 100644
--- a/lib/digest-md5/mechinfo.c
+++ b/lib/digest-md5/mechinfo.c
@@ -21,7 +21,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 /* Get specification. */
diff --git a/lib/digest-md5/nonascii.c b/lib/digest-md5/nonascii.c
index 669ac2b..fc92a99 100644
--- a/lib/digest-md5/nonascii.c
+++ b/lib/digest-md5/nonascii.c
@@ -21,7 +21,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 /* Get specification. */
diff --git a/lib/digest-md5/nonascii.h b/lib/digest-md5/nonascii.h
index ac24263..926ff08 100644
--- a/lib/digest-md5/nonascii.h
+++ b/lib/digest-md5/nonascii.h
@@ -21,7 +21,7 @@
  */
 
 #ifndef DIGEST_MD5_NONASCII_H
-# define DIGEST_MD5_NONASCII_H
+#define DIGEST_MD5_NONASCII_H
 
 extern char *latin1toutf8 (const char *str);
 
diff --git a/lib/digest-md5/parser.c b/lib/digest-md5/parser.c
index 2c6981c..a83178a 100644
--- a/lib/digest-md5/parser.c
+++ b/lib/digest-md5/parser.c
@@ -21,7 +21,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 /* Get prototypes. */
diff --git a/lib/digest-md5/parser.h b/lib/digest-md5/parser.h
index 6637dd9..d995588 100644
--- a/lib/digest-md5/parser.h
+++ b/lib/digest-md5/parser.h
@@ -21,7 +21,7 @@
  */
 
 #ifndef DIGEST_MD5_PARSER_H
-# define DIGEST_MD5_PARSER_H
+#define DIGEST_MD5_PARSER_H
 
 /* Get token types. */
 #include "tokens.h"
diff --git a/lib/digest-md5/printer.c b/lib/digest-md5/printer.c
index 0139cff..1498293 100644
--- a/lib/digest-md5/printer.c
+++ b/lib/digest-md5/printer.c
@@ -21,7 +21,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 /* Get prototypes. */
diff --git a/lib/digest-md5/printer.h b/lib/digest-md5/printer.h
index ca71de1..b8c5cb6 100644
--- a/lib/digest-md5/printer.h
+++ b/lib/digest-md5/printer.h
@@ -21,7 +21,7 @@
  */
 
 #ifndef DIGEST_MD5_PRINTER_H
-# define DIGEST_MD5_PRINTER_H
+#define DIGEST_MD5_PRINTER_H
 
 /* Get token types. */
 #include "tokens.h"
diff --git a/lib/digest-md5/qop.c b/lib/digest-md5/qop.c
index 4cb275b..cd78ba8 100644
--- a/lib/digest-md5/qop.c
+++ b/lib/digest-md5/qop.c
@@ -21,7 +21,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 /* Get prototypes. */
diff --git a/lib/digest-md5/qop.h b/lib/digest-md5/qop.h
index aaf7d4a..d928a29 100644
--- a/lib/digest-md5/qop.h
+++ b/lib/digest-md5/qop.h
@@ -21,7 +21,7 @@
  */
 
 #ifndef DIGEST_MD5_QOP_H
-# define DIGEST_MD5_QOP_H
+#define DIGEST_MD5_QOP_H
 
 extern int digest_md5_qopstr2qops (const char *qopstr);
 extern const char *digest_md5_qops2qopstr (int qops);
diff --git a/lib/digest-md5/server.c b/lib/digest-md5/server.c
index ac1392d..06e56b6 100644
--- a/lib/digest-md5/server.c
+++ b/lib/digest-md5/server.c
@@ -21,7 +21,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 /* Get specification. */
diff --git a/lib/digest-md5/session.c b/lib/digest-md5/session.c
index 6cddd63..cb896d5 100644
--- a/lib/digest-md5/session.c
+++ b/lib/digest-md5/session.c
@@ -21,7 +21,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 /* Get specification. */
diff --git a/lib/digest-md5/session.h b/lib/digest-md5/session.h
index 840548f..5fb72d7 100644
--- a/lib/digest-md5/session.h
+++ b/lib/digest-md5/session.h
@@ -21,7 +21,7 @@
  */
 
 #ifndef DIGEST_MD5_SESSION_H
-# define DIGEST_MD5_SESSION_H
+#define DIGEST_MD5_SESSION_H
 
 /* Get token types. */
 #include "tokens.h"
diff --git a/lib/digest-md5/test-parser.c b/lib/digest-md5/test-parser.c
index 0ca13d9..6f0536c 100644
--- a/lib/digest-md5/test-parser.c
+++ b/lib/digest-md5/test-parser.c
@@ -59,7 +59,8 @@ main (int argc, char *argv[])
   }
 
   {
-    const char *token = "qop=\"auth, auth-conf\", nonce=42, 
algorithm=md5-sess";
+    const char *token =
+      "qop=\"auth, auth-conf\", nonce=42, algorithm=md5-sess";
 
     printf ("challenge `%s': ", token);
     rc = digest_md5_parse_challenge (token, 0, &c);
diff --git a/lib/digest-md5/tokens.h b/lib/digest-md5/tokens.h
index 5d6b0c3..48306c3 100644
--- a/lib/digest-md5/tokens.h
+++ b/lib/digest-md5/tokens.h
@@ -21,7 +21,7 @@
  */
 
 #ifndef DIGEST_MD5_TOKENS_H
-# define DIGEST_MD5_TOKENS_H
+#define DIGEST_MD5_TOKENS_H
 
 /* Get size_t. */
 #include <stddef.h>
diff --git a/lib/digest-md5/validate.c b/lib/digest-md5/validate.c
index cf56ea8..0abd02e 100644
--- a/lib/digest-md5/validate.c
+++ b/lib/digest-md5/validate.c
@@ -21,7 +21,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 /* Get prototypes. */
diff --git a/lib/digest-md5/validate.h b/lib/digest-md5/validate.h
index ca0fc0a..457a70b 100644
--- a/lib/digest-md5/validate.h
+++ b/lib/digest-md5/validate.h
@@ -21,7 +21,7 @@
  */
 
 #ifndef DIGEST_MD5_VALIDATE_H
-# define DIGEST_MD5_VALIDATE_H
+#define DIGEST_MD5_VALIDATE_H
 
 /* Get token types. */
 #include "tokens.h"
diff --git a/lib/external/client.c b/lib/external/client.c
index 4cb4538..31103f2 100644
--- a/lib/external/client.c
+++ b/lib/external/client.c
@@ -21,7 +21,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 /* Get specification. */
diff --git a/lib/external/mechinfo.c b/lib/external/mechinfo.c
index 7a18d6c..3b4bc15 100644
--- a/lib/external/mechinfo.c
+++ b/lib/external/mechinfo.c
@@ -21,7 +21,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 /* Get specification. */
diff --git a/lib/external/server.c b/lib/external/server.c
index 545f784..9c8b384 100644
--- a/lib/external/server.c
+++ b/lib/external/server.c
@@ -21,7 +21,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 /* Get specification. */
diff --git a/lib/gl/Makefile.am b/lib/gl/Makefile.am
index 19ed7f9..48a0796 100644
--- a/lib/gl/Makefile.am
+++ b/lib/gl/Makefile.am
@@ -582,7 +582,6 @@ stdio.h: stdio.in.h $(top_builddir)/config.status 
$(CXXDEFS_H) $(ARG_NONNULL_H)
              -e 's/@''GNULIB_GETCHAR''@/$(GNULIB_GETCHAR)/g' \
              -e 's/@''GNULIB_GETDELIM''@/$(GNULIB_GETDELIM)/g' \
              -e 's/@''GNULIB_GETLINE''@/$(GNULIB_GETLINE)/g' \
-             -e 's/@''GNULIB_GETS''@/$(GNULIB_GETS)/g' \
              -e 's/@''GNULIB_OBSTACK_PRINTF''@/$(GNULIB_OBSTACK_PRINTF)/g' \
              -e 
's/@''GNULIB_OBSTACK_PRINTF_POSIX''@/$(GNULIB_OBSTACK_PRINTF_POSIX)/g' \
              -e 's/@''GNULIB_PCLOSE''@/$(GNULIB_PCLOSE)/g' \
diff --git a/lib/gl/m4/math_h.m4 b/lib/gl/m4/math_h.m4
index ff1654e..a24d352 100644
--- a/lib/gl/m4/math_h.m4
+++ b/lib/gl/m4/math_h.m4
@@ -1,4 +1,4 @@
-# math_h.m4 serial 104
+# math_h.m4 serial 107
 dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -45,7 +45,7 @@ AC_DEFUN([gl_MATH_H],
      fabsf fabsl floorf floorl fma fmaf fmal
      fmod fmodf fmodl frexpf frexpl hypotf hypotl
      ldexpf ldexpl
-     logb log logf logl log10f log10l log1p log1pf log1pl log2 log2f log2l
+     logb log logf logl log10 log10f log10l log1p log1pf log1pl log2 log2f 
log2l
      modf modff modfl powf
      remainder remainderf remainderl
      rint rintf rintl round roundf roundl sinf sinl sinhf sqrtf sqrtl
@@ -119,6 +119,7 @@ AC_DEFUN([gl_MATH_H_DEFAULTS],
   GNULIB_LOG=0;        AC_SUBST([GNULIB_LOG])
   GNULIB_LOGF=0;       AC_SUBST([GNULIB_LOGF])
   GNULIB_LOGL=0;       AC_SUBST([GNULIB_LOGL])
+  GNULIB_LOG10=0;      AC_SUBST([GNULIB_LOG10])
   GNULIB_LOG10F=0;     AC_SUBST([GNULIB_LOG10F])
   GNULIB_LOG10L=0;     AC_SUBST([GNULIB_LOG10L])
   GNULIB_LOG1P=0;      AC_SUBST([GNULIB_LOG1P])
@@ -277,6 +278,9 @@ AC_DEFUN([gl_MATH_H_DEFAULTS],
   REPLACE_LOG=0;               AC_SUBST([REPLACE_LOG])
   REPLACE_LOGF=0;              AC_SUBST([REPLACE_LOGF])
   REPLACE_LOGL=0;              AC_SUBST([REPLACE_LOGL])
+  REPLACE_LOG10=0;             AC_SUBST([REPLACE_LOG10])
+  REPLACE_LOG10F=0;            AC_SUBST([REPLACE_LOG10F])
+  REPLACE_LOG10L=0;            AC_SUBST([REPLACE_LOG10L])
   REPLACE_LOG1P=0;             AC_SUBST([REPLACE_LOG1P])
   REPLACE_LOG1PF=0;            AC_SUBST([REPLACE_LOG1PF])
   REPLACE_LOG1PL=0;            AC_SUBST([REPLACE_LOG1PL])
diff --git a/lib/gl/m4/stdio_h.m4 b/lib/gl/m4/stdio_h.m4
index 1973e8d..b03393b 100644
--- a/lib/gl/m4/stdio_h.m4
+++ b/lib/gl/m4/stdio_h.m4
@@ -1,4 +1,4 @@
-# stdio_h.m4 serial 40
+# stdio_h.m4 serial 41
 dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -18,7 +18,6 @@ AC_DEFUN([gl_STDIO_H],
   GNULIB_GETC=1
   GNULIB_GETCHAR=1
   GNULIB_FGETS=1
-  GNULIB_GETS=1
   GNULIB_FREAD=1
   dnl This ifdef is necessary to avoid an error "missing file lib/stdio-read.c"
   dnl "expected source file, required through AC_LIBSOURCES, not found". It is
@@ -72,10 +71,10 @@ AC_DEFUN([gl_STDIO_H],
 
   dnl Check for declarations of anything we want to poison if the
   dnl corresponding gnulib module is not in use, and which is not
-  dnl guaranteed by C89.
+  dnl guaranteed by both C89 and C11.
   gl_WARN_ON_USE_PREPARE([[#include <stdio.h>
-    ]], [dprintf fpurge fseeko ftello getdelim getline pclose popen renameat
-    snprintf tmpfile vdprintf vsnprintf])
+    ]], [dprintf fpurge fseeko ftello getdelim getline gets pclose popen
+    renameat snprintf tmpfile vdprintf vsnprintf])
 ])
 
 AC_DEFUN([gl_STDIO_MODULE_INDICATOR],
@@ -113,7 +112,6 @@ AC_DEFUN([gl_STDIO_H_DEFAULTS],
   GNULIB_GETCHAR=0;              AC_SUBST([GNULIB_GETCHAR])
   GNULIB_GETDELIM=0;             AC_SUBST([GNULIB_GETDELIM])
   GNULIB_GETLINE=0;              AC_SUBST([GNULIB_GETLINE])
-  GNULIB_GETS=0;                 AC_SUBST([GNULIB_GETS])
   GNULIB_OBSTACK_PRINTF=0;       AC_SUBST([GNULIB_OBSTACK_PRINTF])
   GNULIB_OBSTACK_PRINTF_POSIX=0; AC_SUBST([GNULIB_OBSTACK_PRINTF_POSIX])
   GNULIB_PCLOSE=0;               AC_SUBST([GNULIB_PCLOSE])
diff --git a/lib/gl/m4/warn-on-use.m4 b/lib/gl/m4/warn-on-use.m4
index 03b113c..a77802e 100644
--- a/lib/gl/m4/warn-on-use.m4
+++ b/lib/gl/m4/warn-on-use.m4
@@ -1,4 +1,4 @@
-# warn-on-use.m4 serial 4
+# warn-on-use.m4 serial 5
 dnl Copyright (C) 2010-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -18,8 +18,8 @@ dnl with or without modifications, as long as this notice is 
preserved.
 # some systems declare functions in the wrong header, then INCLUDES
 # should do likewise.
 #
-# If you assume C89, then it is generally safe to assume declarations
-# for functions declared in that standard (such as gets) without
+# It is generally safe to assume declarations for functions declared
+# in the intersection of C89 and C11 (such as printf) without
 # needing gl_WARN_ON_USE_PREPARE.
 AC_DEFUN([gl_WARN_ON_USE_PREPARE],
 [
diff --git a/lib/gl/stdio.in.h b/lib/gl/stdio.in.h
index 03bea2a..9cde0b9 100644
--- a/lib/gl/stdio.in.h
+++ b/lib/gl/stdio.in.h
@@ -698,22 +698,11 @@ _GL_WARN_ON_USE (getline, "getline is unportable - "
 # endif
 #endif
 
-#if @GNULIB_GETS@
-# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@
-#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-#   undef gets
-#   define gets rpl_gets
-#  endif
-_GL_FUNCDECL_RPL (gets, char *, (char *s) _GL_ARG_NONNULL ((1)));
-_GL_CXXALIAS_RPL (gets, char *, (char *s));
-# else
-_GL_CXXALIAS_SYS (gets, char *, (char *s));
-#  undef gets
-# endif
-_GL_CXXALIASWARN (gets);
 /* It is very rare that the developer ever has full control of stdin,
-   so any use of gets warrants an unconditional warning.  Assume it is
-   always declared, since it is required by C89.  */
+   so any use of gets warrants an unconditional warning; besides, C11
+   removed it.  */
+#undef gets
+#if HAVE_RAW_DECL_GETS
 _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
 #endif
 
@@ -1053,9 +1042,9 @@ _GL_WARN_ON_USE (snprintf, "snprintf is unportable - "
 # endif
 #endif
 
-/* Some people would argue that sprintf should be handled like gets
-   (for example, OpenBSD issues a link warning for both functions),
-   since both can cause security holes due to buffer overruns.
+/* Some people would argue that all sprintf uses should be warned about
+   (for example, OpenBSD issues a link warning for it),
+   since it can cause security holes due to buffer overruns.
    However, we believe that sprintf can be used safely, and is more
    efficient than snprintf in those safe cases; and as proof of our
    belief, we use sprintf in several gnulib modules.  So this header
diff --git a/lib/gs2/client.c b/lib/gs2/client.c
index 5510543..ee6a75f 100644
--- a/lib/gs2/client.c
+++ b/lib/gs2/client.c
@@ -21,7 +21,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 /* Get specification. */
diff --git a/lib/gs2/gs2helper.c b/lib/gs2/gs2helper.c
index 40cba64..3e2250c 100644
--- a/lib/gs2/gs2helper.c
+++ b/lib/gs2/gs2helper.c
@@ -21,7 +21,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 /* Get strcmp. */
diff --git a/lib/gs2/gs2helper.h b/lib/gs2/gs2helper.h
index 76a072d..bc67489 100644
--- a/lib/gs2/gs2helper.h
+++ b/lib/gs2/gs2helper.h
@@ -21,15 +21,15 @@
  */
 
 #ifndef GS2_HELPER_H
-# define GS2_HELPER_H
+#define GS2_HELPER_H
 
 /* Get GSS-API functions. */
 #ifdef HAVE_LIBGSS
-# include <gss.h>
+#include <gss.h>
 #elif HAVE_GSSAPI_H
-# include <gssapi.h>
+#include <gssapi.h>
 #elif HAVE_GSSAPI_GSSAPI_H
-# include <gssapi/gssapi.h>
+#include <gssapi/gssapi.h>
 #endif
 
 /* Get gsasl functions and types. */
diff --git a/lib/gs2/mechinfo.c b/lib/gs2/mechinfo.c
index 0058f79..2ded653 100644
--- a/lib/gs2/mechinfo.c
+++ b/lib/gs2/mechinfo.c
@@ -21,7 +21,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 /* Get specification. */
diff --git a/lib/gs2/server.c b/lib/gs2/server.c
index 14a8788..df95db6 100644
--- a/lib/gs2/server.c
+++ b/lib/gs2/server.c
@@ -21,7 +21,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 /* Get specification. */
diff --git a/lib/gssapi/client.c b/lib/gssapi/client.c
index e0229ce..3697e21 100644
--- a/lib/gssapi/client.c
+++ b/lib/gssapi/client.c
@@ -21,7 +21,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 /* Get malloc, free. */
@@ -34,11 +34,11 @@
 #include "x-gssapi.h"
 
 #ifdef HAVE_LIBGSS
-# include <gss.h>
+#include <gss.h>
 #elif HAVE_GSSAPI_H
-# include <gssapi.h>
+#include <gssapi.h>
 #elif HAVE_GSSAPI_GSSAPI_H
-# include <gssapi/gssapi.h>
+#include <gssapi/gssapi.h>
 #endif
 
 #include "gss-extra.h"
diff --git a/lib/gssapi/mechinfo.c b/lib/gssapi/mechinfo.c
index 73a14c5..018de01 100644
--- a/lib/gssapi/mechinfo.c
+++ b/lib/gssapi/mechinfo.c
@@ -21,7 +21,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 /* Get specification. */
diff --git a/lib/gssapi/server.c b/lib/gssapi/server.c
index 24f20fa..d1d1aa8 100644
--- a/lib/gssapi/server.c
+++ b/lib/gssapi/server.c
@@ -21,7 +21,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 /* Get malloc, free. */
@@ -34,11 +34,11 @@
 #include "x-gssapi.h"
 
 #ifdef HAVE_LIBGSS
-# include <gss.h>
+#include <gss.h>
 #elif HAVE_GSSAPI_H
-# include <gssapi.h>
+#include <gssapi.h>
 #elif HAVE_GSSAPI_GSSAPI_H
-# include <gssapi/gssapi.h>
+#include <gssapi/gssapi.h>
 #endif
 
 #include "gss-extra.h"
diff --git a/lib/login/client.c b/lib/login/client.c
index 21eca5c..8ed5b8c 100644
--- a/lib/login/client.c
+++ b/lib/login/client.c
@@ -21,7 +21,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 /* Get malloc, free. */
diff --git a/lib/login/mechinfo.c b/lib/login/mechinfo.c
index 634d932..73d2c74 100644
--- a/lib/login/mechinfo.c
+++ b/lib/login/mechinfo.c
@@ -21,7 +21,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 /* Get specification. */
@@ -48,7 +48,8 @@ Gsasl_mechanism gsasl_login_mechanism = {
    NULL,
 #endif
    NULL,
-   NULL},
+   NULL}
+  ,
   {
    NULL,
    NULL,
diff --git a/lib/login/server.c b/lib/login/server.c
index b4cb9be..ea70448 100644
--- a/lib/login/server.c
+++ b/lib/login/server.c
@@ -21,7 +21,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 /* Get malloc, free. */
diff --git a/lib/maint.mk b/lib/maint.mk
index 951b358..2228a37 100644
--- a/lib/maint.mk
+++ b/lib/maint.mk
@@ -279,7 +279,7 @@ define _sc_search_regexp
    if test -n "$$files"; then                                          \
      if test -n "$$prohibit"; then                                     \
        grep $$with_grep_options $(_ignore_case) -nE "$$prohibit" $$files \
-         | grep -vE "$${exclude-^$$}"                                  \
+         | grep -vE "$${exclude:-^$$}"                                 \
          && { msg="$$halt" $(_sc_say_and_exit) } || :;                 \
      else                                                              \
        grep $$with_grep_options $(_ignore_case) -LE "$$require" $$files \
diff --git a/lib/ntlm/mechinfo.c b/lib/ntlm/mechinfo.c
index 4aac5ec..aa622c1 100644
--- a/lib/ntlm/mechinfo.c
+++ b/lib/ntlm/mechinfo.c
@@ -21,7 +21,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 /* Get specification. */
diff --git a/lib/ntlm/ntlm.c b/lib/ntlm/ntlm.c
index ac05416..1b4fa8f 100644
--- a/lib/ntlm/ntlm.c
+++ b/lib/ntlm/ntlm.c
@@ -21,7 +21,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 /* Get malloc, free. */
diff --git a/lib/openid20/client.c b/lib/openid20/client.c
index 7dd7483..5a10c02 100644
--- a/lib/openid20/client.c
+++ b/lib/openid20/client.c
@@ -21,7 +21,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 /* Get specification. */
@@ -60,9 +60,9 @@ _gsasl_openid20_client_start (Gsasl_session * sctx, void 
**mech_data)
 
 int
 _gsasl_openid20_client_step (Gsasl_session * sctx,
-                          void *mech_data,
-                          const char *input, size_t input_len,
-                          char **output, size_t * output_len)
+                            void *mech_data,
+                            const char *input, size_t input_len,
+                            char **output, size_t * output_len)
 {
   struct openid20_client_state *state = mech_data;
   int res = GSASL_MECHANISM_CALLED_TOO_MANY_TIMES;
@@ -107,8 +107,8 @@ _gsasl_openid20_client_step (Gsasl_session * sctx,
       break;
 
       /* This step is optional.  The server could have approved
-        authentication already.  Alternatively, it wanted to send
-        some SREGs or error data and we end up here. */
+         authentication already.  Alternatively, it wanted to send
+         some SREGs or error data and we end up here. */
     case 2:
       {
        gsasl_property_set_raw (sctx, GSASL_OPENID20_OUTCOME_DATA,
@@ -126,7 +126,7 @@ _gsasl_openid20_client_step (Gsasl_session * sctx,
           is lock step,  the client will follow with an additional exchange
           containing "=", after which the server will respond with an
           application-level outcome.
-       */
+        */
 
 #define ERR_PREFIX "openid.error="
        if (input_len > strlen (ERR_PREFIX)
diff --git a/lib/openid20/mechinfo.c b/lib/openid20/mechinfo.c
index e2bea7b..6c7c872 100644
--- a/lib/openid20/mechinfo.c
+++ b/lib/openid20/mechinfo.c
@@ -21,7 +21,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 /* Get specification. */
diff --git a/lib/openid20/openid20.h b/lib/openid20/openid20.h
index 21ccf52..76e7b4a 100644
--- a/lib/openid20/openid20.h
+++ b/lib/openid20/openid20.h
@@ -21,34 +21,34 @@
  */
 
 #ifndef OPENID20_H
-# define OPENID20_H
+#define OPENID20_H
 
-# include <gsasl.h>
+#include <gsasl.h>
 
-# define GSASL_OPENID20_NAME "OPENID20"
+#define GSASL_OPENID20_NAME "OPENID20"
 
 extern Gsasl_mechanism gsasl_openid20_mechanism;
 
 extern int _gsasl_openid20_client_start (Gsasl_session * sctx,
-                                      void **mech_data);
+                                        void **mech_data);
 
 extern int _gsasl_openid20_client_step (Gsasl_session * sctx,
-                                     void *mech_data,
-                                     const char *input, size_t input_len,
-                                     char **output, size_t * output_len);
+                                       void *mech_data,
+                                       const char *input, size_t input_len,
+                                       char **output, size_t * output_len);
 
 extern void _gsasl_openid20_client_finish (Gsasl_session * sctx,
                                           void *mech_data);
 
 extern int _gsasl_openid20_server_start (Gsasl_session * sctx,
-                                      void **mech_data);
+                                        void **mech_data);
 
 extern int _gsasl_openid20_server_step (Gsasl_session * sctx,
-                                     void *mech_data,
-                                     const char *input, size_t input_len,
-                                     char **output, size_t * output_len);
+                                       void *mech_data,
+                                       const char *input, size_t input_len,
+                                       char **output, size_t * output_len);
 
 extern void _gsasl_openid20_server_finish (Gsasl_session * sctx,
-                                        void *mech_data);
+                                          void *mech_data);
 
 #endif /* OPENID20_H */
diff --git a/lib/openid20/server.c b/lib/openid20/server.c
index 170329a..17d80d4 100644
--- a/lib/openid20/server.c
+++ b/lib/openid20/server.c
@@ -21,7 +21,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 /* Get specification. */
@@ -58,9 +58,9 @@ _gsasl_openid20_server_start (Gsasl_session * sctx, void 
**mech_data)
 
 int
 _gsasl_openid20_server_step (Gsasl_session * sctx,
-                          void *mech_data,
-                          const char *input, size_t input_len,
-                          char **output, size_t * output_len)
+                            void *mech_data,
+                            const char *input, size_t input_len,
+                            char **output, size_t * output_len)
 {
   struct openid20_server_state *state = mech_data;
   int res = GSASL_MECHANISM_CALLED_TOO_MANY_TIMES;
@@ -139,7 +139,7 @@ _gsasl_openid20_server_step (Gsasl_session * sctx,
            state->step++;
            return GSASL_NEEDS_MORE;
          }
-       
+
        outcome_data = gsasl_property_get (sctx, GSASL_OPENID20_OUTCOME_DATA);
        if (outcome_data)
          {
diff --git a/lib/plain/client.c b/lib/plain/client.c
index 1da2ad3..320e383 100644
--- a/lib/plain/client.c
+++ b/lib/plain/client.c
@@ -21,7 +21,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 /* Get specification. */
diff --git a/lib/plain/mechinfo.c b/lib/plain/mechinfo.c
index 9035763..c88e2d7 100644
--- a/lib/plain/mechinfo.c
+++ b/lib/plain/mechinfo.c
@@ -21,7 +21,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 /* Get specification. */
diff --git a/lib/plain/server.c b/lib/plain/server.c
index 1d79506..18144cc 100644
--- a/lib/plain/server.c
+++ b/lib/plain/server.c
@@ -21,7 +21,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 /* Get specification. */
diff --git a/lib/saml20/client.c b/lib/saml20/client.c
index 3580f01..d41d065 100644
--- a/lib/saml20/client.c
+++ b/lib/saml20/client.c
@@ -21,7 +21,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 /* Get specification. */
diff --git a/lib/saml20/mechinfo.c b/lib/saml20/mechinfo.c
index 0c13277..df7264c 100644
--- a/lib/saml20/mechinfo.c
+++ b/lib/saml20/mechinfo.c
@@ -21,7 +21,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 /* Get specification. */
diff --git a/lib/saml20/saml20.h b/lib/saml20/saml20.h
index c481e36..b5c4049 100644
--- a/lib/saml20/saml20.h
+++ b/lib/saml20/saml20.h
@@ -21,11 +21,11 @@
  */
 
 #ifndef SAML20_H
-# define SAML20_H
+#define SAML20_H
 
-# include <gsasl.h>
+#include <gsasl.h>
 
-# define GSASL_SAML20_NAME "SAML20"
+#define GSASL_SAML20_NAME "SAML20"
 
 extern Gsasl_mechanism gsasl_saml20_mechanism;
 
diff --git a/lib/saml20/server.c b/lib/saml20/server.c
index 2f9469a..80d4f20 100644
--- a/lib/saml20/server.c
+++ b/lib/saml20/server.c
@@ -21,7 +21,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 /* Get specification. */
diff --git a/lib/scram/client.c b/lib/scram/client.c
index fb5157f..437dfb0 100644
--- a/lib/scram/client.c
+++ b/lib/scram/client.c
@@ -21,7 +21,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 /* Get specification. */
@@ -48,7 +48,7 @@ struct scram_client_state
 {
   int plus;
   int step;
-  char *cfmb; /* client first message bare */
+  char *cfmb;                  /* client first message bare */
   char *serversignature;
   char *authmessage;
   char *cbtlsunique;
@@ -220,11 +220,11 @@ _gsasl_scram_sha1_client_step (Gsasl_session * sctx,
        /* Point p to client-first-message-bare. */
        p = strchr (*output, ',');
        if (!p)
-           return GSASL_AUTHENTICATION_ERROR;
+         return GSASL_AUTHENTICATION_ERROR;
        p++;
        p = strchr (p, ',');
        if (!p)
-           return GSASL_AUTHENTICATION_ERROR;
+         return GSASL_AUTHENTICATION_ERROR;
        p++;
 
        /* Save "client-first-message-bare" for the next step. */
@@ -343,8 +343,7 @@ _gsasl_scram_sha1_client_step (Gsasl_session * sctx,
            n = asprintf (&state->authmessage, "%s,%.*s,%.*s",
                          state->cfmb,
                          (int) input_len, input,
-                         (int) (strlen (cfmwp) - 4),
-                         cfmwp);
+                         (int) (strlen (cfmwp) - 4), cfmwp);
            free (cfmwp);
            if (n <= 0 || !state->authmessage)
              return GSASL_MALLOC_ERROR;
@@ -353,8 +352,7 @@ _gsasl_scram_sha1_client_step (Gsasl_session * sctx,
          /* ClientKey := HMAC(SaltedPassword, "Client Key") */
 #define CLIENT_KEY "Client Key"
          rc = gsasl_hmac_sha1 (saltedpassword, 20,
-                               CLIENT_KEY, strlen (CLIENT_KEY),
-                               &clientkey);
+                               CLIENT_KEY, strlen (CLIENT_KEY), &clientkey);
          if (rc != 0)
            return rc;
 
diff --git a/lib/scram/mechinfo.c b/lib/scram/mechinfo.c
index cd407ea..ee0dc5d 100644
--- a/lib/scram/mechinfo.c
+++ b/lib/scram/mechinfo.c
@@ -21,7 +21,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 /* Get specification. */
@@ -31,35 +31,34 @@
 Gsasl_mechanism gsasl_scram_sha1_mechanism = {
   GSASL_SCRAM_SHA1_NAME,
   {
-    NULL,
-    NULL,
+   NULL,
+   NULL,
 #ifdef USE_CLIENT
-    _gsasl_scram_sha1_client_start,
-    _gsasl_scram_sha1_client_step,
-    _gsasl_scram_sha1_client_finish,
+   _gsasl_scram_sha1_client_start,
+   _gsasl_scram_sha1_client_step,
+   _gsasl_scram_sha1_client_finish,
 #else
-    NULL,
-    NULL,
-    NULL,
+   NULL,
+   NULL,
+   NULL,
 #endif
-    NULL,
-    NULL
-  },
+   NULL,
+   NULL}
+  ,
   {
-    NULL,
-    NULL,
+   NULL,
+   NULL,
 #ifdef USE_SERVER
-    _gsasl_scram_sha1_server_start,
-    _gsasl_scram_sha1_server_step,
-    _gsasl_scram_sha1_server_finish,
+   _gsasl_scram_sha1_server_start,
+   _gsasl_scram_sha1_server_step,
+   _gsasl_scram_sha1_server_finish,
 #else
-    NULL,
-    NULL,
-    NULL,
+   NULL,
+   NULL,
+   NULL,
 #endif
-    NULL,
-    NULL
-  }
+   NULL,
+   NULL}
 };
 #endif
 
@@ -68,34 +67,33 @@ Gsasl_mechanism gsasl_scram_sha1_mechanism = {
 Gsasl_mechanism gsasl_scram_sha1_plus_mechanism = {
   GSASL_SCRAM_SHA1_PLUS_NAME,
   {
-    NULL,
-    NULL,
+   NULL,
+   NULL,
 #ifdef USE_CLIENT
-    _gsasl_scram_sha1_plus_client_start,
-    _gsasl_scram_sha1_client_step,
-    _gsasl_scram_sha1_client_finish,
+   _gsasl_scram_sha1_plus_client_start,
+   _gsasl_scram_sha1_client_step,
+   _gsasl_scram_sha1_client_finish,
 #else
-    NULL,
-    NULL,
-    NULL,
+   NULL,
+   NULL,
+   NULL,
 #endif
-    NULL,
-    NULL
-  },
+   NULL,
+   NULL}
+  ,
   {
-    NULL,
-    NULL,
+   NULL,
+   NULL,
 #ifdef USE_SERVER
-    _gsasl_scram_sha1_plus_server_start,
-    _gsasl_scram_sha1_server_step,
-    _gsasl_scram_sha1_server_finish,
+   _gsasl_scram_sha1_plus_server_start,
+   _gsasl_scram_sha1_server_step,
+   _gsasl_scram_sha1_server_finish,
 #else
-    NULL,
-    NULL,
-    NULL,
+   NULL,
+   NULL,
+   NULL,
 #endif
-    NULL,
-    NULL
-  }
+   NULL,
+   NULL}
 };
 #endif
diff --git a/lib/scram/parser.c b/lib/scram/parser.c
index 057f43a..0c71f95 100644
--- a/lib/scram/parser.c
+++ b/lib/scram/parser.c
@@ -21,7 +21,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 /* Get prototypes. */
@@ -102,7 +102,7 @@ scram_parse_client_first (const char *str, size_t len,
       if (!cf->cbname)
        return -1;
       memcpy (cf->cbname, str, p - str);
-      cf->cbname[p- str] = '\0';
+      cf->cbname[p - str] = '\0';
       len -= (p - str);
       str += (p - str);
     }
diff --git a/lib/scram/parser.h b/lib/scram/parser.h
index 7f398cc..8487969 100644
--- a/lib/scram/parser.h
+++ b/lib/scram/parser.h
@@ -21,7 +21,7 @@
  */
 
 #ifndef SCRAM_PARSER_H
-# define SCRAM_PARSER_H
+#define SCRAM_PARSER_H
 
 /* Get token types. */
 #include "tokens.h"
diff --git a/lib/scram/printer.c b/lib/scram/printer.c
index adb8be8..bb62e79 100644
--- a/lib/scram/printer.c
+++ b/lib/scram/printer.c
@@ -21,7 +21,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 /* Get prototypes. */
@@ -105,9 +105,7 @@ scram_print_client_first (struct scram_client_first *cf, 
char **out)
                cf->cbflag == 'p' ? "=" : "",
                cf->cbflag == 'p' ? cf->cbname : "",
                authzid ? "a=" : "",
-               authzid ? authzid : "",
-               username,
-               cf->client_nonce);
+               authzid ? authzid : "", username, cf->client_nonce);
 
   free (username);
   free (authzid);
@@ -152,8 +150,7 @@ scram_print_client_final (struct scram_client_final *cl, 
char **out)
   if (!scram_valid_client_final (cl))
     return -1;
 
-  n = asprintf (out, "c=%s,r=%s,p=%s",
-               cl->cbind, cl->nonce, cl->proof);
+  n = asprintf (out, "c=%s,r=%s,p=%s", cl->cbind, cl->nonce, cl->proof);
   if (n <= 0 || *out == NULL)
     return -1;
 
diff --git a/lib/scram/printer.h b/lib/scram/printer.h
index ec0e43d..34a8b27 100644
--- a/lib/scram/printer.h
+++ b/lib/scram/printer.h
@@ -21,7 +21,7 @@
  */
 
 #ifndef SCRAM_PRINTER_H
-# define SCRAM_PRINTER_H
+#define SCRAM_PRINTER_H
 
 /* Get token types. */
 #include "tokens.h"
diff --git a/lib/scram/scram.h b/lib/scram/scram.h
index ef8d557..e11f697 100644
--- a/lib/scram/scram.h
+++ b/lib/scram/scram.h
@@ -31,8 +31,7 @@
 extern Gsasl_mechanism gsasl_scram_sha1_mechanism;
 extern Gsasl_mechanism gsasl_scram_sha1_plus_mechanism;
 
-int
-_gsasl_scram_sha1_client_start (Gsasl_session * sctx, void **mech_data);
+int _gsasl_scram_sha1_client_start (Gsasl_session * sctx, void **mech_data);
 
 int
 _gsasl_scram_sha1_plus_client_start (Gsasl_session * sctx, void **mech_data);
@@ -43,12 +42,10 @@ _gsasl_scram_sha1_client_step (Gsasl_session * sctx,
                               const char *input, size_t input_len,
                               char **output, size_t * output_len);
 
-void
-_gsasl_scram_sha1_client_finish (Gsasl_session * sctx, void *mech_data);
+void _gsasl_scram_sha1_client_finish (Gsasl_session * sctx, void *mech_data);
 
 
-int
-_gsasl_scram_sha1_server_start (Gsasl_session * sctx, void **mech_data);
+int _gsasl_scram_sha1_server_start (Gsasl_session * sctx, void **mech_data);
 
 int
 _gsasl_scram_sha1_plus_server_start (Gsasl_session * sctx, void **mech_data);
@@ -60,7 +57,6 @@ _gsasl_scram_sha1_server_step (Gsasl_session * sctx,
                               size_t input_len,
                               char **output, size_t * output_len);
 
-void
-_gsasl_scram_sha1_server_finish (Gsasl_session * sctx, void *mech_data);
+void _gsasl_scram_sha1_server_finish (Gsasl_session * sctx, void *mech_data);
 
 #endif /* SCRAM_H */
diff --git a/lib/scram/server.c b/lib/scram/server.c
index 45faade..d6d7ad5 100644
--- a/lib/scram/server.c
+++ b/lib/scram/server.c
@@ -21,7 +21,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 /* Get specification. */
@@ -53,9 +53,9 @@ struct scram_server_state
   int plus;
   int step;
   char *cbind;
-  char *gs2header; /* copy of client first gs2-header */
-  char *cfmb_str; /* copy of client first message bare */
-  char *sf_str; /* copy of server first message */
+  char *gs2header;             /* copy of client first gs2-header */
+  char *cfmb_str;              /* copy of client first message bare */
+  char *sf_str;                        /* copy of server first message */
   char *snonce;
   char *clientproof;
   char *storedkey;
@@ -87,8 +87,7 @@ scram_start (Gsasl_session * sctx, void **mech_data, int plus)
   if (rc != GSASL_OK)
     goto end;
 
-  rc = gsasl_base64_to (buf, SNONCE_ENTROPY_BYTES,
-                       &state->snonce, NULL);
+  rc = gsasl_base64_to (buf, SNONCE_ENTROPY_BYTES, &state->snonce, NULL);
   if (rc != GSASL_OK)
     goto end;
 
@@ -96,8 +95,7 @@ scram_start (Gsasl_session * sctx, void **mech_data, int plus)
   if (rc != GSASL_OK)
     goto end;
 
-  rc = gsasl_base64_to (buf, DEFAULT_SALT_BYTES,
-                       &state->sf.salt, NULL);
+  rc = gsasl_base64_to (buf, DEFAULT_SALT_BYTES, &state->sf.salt, NULL);
   if (rc != GSASL_OK)
     goto end;
 
@@ -119,7 +117,7 @@ scram_start (Gsasl_session * sctx, void **mech_data, int 
plus)
 
   return GSASL_OK;
 
- end:
+end:
   free (state->sf.salt);
   free (state->snonce);
   free (state);
@@ -169,9 +167,8 @@ _gsasl_scram_sha1_server_step (Gsasl_session * sctx,
        /* In non-PLUS mode, but where have channel bindings data (and
           thus advertised PLUS) we reject a client 'y' cbflag. */
        if (!state->plus
-           && state->cbtlsuniquelen > 0
-           && state->cf.cbflag == 'y')
-           return GSASL_AUTHENTICATION_ERROR;
+           && state->cbtlsuniquelen > 0 && state->cf.cbflag == 'y')
+         return GSASL_AUTHENTICATION_ERROR;
 
        /* Check that username doesn't fail SASLprep. */
        {
diff --git a/lib/scram/tokens.c b/lib/scram/tokens.c
index 131ae09..4145a0f 100644
--- a/lib/scram/tokens.c
+++ b/lib/scram/tokens.c
@@ -30,7 +30,7 @@
 #include <string.h>
 
 void
-scram_free_client_first (struct scram_client_first * cf)
+scram_free_client_first (struct scram_client_first *cf)
 {
   free (cf->cbname);
   free (cf->authzid);
@@ -41,7 +41,7 @@ scram_free_client_first (struct scram_client_first * cf)
 }
 
 void
-scram_free_server_first (struct scram_server_first * sf)
+scram_free_server_first (struct scram_server_first *sf)
 {
   free (sf->nonce);
   free (sf->salt);
@@ -50,7 +50,7 @@ scram_free_server_first (struct scram_server_first * sf)
 }
 
 void
-scram_free_client_final (struct scram_client_final * cl)
+scram_free_client_final (struct scram_client_final *cl)
 {
   free (cl->cbind);
   free (cl->nonce);
@@ -60,7 +60,7 @@ scram_free_client_final (struct scram_client_final * cl)
 }
 
 void
-scram_free_server_final (struct scram_server_final * sl)
+scram_free_server_final (struct scram_server_final *sl)
 {
   free (sl->verifier);
 
diff --git a/lib/scram/tokens.h b/lib/scram/tokens.h
index 4b48d9a..630703e 100644
--- a/lib/scram/tokens.h
+++ b/lib/scram/tokens.h
@@ -21,7 +21,7 @@
  */
 
 #ifndef SCRAM_TOKENS_H
-# define SCRAM_TOKENS_H
+#define SCRAM_TOKENS_H
 
 /* Get size_t. */
 #include <stddef.h>
@@ -54,12 +54,12 @@ struct scram_server_final
   char *verifier;
 };
 
-extern void scram_free_client_first (struct scram_client_first * cf);
+extern void scram_free_client_first (struct scram_client_first *cf);
 
-extern void scram_free_server_first (struct scram_server_first * sf);
+extern void scram_free_server_first (struct scram_server_first *sf);
 
-extern void scram_free_client_final (struct scram_client_final * cl);
+extern void scram_free_client_final (struct scram_client_final *cl);
 
-extern void scram_free_server_final (struct scram_server_final * sl);
+extern void scram_free_server_final (struct scram_server_final *sl);
 
 #endif /* SCRAM_TOKENS_H */
diff --git a/lib/scram/validate.c b/lib/scram/validate.c
index 6fa5fd2..5d20a75 100644
--- a/lib/scram/validate.c
+++ b/lib/scram/validate.c
@@ -21,7 +21,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 /* Get prototypes. */
@@ -56,8 +56,7 @@ scram_valid_client_first (struct scram_client_first *cf)
       const char *p = cf->cbname;
 
       while (*p && strchr ("ABCDEFGHIJKLMNOPQRSTUVWXYZ"
-                          "abcdefghijklmnopqrstuvwxyz"
-                          "0123456789.-", *p))
+                          "abcdefghijklmnopqrstuvwxyz" "0123456789.-", *p))
        p++;
       if (*p)
        return false;
@@ -79,7 +78,7 @@ scram_valid_client_first (struct scram_client_first *cf)
 }
 
 bool
-scram_valid_server_first (struct scram_server_first *sf)
+scram_valid_server_first (struct scram_server_first * sf)
 {
   /* We require a non-zero nonce. */
   if (sf->nonce == NULL || *sf->nonce == '\0')
@@ -104,7 +103,7 @@ scram_valid_server_first (struct scram_server_first *sf)
 }
 
 bool
-scram_valid_client_final (struct scram_client_final *cl)
+scram_valid_client_final (struct scram_client_final * cl)
 {
   /* We require a non-zero cbind. */
   if (cl->cbind == NULL || *cl->cbind == '\0')
@@ -134,7 +133,7 @@ scram_valid_client_final (struct scram_client_final *cl)
 }
 
 bool
-scram_valid_server_final (struct scram_server_final *sl)
+scram_valid_server_final (struct scram_server_final * sl)
 {
   /* We require a non-zero verifier. */
   if (sl->verifier == NULL || *sl->verifier == '\0')
diff --git a/lib/scram/validate.h b/lib/scram/validate.h
index a641adb..c3908f2 100644
--- a/lib/scram/validate.h
+++ b/lib/scram/validate.h
@@ -21,7 +21,7 @@
  */
 
 #ifndef SCRAM_VALIDATE_H
-# define SCRAM_VALIDATE_H
+#define SCRAM_VALIDATE_H
 
 /* Get token types. */
 #include "tokens.h"
diff --git a/lib/securid/client.c b/lib/securid/client.c
index 8d10da3..08cdeb6 100644
--- a/lib/securid/client.c
+++ b/lib/securid/client.c
@@ -21,7 +21,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 /* Get specification. */
diff --git a/lib/securid/mechinfo.c b/lib/securid/mechinfo.c
index 9b8b722..577cc91 100644
--- a/lib/securid/mechinfo.c
+++ b/lib/securid/mechinfo.c
@@ -21,7 +21,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 /* Get specification. */
diff --git a/lib/securid/server.c b/lib/securid/server.c
index 21d2bf3..9dfc620 100644
--- a/lib/securid/server.c
+++ b/lib/securid/server.c
@@ -21,7 +21,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 /* Get specification. */
diff --git a/lib/src/crypto.c b/lib/src/crypto.c
index 1b456a0..9519755 100644
--- a/lib/src/crypto.c
+++ b/lib/src/crypto.c
@@ -137,7 +137,7 @@ gsasl_sha1 (const char *in, size_t inlen, char *out[20])
  **/
 int
 gsasl_hmac_sha1 (const char *key, size_t keylen,
-               const char *in, size_t inlen, char *outhash[20])
+                const char *in, size_t inlen, char *outhash[20])
 {
   *outhash = malloc (20);
   if (!*outhash)
diff --git a/lib/src/done.c b/lib/src/done.c
index abc9541..5801def 100644
--- a/lib/src/done.c
+++ b/lib/src/done.c
@@ -42,7 +42,7 @@ gsasl_done (Gsasl * ctx)
     if (ctx->client_mechs[i].client.done)
       ctx->client_mechs[i].client.done (ctx);
 
-    free (ctx->client_mechs);
+  free (ctx->client_mechs);
 #endif
 
 #ifdef USE_SERVER
diff --git a/lib/src/gsasl-compat.h b/lib/src/gsasl-compat.h
index 396f588..951fb9a 100644
--- a/lib/src/gsasl-compat.h
+++ b/lib/src/gsasl-compat.h
@@ -21,13 +21,13 @@
  */
 
 #ifndef GSASL_COMPAT_H
-# define GSASL_COMPAT_H
+#define GSASL_COMPAT_H
 
 #ifndef __attribute__
 /* This feature is available in gcc versions 2.5 and later.  */
-# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)
-#  define __attribute__(Spec)  /* empty */
-# endif
+#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)
+#define __attribute__(Spec)    /* empty */
+#endif
 #endif
 
 /* Old error codes */
@@ -287,8 +287,8 @@ __attribute__ ((deprecated));
 extern GSASL_API Gsasl_client_callback_maxbuf
 gsasl_client_callback_maxbuf_get (Gsasl * ctx) __attribute__ ((deprecated));
 extern GSASL_API
-void gsasl_client_callback_realm_set (Gsasl * ctx,
-                                     Gsasl_client_callback_realm cb)
+  void gsasl_client_callback_realm_set (Gsasl * ctx,
+                                       Gsasl_client_callback_realm cb)
   __attribute__ ((deprecated));
 extern GSASL_API Gsasl_client_callback_realm
 gsasl_client_callback_realm_get (Gsasl * ctx) __attribute__ ((deprecated));
diff --git a/lib/src/gsasl-mech.h b/lib/src/gsasl-mech.h
index 6a6cedf..6a2b6d0 100644
--- a/lib/src/gsasl-mech.h
+++ b/lib/src/gsasl-mech.h
@@ -21,7 +21,7 @@
  */
 
 #ifndef GSASL_MECH_H
-# define GSASL_MECH_H
+#define GSASL_MECH_H
 
 /* Mechanism function prototypes. */
 typedef int (*Gsasl_init_function) (Gsasl * ctx);
diff --git a/lib/src/gsasl.h b/lib/src/gsasl.h
index eadb892..f0b6e28 100644
--- a/lib/src/gsasl.h
+++ b/lib/src/gsasl.h
@@ -21,28 +21,28 @@
  */
 
 #ifndef GSASL_H
-# define GSASL_H
-
-# include <stdio.h>            /* FILE */
-# include <stddef.h>           /* size_t */
-# include <unistd.h>           /* ssize_t */
-
-# ifndef GSASL_API
-#  if defined GSASL_BUILDING && defined HAVE_VISIBILITY && HAVE_VISIBILITY
-#   define GSASL_API __attribute__((__visibility__("default")))
-#  elif defined GSASL_BUILDING && defined _MSC_VER && ! defined GSASL_STATIC
-#   define GSASL_API __declspec(dllexport)
-#  elif defined _MSC_VER && ! defined GSASL_STATIC
-#   define GSASL_API __declspec(dllimport)
-#  else
-#   define GSASL_API
-#  endif
-# endif
-
-# ifdef __cplusplus
+#define GSASL_H
+
+#include <stdio.h>             /* FILE */
+#include <stddef.h>            /* size_t */
+#include <unistd.h>            /* ssize_t */
+
+#ifndef GSASL_API
+#if defined GSASL_BUILDING && defined HAVE_VISIBILITY && HAVE_VISIBILITY
+#define GSASL_API __attribute__((__visibility__("default")))
+#elif defined GSASL_BUILDING && defined _MSC_VER && ! defined GSASL_STATIC
+#define GSASL_API __declspec(dllexport)
+#elif defined _MSC_VER && ! defined GSASL_STATIC
+#define GSASL_API __declspec(dllimport)
+#else
+#define GSASL_API
+#endif
+#endif
+
+#ifdef __cplusplus
 extern "C"
 {
-# endif
+#endif
 
   /**
    * GSASL_VERSION
@@ -51,7 +51,7 @@ extern "C"
    * version number.  Used together with gsasl_check_version() to
    * verify header file and run-time library consistency.
    */
-# define GSASL_VERSION "1.7.3"
+#define GSASL_VERSION "1.7.3"
 
   /**
    * GSASL_VERSION_MAJOR
@@ -62,7 +62,7 @@ extern "C"
    *
    * Since: 1.1
    */
-# define GSASL_VERSION_MAJOR 1
+#define GSASL_VERSION_MAJOR 1
 
   /**
    * GSASL_VERSION_MINOR
@@ -73,7 +73,7 @@ extern "C"
    *
    * Since: 1.1
    */
-# define GSASL_VERSION_MINOR 7
+#define GSASL_VERSION_MINOR 7
 
   /**
    * GSASL_VERSION_PATCH
@@ -84,7 +84,7 @@ extern "C"
    *
    * Since: 1.1
    */
-# define GSASL_VERSION_PATCH 3
+#define GSASL_VERSION_PATCH 3
 
   /**
    * GSASL_VERSION_NUMBER
@@ -95,7 +95,7 @@ extern "C"
    *
    * Since: 1.1
    */
-# define GSASL_VERSION_NUMBER 0x010703
+#define GSASL_VERSION_NUMBER 0x010703
 
   /* RFC 2222: SASL mechanisms are named by strings, from 1 to 20
    * characters in length, consisting of upper-case letters, digits,
@@ -210,8 +210,8 @@ extern "C"
     GSASL_GSSAPI_INQUIRE_MECH_FOR_SASLNAME_ERROR = 62,
     GSASL_GSSAPI_TEST_OID_SET_MEMBER_ERROR = 63,
     GSASL_GSSAPI_RELEASE_OID_SET_ERROR = 64
-    /* When adding new values, note that integers are not necessarily
-       assigned monotonously increasingly. */
+      /* When adding new values, note that integers are not necessarily
+         assigned monotonously increasingly. */
   } Gsasl_rc;
 
   /**
@@ -474,15 +474,15 @@ extern "C"
   extern GSASL_API void gsasl_free (void *ptr);
 
   /* Get the mechanism API. */
-# include <gsasl-mech.h>
+#include <gsasl-mech.h>
 
 #ifndef GSASL_NO_OBSOLETE
   /* For compatibility with earlier versions. */
-# include <gsasl-compat.h>
+#include <gsasl-compat.h>
 #endif
 
-# ifdef __cplusplus
+#ifdef __cplusplus
 }
-# endif
+#endif
 
 #endif                         /* GSASL_H */
diff --git a/lib/src/internal.h b/lib/src/internal.h
index 82eddc4..90e055c 100644
--- a/lib/src/internal.h
+++ b/lib/src/internal.h
@@ -21,20 +21,20 @@
  */
 
 #ifndef INTERNAL_H
-# define INTERNAL_H
+#define INTERNAL_H
 
-# ifdef HAVE_CONFIG_H
-#  include "config.h"
-# endif
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
 /* Get specifications. */
-# include "gsasl.h"
+#include "gsasl.h"
 
 /* Get malloc, free, ... */
-# include <stdlib.h>
+#include <stdlib.h>
 
 /* Get strlen, strcpy, ... */
-# include <string.h>
+#include <string.h>
 
 /* Main library handle. */
 struct Gsasl
@@ -115,8 +115,8 @@ struct Gsasl_session
 };
 
 #ifndef GSASL_NO_OBSOLETE
-const char *
-_gsasl_obsolete_property_map (Gsasl_session * sctx, Gsasl_property prop);
+const char *_gsasl_obsolete_property_map (Gsasl_session * sctx,
+                                         Gsasl_property prop);
 int _gsasl_obsolete_callback (Gsasl * ctx, Gsasl_session * sctx,
                              Gsasl_property prop);
 #endif
diff --git a/lib/src/mechtools.c b/lib/src/mechtools.c
index 75e3f23..08e9986 100644
--- a/lib/src/mechtools.c
+++ b/lib/src/mechtools.c
@@ -21,7 +21,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 /* Get specification. */
@@ -168,7 +168,7 @@ int
 _gsasl_gs2_generate_header (bool nonstd, char cbflag,
                            const char *cbname, const char *authzid,
                            size_t extralen, const char *extra,
-                           char **gs2h, size_t *gs2hlen)
+                           char **gs2h, size_t * gs2hlen)
 {
   int elen = extralen;
   char *gs2cbflag;
diff --git a/lib/src/mechtools.h b/lib/src/mechtools.h
index e471871..1d74d78 100644
--- a/lib/src/mechtools.h
+++ b/lib/src/mechtools.h
@@ -21,7 +21,7 @@
  */
 
 #ifndef MECHTOOLS_H
-# define MECHTOOLS_H
+#define MECHTOOLS_H
 
 /* Get size_t. */
 #include <stddef.h>
@@ -33,8 +33,9 @@ extern int _gsasl_parse_gs2_header (const char *data, size_t 
len,
                                    char **authzid, size_t * headerlen);
 
 extern int _gsasl_gs2_generate_header (bool nonstd, char cbflag,
-                                      const char *cbname, const char *authzid,
-                                      size_t extralen, const char *extra,
-                                      char **gs2h, size_t *gs2hlen);
+                                      const char *cbname,
+                                      const char *authzid, size_t extralen,
+                                      const char *extra, char **gs2h,
+                                      size_t * gs2hlen);
 
 #endif
diff --git a/lib/src/obsolete.c b/lib/src/obsolete.c
index 0fd4bc3..1098ee4 100644
--- a/lib/src/obsolete.c
+++ b/lib/src/obsolete.c
@@ -23,7 +23,7 @@
 #include "internal.h"
 
 #if USE_DIGEST_MD5
-# include "qop.h"
+#include "qop.h"
 #endif
 
 /**
@@ -1630,7 +1630,7 @@ gsasl_server_callback_service_get (Gsasl * ctx)
 }
 
 #if HAVE_LIBIDN
-# include <stringprep.h>
+#include <stringprep.h>
 #endif
 
 /**
@@ -2092,7 +2092,7 @@ _gsasl_obsolete_callback (Gsasl * ctx, Gsasl_session * 
sctx,
       {
        Gsasl_server_callback_securid cb_securid
          = gsasl_server_callback_securid_get (sctx->ctx);
-#define MAX_SECURID 32 /* See RFC 2808. */
+#define MAX_SECURID 32         /* See RFC 2808. */
        char buf[MAX_SECURID + 1];
        size_t buflen = MAX_SECURID;
        if (!cb_securid)
@@ -2161,7 +2161,8 @@ _gsasl_obsolete_callback (Gsasl * ctx, Gsasl_session * 
sctx,
          break;
        qops = cb_qop (sctx);
        if (qops & 0x07)
-         gsasl_property_set (sctx, GSASL_QOPS, digest_md5_qops2qopstr(qops));
+         gsasl_property_set (sctx, GSASL_QOPS,
+                             digest_md5_qops2qopstr (qops));
        return GSASL_OK;
        break;
       }
diff --git a/lib/src/property.c b/lib/src/property.c
index a5bb1fb..b0e654d 100644
--- a/lib/src/property.c
+++ b/lib/src/property.c
@@ -117,8 +117,8 @@ map (Gsasl_session * sctx, Gsasl_property prop)
       break;
 
       /* If you add anything here, remember to change change
-        gsasl_finish() in xfinish.c and Gsasl_session in
-        internal.h.  */
+         gsasl_finish() in xfinish.c and Gsasl_session in
+         internal.h.  */
 
     default:
       break;
diff --git a/lib/src/saslprep.c b/lib/src/saslprep.c
index 8926d06..2c06a8c 100644
--- a/lib/src/saslprep.c
+++ b/lib/src/saslprep.c
@@ -23,10 +23,10 @@
 #include "internal.h"
 
 #if HAVE_LIBIDN
-# include <stringprep.h>
-# if defined HAVE_PR29_H && defined HAVE_PR29_8Z
-#  include <pr29.h>
-# endif
+#include <stringprep.h>
+#if defined HAVE_PR29_H && defined HAVE_PR29_8Z
+#include <pr29.h>
+#endif
 #endif
 
 /**
@@ -64,7 +64,7 @@ gsasl_saslprep (const char *in, Gsasl_saslprep_flags flags,
       return GSASL_SASLPREP_ERROR;
     }
 
-# if defined HAVE_PR29_8Z && defined HAVE_PR29_H
+#if defined HAVE_PR29_8Z && defined HAVE_PR29_H
   if (pr29_8z (*out) != PR29_SUCCESS)
     {
       free (*out);
diff --git a/maint.mk b/maint.mk
index 951b358..2228a37 100644
--- a/maint.mk
+++ b/maint.mk
@@ -279,7 +279,7 @@ define _sc_search_regexp
    if test -n "$$files"; then                                          \
      if test -n "$$prohibit"; then                                     \
        grep $$with_grep_options $(_ignore_case) -nE "$$prohibit" $$files \
-         | grep -vE "$${exclude-^$$}"                                  \
+         | grep -vE "$${exclude:-^$$}"                                 \
          && { msg="$$halt" $(_sc_say_and_exit) } || :;                 \
      else                                                              \
        grep $$with_grep_options $(_ignore_case) -LE "$$require" $$files \
diff --git a/src/callbacks.c b/src/callbacks.c
index 70a3501..dff810b 100644
--- a/src/callbacks.c
+++ b/src/callbacks.c
@@ -25,7 +25,7 @@
 #include "readline.h"
 
 #if HAVE_LANGINFO_CODESET
-# include <langinfo.h>         /* For nl_langinfo. */
+#include <langinfo.h>          /* For nl_langinfo. */
 #endif
 
 static char *
diff --git a/src/gsasl.c b/src/gsasl.c
index 5efdd7b..fb829d4 100644
--- a/src/gsasl.c
+++ b/src/gsasl.c
@@ -26,7 +26,7 @@
 #include "sockets.h"
 
 #ifdef HAVE_LIBGNUTLS
-# include <gnutls/gnutls.h>
+#include <gnutls/gnutls.h>
 gnutls_session session;
 bool using_tls = false;
 #endif
@@ -263,10 +263,10 @@ const char version_etc_copyright[] =
   "Copyright %s %d Simon Josefsson.";
 
 static void
-usage (int status) GSASL_ATTR_NO_RETRUN;
-
-static void
 usage (int status)
+  GSASL_ATTR_NO_RETRUN;
+
+     static void usage (int status)
 {
   if (status != EXIT_SUCCESS)
     fprintf (stderr, _("Try `%s --help' for more information.\n"),
@@ -355,7 +355,8 @@ main (int argc, char *argv[])
        {
          connect_hostname = xstrdup (args_info.connect_arg);
          *strrchr (connect_hostname, ':') = '\0';
-         connect_service = xstrdup (strrchr (args_info.connect_arg, ':') + 1);
+         connect_service =
+           xstrdup (strrchr (args_info.connect_arg, ':') + 1);
        }
       else
        {
@@ -597,8 +598,7 @@ main (int argc, char *argv[])
          gnutls_datum cb;
 
          res = gnutls_session_channel_binding (session,
-                                               GNUTLS_CB_TLS_UNIQUE,
-                                               &cb);
+                                               GNUTLS_CB_TLS_UNIQUE, &cb);
          if (res != GNUTLS_E_SUCCESS)
            error (EXIT_FAILURE, 0, _("getting channel binding failed: %s"),
                   gnutls_strerror (res));
@@ -729,7 +729,8 @@ main (int argc, char *argv[])
 
          if (!args_info.quiet_given)
            {
-             fprintf (stderr, _("Enter application data (EOF to finish):\n"));
+             fprintf (stderr,
+                      _("Enter application data (EOF to finish):\n"));
              fflush (stderr);
            }
 
@@ -761,7 +762,7 @@ main (int argc, char *argv[])
 
                  if (args_info.imap_flag || args_info.smtp_flag)
                    {
-                     if (len < 2 || strcmp (&line[len-2], "\r\n") != 0)
+                     if (len < 2 || strcmp (&line[len - 2], "\r\n") != 0)
                        {
                          line = xrealloc (line, len + 2);
                          line[len - 1] = '\r';
@@ -776,8 +777,7 @@ main (int argc, char *argv[])
                      line[len] = '\0';
                    }
 
-                 res = gsasl_encode (xctx, line, len,
-                                     &out, &output_len);
+                 res = gsasl_encode (xctx, line, len, &out, &output_len);
                  if (res != GSASL_OK)
                    break;
 
@@ -842,13 +842,14 @@ main (int argc, char *argv[])
 
                  res = gsasl_decode (xctx, sockbuf, sockpos,
                                      &out, &output_len);
-                 if (res == GSASL_NEEDS_MORE) {
+                 if (res == GSASL_NEEDS_MORE)
+                   {
 #define MAX_INPUT_SIZE 0x100000
-                   if (sockpos > MAX_INPUT_SIZE)
-                     error (EXIT_FAILURE, 0,
-                            _("SASL record too large: %zu\n"), sockpos);
-                   continue;
-                 }
+                     if (sockpos > MAX_INPUT_SIZE)
+                       error (EXIT_FAILURE, 0,
+                              _("SASL record too large: %zu\n"), sockpos);
+                     continue;
+                   }
                  if (res != GSASL_OK)
                    break;
 
@@ -858,7 +859,7 @@ main (int argc, char *argv[])
                  sockalloc = 0;
                  sockalloc1 = 1000;
 
-                 printf("%.*s", (int) output_len, out);
+                 printf ("%.*s", (int) output_len, out);
                  free (out);
                }
              /* If there was an error, quit.  */
diff --git a/src/imap.c b/src/imap.c
index d297c08..22da867 100644
--- a/src/imap.c
+++ b/src/imap.c
@@ -160,8 +160,8 @@ imap_step_recv (char **data)
   if (!args_info.server_flag)
     {
       /* skip untagged responses which can be returned by the server after
-        authentication (e.g. dovecot returns new '* CAPABILITY' information
-        before the final '. OK'). */
+         authentication (e.g. dovecot returns new '* CAPABILITY' information
+         before the final '. OK'). */
       while (*p == '*')
        {
          if (!readln (data))
diff --git a/src/internal.h b/src/internal.h
index b3c1a80..8cdd05c 100644
--- a/src/internal.h
+++ b/src/internal.h
@@ -22,7 +22,7 @@
 #define _INTERNAL_H
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 #include <stdio.h>
@@ -40,7 +40,7 @@
 #include <netinet/in.h>
 #include <netdb.h>
 #ifdef HAVE_PWD_H
-# include <pwd.h>              /* getpwuid */
+#include <pwd.h>               /* getpwuid */
 #endif
 
 #include <gsasl.h>
@@ -70,9 +70,9 @@ extern char *b64cbtlsunique;
 
 /* This feature is available in gcc versions 2.5 and later.  */
 #if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)
-# define GSASL_ATTR_NO_RETRUN
+#define GSASL_ATTR_NO_RETRUN
 #else
-# define GSASL_ATTR_NO_RETRUN __attribute__ ((__noreturn__))
+#define GSASL_ATTR_NO_RETRUN __attribute__ ((__noreturn__))
 #endif
 
 #endif /* _INTERNAL_H */
diff --git a/src/smtp.c b/src/smtp.c
index 4244f1f..98933ee 100644
--- a/src/smtp.c
+++ b/src/smtp.c
@@ -182,7 +182,7 @@ smtp_step_recv (char **data)
   if (strncmp (p, "235 ", 4) == 0)
     {
       /* Never a token here, we don't support additional server
-        information on success. */
+         information on success. */
       return 2;
     }
 
diff --git a/tests/cram-md5.c b/tests/cram-md5.c
index 489a7ae..e649ada 100644
--- a/tests/cram-md5.c
+++ b/tests/cram-md5.c
@@ -19,7 +19,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 #include <stdio.h>
@@ -85,8 +85,8 @@ doit (void)
       || !gsasl_server_support_p (ctx, "CRAM-MD5"))
     {
       gsasl_done (ctx);
-      fail("No support for CRAM-MD5.\n");
-      exit(77);
+      fail ("No support for CRAM-MD5.\n");
+      exit (77);
     }
 
   gsasl_callback_set (ctx, callback);
diff --git a/tests/crypto.c b/tests/crypto.c
index 15f12d9..954e8e5 100644
--- a/tests/crypto.c
+++ b/tests/crypto.c
@@ -19,7 +19,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 #include <stdio.h>
@@ -52,7 +52,7 @@ doit (void)
     fail ("gsasl_nonce %d: %s\n", rc, gsasl_strerror (rc));
   if (memcmp (savetmp, tmp, SIZE) == 0)
     fail ("gsasl_nonce memcmp fail\n");
-  success("gsasl_nonce\n");
+  success ("gsasl_nonce\n");
 
 #if 0
   /* This often times out on build machines. */
@@ -63,7 +63,7 @@ doit (void)
     fail ("gsasl_random %d: %s\n", rc, gsasl_strerror (rc));
   if (memcmp (savetmp, tmp, SIZE) == 0)
     fail ("gsasl_random memcmp fail\n");
-  success("gsasl_random\n");
+  success ("gsasl_random\n");
 #endif
 
   rc = gsasl_md5 ("abc", 3, &hash);
@@ -72,7 +72,7 @@ doit (void)
   if (memcmp (hash, "\x90\x01\x50\x98\x3C\xD2\x4F\xB0"
              "\xD6\x96\x3F\x7D\x28\xE1\x7F\x72", 16) != 0)
     fail ("gsasl_md5 memcmp fail\n");
-  success("gsasl_md5\n");
+  success ("gsasl_md5\n");
   gsasl_free (hash);
 
   rc = gsasl_hmac_md5 ("\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
@@ -83,7 +83,7 @@ doit (void)
   if (memcmp (hash, "\x92\x94\x72\x7a\x36\x38\xbb\x1c"
              "\x13\xf4\x8e\xf8\x15\x8b\xfc\x9d", 16) != 0)
     fail ("gsasl_hmac_md5 memcmp fail\n");
-  success("gsasl_hmac_md5\n");
+  success ("gsasl_hmac_md5\n");
   gsasl_free (hash);
 
   rc = gsasl_sha1 ("abc", 3, &hash);
@@ -92,7 +92,7 @@ doit (void)
   if (memcmp (hash, "\xa9\x99\x3e\x36\x47\x06\x81\x6a\xba\x3e\x25"
              "\x71\x78\x50\xc2\x6c\x9c\xd0\xd8\x9d", 20) != 0)
     fail ("gsasl_sha1 memcmp fail\n");
-  success("gsasl_sha1\n");
+  success ("gsasl_sha1\n");
   gsasl_free (hash);
 
   rc = gsasl_hmac_sha1 ("\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
@@ -103,7 +103,7 @@ doit (void)
   if (memcmp (hash, "\x67\x5b\x0b\x3a\x1b\x4d\xdf\x4e\x12\x48\x72"
              "\xda\x6c\x2f\x63\x2b\xfe\xd9\x57\xe9", 20) != 0)
     fail ("gsasl_hmac_sha1 memcmp fail\n");
-  success("gsasl_hmac_sha1\n");
+  success ("gsasl_hmac_sha1\n");
   gsasl_free (hash);
 
   gsasl_done (ctx);
diff --git a/tests/digest-md5.c b/tests/digest-md5.c
index 45df013..6c75fd9 100644
--- a/tests/digest-md5.c
+++ b/tests/digest-md5.c
@@ -19,7 +19,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 #include <stdio.h>
@@ -181,8 +181,8 @@ doit (void)
       || !gsasl_server_support_p (ctx, "DIGEST-MD5"))
     {
       gsasl_done (ctx);
-      fail("No support for DIGEST-MD5.\n");
-      exit(77);
+      fail ("No support for DIGEST-MD5.\n");
+      exit (77);
     }
 
   gsasl_callback_set (ctx, callback);
@@ -416,8 +416,7 @@ doit (void)
       res = gsasl_encode (client, "foo", 3, &s1, &s1len);
       if (res != GSASL_OK)
        {
-         fail ("gsasl_encode failed (%d):\n%s\n", res,
-               gsasl_strerror (res));
+         fail ("gsasl_encode failed (%d):\n%s\n", res, gsasl_strerror (res));
          return;
        }
 
@@ -449,8 +448,7 @@ doit (void)
       free (s1);
       if (res != GSASL_OK)
        {
-         fail ("gsasl_decode failed (%d):\n%s\n", res,
-               gsasl_strerror (res));
+         fail ("gsasl_decode failed (%d):\n%s\n", res, gsasl_strerror (res));
          return;
        }
 
@@ -497,8 +495,7 @@ doit (void)
       free (s1);
       if (res != GSASL_OK)
        {
-         fail ("gsasl_decode failed (%d):\n%s\n", res,
-               gsasl_strerror (res));
+         fail ("gsasl_decode failed (%d):\n%s\n", res, gsasl_strerror (res));
          return;
        }
 
diff --git a/tests/errors.c b/tests/errors.c
index 64de6a3..b59127c 100644
--- a/tests/errors.c
+++ b/tests/errors.c
@@ -19,7 +19,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 #include <stdio.h>
@@ -36,22 +36,24 @@ main (void)
   const char *name;
   int i = 0;
 
-  do {
-    last = this;
+  do
+    {
+      last = this;
 
-    this = gsasl_strerror (i);
-    name = gsasl_strerror_name (i);
+      this = gsasl_strerror (i);
+      name = gsasl_strerror_name (i);
 
-    printf ("%s (%d)\n\t%s\n", name ? name : "NULL", i, this);
+      printf ("%s (%d)\n\t%s\n", name ? name : "NULL", i, this);
 
-    if (this == NULL)
-      {
-       printf ("Null error string?!\n");
-       return EXIT_FAILURE;
-      }
+      if (this == NULL)
+       {
+         printf ("Null error string?!\n");
+         return EXIT_FAILURE;
+       }
 
-    i++;
-  } while (this != last  && this != NULL);
+      i++;
+    }
+  while (this != last && this != NULL);
 
   return EXIT_SUCCESS;
 }
diff --git a/tests/external.c b/tests/external.c
index 5591997..19cace3 100644
--- a/tests/external.c
+++ b/tests/external.c
@@ -19,7 +19,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 #include <stdio.h>
@@ -101,8 +101,8 @@ doit (void)
       || !gsasl_server_support_p (ctx, "EXTERNAL"))
     {
       gsasl_done (ctx);
-      fail("No support for EXTERNAL.\n");
-      exit(77);
+      fail ("No support for EXTERNAL.\n");
+      exit (77);
     }
 
   gsasl_callback_set (ctx, callback);
diff --git a/tests/gs2-krb5.c b/tests/gs2-krb5.c
index 10139dd..e2ffe12 100644
--- a/tests/gs2-krb5.c
+++ b/tests/gs2-krb5.c
@@ -19,7 +19,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 #include <stdio.h>
@@ -131,8 +131,8 @@ doit (void)
       || !gsasl_server_support_p (ctx, "GS2-KRB5"))
     {
       gsasl_done (ctx);
-      fail("No support for GS2-KRB5.\n");
-      exit(77);
+      fail ("No support for GS2-KRB5.\n");
+      exit (77);
     }
 
   gsasl_callback_set (ctx, callback);
@@ -174,7 +174,7 @@ doit (void)
        {
          res1 = gsasl_step64 (server, s1, &s2);
          if (s1 == NULL && res1 == GSASL_OK)
-           fail("gsasl_step64 direct success?\n");
+           fail ("gsasl_step64 direct success?\n");
          if (s1)
            {
              gsasl_free (s1);
diff --git a/tests/gssapi.c b/tests/gssapi.c
index 0bc3e9f..c91d84c 100644
--- a/tests/gssapi.c
+++ b/tests/gssapi.c
@@ -19,7 +19,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 #include <stdio.h>
diff --git a/tests/md5file.c b/tests/md5file.c
index be67c7b..efe6263 100644
--- a/tests/md5file.c
+++ b/tests/md5file.c
@@ -19,7 +19,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 #include <stdio.h>
diff --git a/tests/name.c b/tests/name.c
index 80dc308..9faa8ff 100644
--- a/tests/name.c
+++ b/tests/name.c
@@ -19,7 +19,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 #include <stdio.h>
diff --git a/tests/old-base64.c b/tests/old-base64.c
index 661e5e8..a15093f 100644
--- a/tests/old-base64.c
+++ b/tests/old-base64.c
@@ -19,7 +19,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 #include <stdio.h>
diff --git a/tests/old-cram-md5.c b/tests/old-cram-md5.c
index a0ecf6e..99a046a 100644
--- a/tests/old-cram-md5.c
+++ b/tests/old-cram-md5.c
@@ -19,7 +19,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 #include <stdio.h>
@@ -104,8 +104,8 @@ doit (void)
       || !gsasl_server_support_p (ctx, "CRAM-MD5"))
     {
       gsasl_done (ctx);
-      fail("No support for CRAM-MD5.\n");
-      exit(77);
+      fail ("No support for CRAM-MD5.\n");
+      exit (77);
     }
 
   gsasl_server_callback_retrieve_set (ctx, server_cb_retrieve);
diff --git a/tests/old-digest-md5.c b/tests/old-digest-md5.c
index fa38cff..eebf6d0 100644
--- a/tests/old-digest-md5.c
+++ b/tests/old-digest-md5.c
@@ -19,7 +19,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 #include <stdio.h>
@@ -55,7 +55,7 @@ server_cb_retrieve (Gsasl_session_ctx * xctx,
 static Gsasl_qop
 server_cb_qop (Gsasl_session_ctx * xctx)
 {
-  int i = *(int*) gsasl_appinfo_get (xctx);
+  int i = *(int *) gsasl_appinfo_get (xctx);
   if (i == 1 || i == 3)
     return GSASL_QOP_AUTH;
   else if (i == 2)
@@ -134,8 +134,8 @@ doit (void)
       || !gsasl_server_support_p (ctx, "DIGEST-MD5"))
     {
       gsasl_done (ctx);
-      fail("No support for DIGEST-MD5.\n");
-      exit(77);
+      fail ("No support for DIGEST-MD5.\n");
+      exit (77);
     }
 
   gsasl_server_callback_retrieve_set (ctx, server_cb_retrieve);
@@ -169,7 +169,7 @@ doit (void)
          return;
        }
 
-      gsasl_appinfo_set (server, (void*) &i);
+      gsasl_appinfo_set (server, (void *) &i);
 
       /* Server begins... */
 
diff --git a/tests/old-gssapi.c b/tests/old-gssapi.c
index 0fdc34a..d597700 100644
--- a/tests/old-gssapi.c
+++ b/tests/old-gssapi.c
@@ -19,7 +19,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 #include <stdio.h>
diff --git a/tests/old-md5file.c b/tests/old-md5file.c
index fa86d77..85d97bc 100644
--- a/tests/old-md5file.c
+++ b/tests/old-md5file.c
@@ -19,7 +19,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 #include <stdio.h>
diff --git a/tests/old-simple.c b/tests/old-simple.c
index 70714bc..5418c7e 100644
--- a/tests/old-simple.c
+++ b/tests/old-simple.c
@@ -19,7 +19,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 #include <stdio.h>
@@ -520,13 +520,13 @@ doit (void)
            break;
        }
 
-      if (j != (size_t) -1 && res == GSASL_OK && sasltv[i].step[j + 2])
+      if (j != (size_t) - 1 && res == GSASL_OK && sasltv[i].step[j + 2])
        fail ("SASL entry %d mechanism %s step %d code ended prematurely\n",
              i, sasltv[i].mech, j);
-      else if (j != (size_t) -1 && res == GSASL_NEEDS_MORE)
+      else if (j != (size_t) - 1 && res == GSASL_NEEDS_MORE)
        fail ("SASL entry %d mechanism %s step %d table ended prematurely\n",
              i, sasltv[i].mech, j);
-      else if (j != (size_t) -1 && res != GSASL_OK)
+      else if (j != (size_t) - 1 && res != GSASL_OK)
        fail ("SASL entry %d mechanism %s step %d failed (%d):\n%s\n",
              i, sasltv[i].mech, j, res, gsasl_strerror (res));
       else
diff --git a/tests/readnz.c b/tests/readnz.c
index c0705b4..610767a 100644
--- a/tests/readnz.c
+++ b/tests/readnz.c
@@ -19,7 +19,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 #include <stdio.h>
@@ -55,8 +55,7 @@ doit2 (bool server_p)
     res = gsasl_client_mechlist (ctx, &mechs);
   if (res != GSASL_OK)
     {
-      fail ("mechlist() failed (%d):\n%s\n",
-           res, gsasl_strerror (res));
+      fail ("mechlist() failed (%d):\n%s\n", res, gsasl_strerror (res));
       return;
     }
 
diff --git a/tests/saml20.c b/tests/saml20.c
index 73a3359..936af78 100644
--- a/tests/saml20.c
+++ b/tests/saml20.c
@@ -19,7 +19,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 #include <stdio.h>
@@ -147,15 +147,15 @@ doit (void)
   if (!gsasl_client_support_p (c, "SAML20"))
     {
       gsasl_done (c);
-      fail("No support for SAML20 clients.\n");
-      exit(77);
+      fail ("No support for SAML20 clients.\n");
+      exit (77);
     }
 
   if (!gsasl_server_support_p (s, "SAML20"))
     {
       gsasl_done (s);
-      fail("No support for SAML20 servers.\n");
-      exit(77);
+      fail ("No support for SAML20 servers.\n");
+      exit (77);
     }
 
   gsasl_callback_set (c, client_callback);
diff --git a/tests/scram.c b/tests/scram.c
index 6633e52..3988b77 100644
--- a/tests/scram.c
+++ b/tests/scram.c
@@ -19,7 +19,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 #include <stdio.h>
@@ -35,8 +35,8 @@
 #define N_AUTHID 4
 static const char *AUTHID[N_AUTHID] = {
   "Ali Baba", "BAB,ABA", ",=,=", "="
-  /* "Ali " "\xC2\xAD" "Bab" "\xC2\xAA" */
-  /* "Al\xC2\xAA""dd\xC2\xAD""in\xC2\xAE" */
+    /* "Ali " "\xC2\xAD" "Bab" "\xC2\xAA" */
+    /* "Al\xC2\xAA""dd\xC2\xAD""in\xC2\xAE" */
 };
 
 #define N_AUTHZID 4
@@ -94,7 +94,7 @@ callback (Gsasl * ctx, Gsasl_session * sctx, Gsasl_property 
prop)
       break;
 
     case GSASL_SCRAM_SALTED_PASSWORD:
-      if (i & 0x04 && i & 0x08) /* Only works with fixed salt. */
+      if (i & 0x04 && i & 0x08)        /* Only works with fixed salt. */
        {
          const char *str[] = {
            "06bfd2d70a0fa425c20473722a93700df39f3cbd",
@@ -138,8 +138,8 @@ doit (void)
       || !gsasl_server_support_p (ctx, "SCRAM-SHA-1"))
     {
       gsasl_done (ctx);
-      fail("No support for SCRAM-SHA-1.\n");
-      exit(77);
+      fail ("No support for SCRAM-SHA-1.\n");
+      exit (77);
     }
 
   gsasl_callback_set (ctx, callback);
diff --git a/tests/scramplus.c b/tests/scramplus.c
index 41d486f..aedeea2 100644
--- a/tests/scramplus.c
+++ b/tests/scramplus.c
@@ -19,7 +19,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 #include <stdio.h>
@@ -35,8 +35,8 @@
 #define N_AUTHID 4
 static const char *AUTHID[N_AUTHID] = {
   "Ali Baba", "BAB,ABA", ",=,=", "="
-  /* "Ali " "\xC2\xAD" "Bab" "\xC2\xAA" */
-  /* "Al\xC2\xAA""dd\xC2\xAD""in\xC2\xAE" */
+    /* "Ali " "\xC2\xAD" "Bab" "\xC2\xAA" */
+    /* "Al\xC2\xAA""dd\xC2\xAD""in\xC2\xAE" */
 };
 
 #define N_AUTHZID 4
@@ -94,7 +94,7 @@ callback (Gsasl * ctx, Gsasl_session * sctx, Gsasl_property 
prop)
       break;
 
     case GSASL_SCRAM_SALTED_PASSWORD:
-      if (i & 0x04 && i & 0x08) /* Only works with fixed salt. */
+      if (i & 0x04 && i & 0x08)        /* Only works with fixed salt. */
        {
          const char *str[] = {
            "06bfd2d70a0fa425c20473722a93700df39f3cbd",
@@ -140,8 +140,8 @@ doit (void)
       || !gsasl_server_support_p (ctx, "SCRAM-SHA-1-PLUS"))
     {
       gsasl_done (ctx);
-      fail("No support for SCRAM-SHA-1-PLUS.\n");
-      exit(77);
+      fail ("No support for SCRAM-SHA-1-PLUS.\n");
+      exit (77);
     }
 
   gsasl_callback_set (ctx, callback);
@@ -244,7 +244,7 @@ doit (void)
 
       /* Modify cbdata. */
       if (i == 19)
-         s1[30] = 'B';
+       s1[30] = 'B';
 
       if (debug)
        printf ("C: %.*s [%c]\n", (int) s1len,
diff --git a/tests/simple.c b/tests/simple.c
index e3f89a6..35b18d6 100644
--- a/tests/simple.c
+++ b/tests/simple.c
@@ -19,7 +19,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 #include <stdio.h>
@@ -189,7 +189,8 @@ cb (Gsasl * ctx, Gsasl_session * sctx, Gsasl_property prop)
     case GSASL_SUGGESTED_PIN:
     case GSASL_PIN:
       {
-       const char *suggestion = gsasl_property_fast (sctx, 
GSASL_SUGGESTED_PIN);
+       const char *suggestion =
+         gsasl_property_fast (sctx, GSASL_SUGGESTED_PIN);
        if (suggestion && sasltv[i].suggestpin
            && strcmp (suggestion, sasltv[i].suggestpin) != 0)
          return GSASL_AUTHENTICATION_ERROR;
@@ -292,15 +293,17 @@ doit (void)
   if (res != GSASL_OK)
     fail ("gsasl_client_mechlist() failed (%d):\n%s\n",
          res, gsasl_strerror (res));
-  success("client_mechlist: %s\n", out);
-  gsasl_free (out); out = NULL;
+  success ("client_mechlist: %s\n", out);
+  gsasl_free (out);
+  out = NULL;
 
   res = gsasl_server_mechlist (ctx, &out);
   if (res != GSASL_OK)
     fail ("gsasl_server_mechlist() failed (%d):\n%s\n",
          res, gsasl_strerror (res));
-  success("server_mechlist: %s\n", out);
-  gsasl_free (out); out = NULL;
+  success ("server_mechlist: %s\n", out);
+  gsasl_free (out);
+  out = NULL;
 
   for (i = 0; i < sizeof (sasltv) / sizeof (sasltv[0]); i++)
     {
@@ -344,7 +347,8 @@ doit (void)
 
          if (res != GSASL_OK && res != GSASL_NEEDS_MORE)
            {
-             fail ("gsasl_step64 failed (%d): %s", res, gsasl_strerror (res));
+             fail ("gsasl_step64 failed (%d): %s", res,
+                   gsasl_strerror (res));
              break;
            }
 
@@ -371,19 +375,20 @@ doit (void)
              break;
            }
 
-         gsasl_free (out); out = NULL;
+         gsasl_free (out);
+         out = NULL;
 
          if (strcmp (sasltv[i].mech, "SECURID") != 0 && res == GSASL_OK)
            break;
        }
 
-      if (j != (size_t) -1 && res == GSASL_OK && sasltv[i].step[j + 2])
+      if (j != (size_t) - 1 && res == GSASL_OK && sasltv[i].step[j + 2])
        fail ("SASL entry %d mechanism %s step %d code ended prematurely\n",
              i, sasltv[i].mech, j);
-      else if (j != (size_t) -1 && res == GSASL_NEEDS_MORE)
+      else if (j != (size_t) - 1 && res == GSASL_NEEDS_MORE)
        fail ("SASL entry %d mechanism %s step %d table ended prematurely\n",
              i, sasltv[i].mech, j);
-      else if (j != (size_t) -1 && res != GSASL_OK)
+      else if (j != (size_t) - 1 && res != GSASL_OK)
        fail ("SASL entry %d mechanism %s step %d failed (%d):\n%s\n",
              i, sasltv[i].mech, j, res, gsasl_strerror (res));
       else
@@ -398,14 +403,16 @@ doit (void)
          fail ("gsasl_encode %d: %s\n", res, gsasl_strerror (res));
        if (outlen != 3 && memcmp (out, "foo", outlen) != 0)
          fail ("gsasl_encode memcmp: %.*s\n", (int) outlen, out);
-       gsasl_free (out); out = NULL;
+       gsasl_free (out);
+       out = NULL;
 
        res = gsasl_decode (sctx, "foo", 3, &out, &outlen);
        if (res != GSASL_OK)
          fail ("gsasl_decode %d: %s\n", res, gsasl_strerror (res));
        if (outlen != 3 && memcmp (out, "foo", outlen) != 0)
          fail ("gsasl_decode memcmp: %.*s\n", (int) outlen, out);
-       gsasl_free (out); out = NULL;
+       gsasl_free (out);
+       out = NULL;
       }
 
       gsasl_finish (sctx);
diff --git a/tests/suggest.c b/tests/suggest.c
index a9d13e3..17ce80e 100644
--- a/tests/suggest.c
+++ b/tests/suggest.c
@@ -19,7 +19,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 #include <stdio.h>
diff --git a/tests/symbols.c b/tests/symbols.c
index 66a0973..d8071ef 100644
--- a/tests/symbols.c
+++ b/tests/symbols.c
@@ -19,7 +19,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 #include <assert.h>
@@ -88,10 +88,14 @@ main (void)
   assert_symbol_exists ((const void *) gsasl_client_application_data_set);
   assert_symbol_exists ((const void *) gsasl_client_callback_anonymous_get);
   assert_symbol_exists ((const void *) gsasl_client_callback_anonymous_set);
-  assert_symbol_exists ((const void *) 
gsasl_client_callback_authentication_id_get);
-  assert_symbol_exists ((const void *) 
gsasl_client_callback_authentication_id_set);
-  assert_symbol_exists ((const void *) 
gsasl_client_callback_authorization_id_get);
-  assert_symbol_exists ((const void *) 
gsasl_client_callback_authorization_id_set);
+  assert_symbol_exists ((const void *)
+                       gsasl_client_callback_authentication_id_get);
+  assert_symbol_exists ((const void *)
+                       gsasl_client_callback_authentication_id_set);
+  assert_symbol_exists ((const void *)
+                       gsasl_client_callback_authorization_id_get);
+  assert_symbol_exists ((const void *)
+                       gsasl_client_callback_authorization_id_set);
   assert_symbol_exists ((const void *) gsasl_client_callback_maxbuf_get);
   assert_symbol_exists ((const void *) gsasl_client_callback_maxbuf_set);
   assert_symbol_exists ((const void *) gsasl_client_callback_passcode_get);
diff --git a/tests/utils.c b/tests/utils.c
index 79e366e..f05daad 100644
--- a/tests/utils.c
+++ b/tests/utils.c
@@ -19,7 +19,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 #include <stdio.h>
diff --git a/tests/utils.h b/tests/utils.h
index fe6c205..11e92b7 100644
--- a/tests/utils.h
+++ b/tests/utils.h
@@ -19,11 +19,11 @@
  */
 
 #ifndef UTILS_H
-# define UTILS_H
+#define UTILS_H
 
-# include <string.h>
-# include <stdarg.h>
-# include <gsasl.h>
+#include <string.h>
+#include <stdarg.h>
+#include <gsasl.h>
 
 extern int debug;
 extern int error_count;


hooks/post-receive
-- 
GNU gsasl



reply via email to

[Prev in Thread] Current Thread [Next in Thread]