[Top][All Lists]

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

Re: [bug-gnulib] getlogin_r.m4 and host_os.m4

From: Bruno Haible
Subject: Re: [bug-gnulib] getlogin_r.m4 and host_os.m4
Date: Thu, 28 Sep 2006 22:10:14 +0200
User-agent: KMail/1.9.1

Paul Eggert wrote:
> the getlogin_r.m4 change (adding
> AC_REQUIRE([AC_GNU_SOURCE])) looks a bit GNU-specific.  Wouldn't it be
> better to depend on the 'extensions' module instead?  That would catch
> similar problems in non-GNU systems.
> (Come to think of it, doesn't a similar argument apply to the 30 or so
> other uses of AC_GNU_SOURCE in gnulib?  I guess I can bring that up on
> a different thread....)

Traditionally, we use AC_GNU_SOURCE to get declarations on glibc systems,
and gl_USE_SYSTEM_EXTENSIONS to get declarations on glibc and Solaris

getlogin_r appears to have the same problem on Solaris as on glibc, says
a look into <unistd.h>. So it's good to use gl_USE_SYSTEM_EXTENSIONS in this

memmem(), on the other hand, is not defined in Solaris headers. It's a
pure glibc invention. Checking whether to define __EXTENSIONS__ for using
memmem() would be pointless.

So IMO whether to use AC_GNU_SOURCE or 'extensions' needs to be decided
on a case by case basis.


reply via email to

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