From 41f9f674fd42e4a8a366eb4caba39f6a6c5f8cab Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Fri, 30 Jul 2010 20:51:04 +0200 Subject: [PATCH] getopt: Update regarding AIX. --- ChangeLog | 8 ++++++++ doc/posix-functions/getopt.texi | 2 +- m4/getopt.m4 | 12 ++++++------ 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 63f9b262e..f53398357 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2010-07-30 Bruno Haible + getopt: Update regarding AIX. + * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): When cross-compiling, guess + no on AIX. + * doc/posix-functions/getopt.texi: Mention that AIX has the optind bug. + Reported by Rainer Tammer. + +2010-07-30 Bruno Haible + ldexpl; Update regarding AIX. * m4/ldexpl.m4 (gl_FUNC_LDEXPL_WORKS): When cross-compiling, guess yes on AIX 7. diff --git a/doc/posix-functions/getopt.texi b/doc/posix-functions/getopt.texi index 50640a850..5ee2d04cb 100644 --- a/doc/posix-functions/getopt.texi +++ b/doc/posix-functions/getopt.texi @@ -19,7 +19,7 @@ mingw. @item The value of @code{optind} after a missing required argument is wrong on some platforms: -MacOS 10.5. +MacOS 10.5, AIX 7.1. @end itemize Portability problems fixed by Gnulib module @code{getopt-gnu}: diff --git a/m4/getopt.m4 b/m4/getopt.m4 index 5b211e567..caa5df435 100644 --- a/m4/getopt.m4 +++ b/m4/getopt.m4 @@ -1,4 +1,4 @@ -# getopt.m4 serial 28 +# getopt.m4 serial 29 dnl Copyright (C) 2002-2006, 2008-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -102,7 +102,7 @@ AC_DEFUN([gl_GETOPT_CHECK_HEADERS], AC_CACHE_CHECK([whether getopt is POSIX compatible], [gl_cv_func_getopt_posix], [ - dnl This test fails on mingw and succeeds on all other platforms. + dnl This test fails on mingw and succeeds on many other platforms. AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include #include @@ -176,7 +176,7 @@ main () if (!(optind == 1)) return 12; } - /* Detect MacOS 10.5 bug. */ + /* Detect MacOS 10.5, AIX 7.1 bug. */ { char *argv[3] = { "program", "-ab", NULL }; optind = OPTIND_MIN; @@ -196,9 +196,9 @@ main () ]])], [gl_cv_func_getopt_posix=yes], [gl_cv_func_getopt_posix=no], [case "$host_os" in - mingw*) gl_cv_func_getopt_posix="guessing no";; - darwin*) gl_cv_func_getopt_posix="guessing no";; - *) gl_cv_func_getopt_posix="guessing yes";; + mingw*) gl_cv_func_getopt_posix="guessing no";; + darwin* | aix*) gl_cv_func_getopt_posix="guessing no";; + *) gl_cv_func_getopt_posix="guessing yes";; esac ]) ]) -- 2.11.0