[Top][All Lists]

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

Re: Checks for getcwd(NULL, 0) and get_current_dir_name()

From: Svante Signell
Subject: Re: Checks for getcwd(NULL, 0) and get_current_dir_name()
Date: Fri, 19 Oct 2012 08:55:57 +0200

(adding bug-hurd on Cc:)

On Wed, 2012-10-17 at 17:42 +0200, Svante Signell wrote:
> > On Wed, 2012-10-17 at 16:15 +0200, Guillem Jover wrote:
> >               [Define to 1 if you have support for 'getcwd(NULL, 0)' GNU 
> > extension])
> BTW, why calling it a GNU extension, not GLIBC or LIBC.
> >From the man page:  As  an  extension  to  the  POSIX.1-2001 standard,
> Linux (libc4, libc5, glibc) getcwd() allocates the buffer dynamically
> using malloc(3) if buf is NULL. 
> get_current_dir_name() is a GNU extension though, again according to the
> man page.

Can we settle the naming of the HAVE_* for getcwd(NULL, 0) and
get_current_dir_name() with the corresponding text strings? I would like
to use these configure.ac snippets whenever appropriate (and having them
on one of the GNU/Hurd porting web pages). Of course a new test has to
be written also for get_current_dir_name(), wouldn't be difficult.

My proposal:
getcwd(NULL, 0): HAVE_GLIBC_GETCWD (maybe HAVE_GNU_GETCWD as Guillem
get_current_dirname(): HAVE_GNU_GETCWD or HAVE_GET_CURRENT_DIR_NAME (too
Of course the naming should reflect the correct development history and
POSIX versions.

reply via email to

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