[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: dirfd on AIX 7.1BETA
From: |
Jarno Rajahalme |
Subject: |
Re: dirfd on AIX 7.1BETA |
Date: |
Fri, 3 Sep 2010 20:55:27 +0300 |
On Jul 31, 2010, at 12:52 , ext Bruno Haible wrote:
> Rainer Tammer wrote:
>> maybe this is only a glich in the AIX7BETA ?
>
> Maybe. But the commit that I did does not harm; it increases gnulib's
> robustness also for other platforms.
>
> Bruno
>
Bruno,
Apparently this was not the case on OSX (my case) or FreeBSD (see
http://savannah.gnu.org/bugs/?30721).
I get a compiler error:
In file included from sysdir.h:34:0,
from dir-ops.cc:34:
../libgnu/dirent.h:380:1: error: '::dirfd' has not been declared
This appeared since the changes to the lib/dirent.in.h
OSX declares dirfd as a macro:
config.log:
configure:15560: checking whether dirfd is declared without a macro
conftest.c:184:10: error: 'dirfd' undeclared (first use in this function)
...
configure:15621: checking whether dirfd is declared
configure:15638: checking whether dirfd is a macro
| #define HAVE_DECL_DIRFD 1
| #define GNULIB_TEST_DIRFD 1
...
ac_cv_func_dirfd=no
ac_cv_have_decl_dirfd=yes
gl_cv_func_dirfd_macro=yes
gl_cv_have_raw_decl_dirfd=no
GNULIB_DIRFD='1'
HAVE_DECL_DIRFD='1'
REPLACE_DIRFD='0'
...
This works for me for now:
*** libgnu/dirent.h~ Fri Sep 3 20:21:32 2010
--- libgnu/dirent.h Fri Sep 3 20:23:02 2010
***************
*** 377,385 ****
--- 377,389 ----
# if !(1 || defined dirfd)
_GL_FUNCDECL_SYS (dirfd, int, (DIR *) _GL_ARG_NONNULL ((1)));
# endif
+ #if !defined(dirfd)
_GL_CXXALIAS_SYS (dirfd, int, (DIR *));
+ #endif
# endif
+ #if !defined(dirfd)
_GL_CXXALIASWARN (dirfd);
+ #endif
#elif defined GNULIB_POSIXCHECK
# undef dirfd
# if HAVE_RAW_DECL_DIRFD
Maybe the CXX macros don't like a macro as dirfd???
Regards,
Jarno
- Re: dirfd on AIX 7.1BETA,
Jarno Rajahalme <=