bug-gnulib
[Top][All Lists]
Advanced

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

getopt on AIX 7.1BETA


From: Bruno Haible
Subject: getopt on AIX 7.1BETA
Date: Fri, 30 Jul 2010 20:51:13 +0200
User-agent: KMail/1.9.9

The logs say:

configure:14572: checking whether getopt is POSIX compatible
configure:14680: xlc -o conftest -g  -D_THREAD_SAFE  conftest.c  >&5
configure:14680: $? = 0
configure:14680: ./conftest
configure:14680: $? = 16
configure: program exited with status 16

gl_cv_func_getopt_posix=${gl_cv_func_getopt_posix=no}


2010-07-30  Bruno Haible  <address@hidden>

        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.

--- doc/posix-functions/getopt.texi.orig        Fri Jul 30 18:44:34 2010
+++ doc/posix-functions/getopt.texi     Fri Jul 30 11:50:12 2010
@@ -19,7 +19,7 @@
 @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}:
--- m4/getopt.m4.orig   Fri Jul 30 18:44:35 2010
+++ m4/getopt.m4        Fri Jul 30 11:51:12 2010
@@ -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_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 <unistd.h>
 #include <stdlib.h>
@@ -176,7 +176,7 @@
     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 @@
 ]])],
           [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
           ])
       ])



reply via email to

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