]> code.delx.au - gnu-emacs/blobdiff - lib/getopt.c
* lib/getopt.c, lib/stat.c, m4/gl-comp.m4: Merge from gnulib.
[gnu-emacs] / lib / getopt.c
index 23510d8afec30de37e89f7d3eeca72854cd6f57e..2af8352ee9c93ba7d19e0c8e34fd37306332b885 100644 (file)
@@ -829,7 +829,7 @@ _getopt_internal_r (int argc, char **argv, const char *optstring,
         return '?';
       }
     /* Convenience. Treat POSIX -W foo same as long option --foo */
-    if (temp[0] == 'W' && temp[1] == ';')
+    if (temp[0] == 'W' && temp[1] == ';' && longopts)
       {
         char *nameend;
         const struct option *p;