Sync with gnulib f345edc03da1a81f313dd70305764025bffeb1fa.

Port 'open' and 'close' redefinitions to AIX 7.1.

Do not #undef 'open' and 'close'. AIX 7 does '#define open open64' and
then 'int open64(const char *, int, ...);', which means the declaration
for 'open' gets lost if we later '#undef open'. Discovered while
building grep pretest 2.18.151-1c770 on AIX 7.1, where the compilation
reported the non-fatal error "In function 'openat_proc_name' ...
warning: implicit declaration of function 'open'". In this case the
error is relatively harmless, but in other cases it might not be so
minor.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2014-05-25 09:34:54 +04:00
parent 40caba34a9
commit 84ce2f2b25

View File

@ -193,11 +193,6 @@
#define HAVE_INFOMOUNT #define HAVE_INFOMOUNT
#endif #endif
/* The results of open() in this file are not used with fchdir,
therefore save some unnecessary work in fchdir.c. */
#undef open
#undef close
/* The results of opendir() in this file are not used with dirfd and fchdir, /* The results of opendir() in this file are not used with dirfd and fchdir,
therefore save some unnecessary work in fchdir.c. */ therefore save some unnecessary work in fchdir.c. */
#undef opendir #undef opendir