krb5 commit: Define _GNU_SOURCE for glibc extensions

Greg Hudson ghudson at MIT.EDU
Tue Jul 8 20:17:07 EDT 2014


https://github.com/krb5/krb5/commit/7ecf85644d8ef616781e6689a8dd504316cb6d7a
commit 7ecf85644d8ef616781e6689a8dd504316cb6d7a
Author: Greg Hudson <ghudson at mit.edu>
Date:   Sat Jul 5 12:01:40 2014 -0400

    Define _GNU_SOURCE for glibc extensions
    
    glibc does not declare a number of common, useful extensions such as
    asprintf unless _GNU_SOURCE is defined.  Define it early in the
    configure process so that it is available for autoconf tests.
    
    Defining _GNU_SOURCE unfortunately causes glibc to use the non-POSIX
    version of strerror_r, which we now handle using the k5-platform.h
    wrapper.
    
    ticket: 7961

 src/aclocal.m4 |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/aclocal.m4 b/src/aclocal.m4
index a0d1bf1..ff444ee 100644
--- a/src/aclocal.m4
+++ b/src/aclocal.m4
@@ -50,6 +50,9 @@ AC_DEFUN(CONFIG_RULES,[dnl
 AC_REQUIRE([V5_SET_TOPDIR]) dnl
 EXTRA_FILES=""
 AC_SUBST(EXTRA_FILES)
+dnl Consider using AC_USE_SYSTEM_EXTENSIONS when we require autoconf
+dnl 2.59c or later, but be sure to test on Solaris first.
+AC_DEFINE([_GNU_SOURCE], 1, [Define to enable extensions in glibc])
 WITH_CC dnl
 AC_REQUIRE_CPP
 if test -z "$LD" ; then LD=$CC; fi


More information about the cvs-krb5 mailing list