Update.
authorUlrich Drepper <drepper@redhat.com>
Wed, 9 Sep 1998 11:53:19 +0000 (11:53 +0000)
committerUlrich Drepper <drepper@redhat.com>
Wed, 9 Sep 1998 11:53:19 +0000 (11:53 +0000)
1998-09-09 09:32  Ulrich Drepper  <drepper@cygnus.com>

* sysdeps/powerpc/dl-machine.h (elf_machine_rela): Make function
inline.

1998-09-07  Paul Eggert  <eggert@twinsun.com>

* time/mktime.c (__EXTENSIONS__): Define if not defined.
(_REENTRANT): Remove.  It has undesirable consequences in
Solaris 2.6 (e.g. it turns off the putc macro).  Defining
__EXTENSIONS__ makes localtime_r and gmtime_r visible, which
is what we want.
* time/strftime.c: Likewise.

1998-09-08  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

* elf/dl-error.c: Fix spelling.

1998-09-08  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

* stdlib/strfmon.c: Quiet -Wparentheses warnings.
* stdio-common/_itoa.c: Likewise.
* stdio-common/printf_fp.c: Likewise.
* stdio-common/vfscanf.c: Likewise.
* wcsmbs/wcstok.c: Likewise.
* sysdeps/generic/glob.c: Likewise.
* posix/getopt.c: Likewise.
* sysdeps/posix/getaddrinfo.c: Likewise.
* posix/wordexp.c: Likewise.
* io/ftw.c: Likewise.
* io/fts.c: Likewise.
* misc/getpass.c: Likewise.
* iconv/gconv_conf.c: Likewise.
* argp/argp-fmtstream.c: Likewise.
* argp/argp-help.c: Likewise.
* elf/dl-load.c: Likewise.
* locale/programs/stringtrans.c: Likewise.
* catgets/gencat.c: Likewise.
* posix/getconf.c: Likewise.
* iconv/gconv_conf.c: Likewise.
* iconv/iconv_prog.c: Likewise.

* string/strcoll.c: Optimize a few expressions.
* string/strxfrm.c: Likewise.

1998-09-08  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

* elf/dl-open.c (dl_open_worker): Move decl of new_global up one
level to avoid uninit variable warning.

1998-09-09 10:34  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
instead of _dl_default_scope[2] as argument to _dl_init_next.
Fix compatibility problems introduced in last change.

28 files changed:
ChangeLog
argp/argp-fmtstream.c
argp/argp-help.c
catgets/gencat.c
elf/dl-error.c
elf/dl-load.c
elf/dl-open.c
iconv/gconv_conf.c
iconv/iconv_prog.c
io/fts.c
io/ftw.c
locale/programs/stringtrans.c
misc/getpass.c
posix/getconf.c
posix/getopt.c
posix/wordexp.c
stdio-common/_itoa.c
stdio-common/printf_fp.c
stdio-common/vfscanf.c
stdlib/strfmon.c
string/strcoll.c
string/strxfrm.c
sysdeps/generic/glob.c
sysdeps/posix/getaddrinfo.c
sysdeps/powerpc/dl-machine.h
time/mktime.c
time/strftime.c
wcsmbs/wcstok.c

index 56143e375be6266c40f7ad1247d0c0d9b714e20f..436a362a19728cf7edebf0069ad21689dd6bfedf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,13 +1,64 @@
-Wed Sep  9 10:34:06 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
+1998-09-09 09:32  Ulrich Drepper  <drepper@cygnus.com>
+
+       * sysdeps/powerpc/dl-machine.h (elf_machine_rela): Make function
+       inline.
+
+1998-09-07  Paul Eggert  <eggert@twinsun.com>
+
+       * time/mktime.c (__EXTENSIONS__): Define if not defined.
+       (_REENTRANT): Remove.  It has undesirable consequences in
+       Solaris 2.6 (e.g. it turns off the putc macro).  Defining
+       __EXTENSIONS__ makes localtime_r and gmtime_r visible, which
+       is what we want.
+       * time/strftime.c: Likewise.
+
+1998-09-08  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
+
+       * elf/dl-error.c: Fix spelling.
+
+1998-09-08  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
+
+       * stdlib/strfmon.c: Quiet -Wparentheses warnings.
+       * stdio-common/_itoa.c: Likewise.
+       * stdio-common/printf_fp.c: Likewise.
+       * stdio-common/vfscanf.c: Likewise.
+       * wcsmbs/wcstok.c: Likewise.
+       * sysdeps/generic/glob.c: Likewise.
+       * posix/getopt.c: Likewise.
+       * sysdeps/posix/getaddrinfo.c: Likewise.
+       * posix/wordexp.c: Likewise.
+       * io/ftw.c: Likewise.
+       * io/fts.c: Likewise.
+       * misc/getpass.c: Likewise.
+       * iconv/gconv_conf.c: Likewise.
+       * argp/argp-fmtstream.c: Likewise.
+       * argp/argp-help.c: Likewise.
+       * elf/dl-load.c: Likewise.
+       * locale/programs/stringtrans.c: Likewise.
+       * catgets/gencat.c: Likewise.
+       * posix/getconf.c: Likewise.
+       * iconv/gconv_conf.c: Likewise.
+       * iconv/iconv_prog.c: Likewise.
+
+       * string/strcoll.c: Optimize a few expressions.
+       * string/strxfrm.c: Likewise.
+
+1998-09-08  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
+
+       * elf/dl-open.c (dl_open_worker): Move decl of new_global up one
+       level to avoid uninit variable warning.
+
+1998-09-09 10:34  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
 
        * sysdeps/m68k/dl-machine.h(RTLD_START): Push _dl_main_searchlist
-       instead of _dl_default_scope[2] as argument to _dl_init_next. 
+       instead of _dl_default_scope[2] as argument to _dl_init_next.
 
        * sysdeps/m68k/fpu/bits/mathinline.h (isinf): Avoid conflict with
        C9x macro.
 
 1998-09-08  Ulrich Drepper  <drepper@cygnus.com>
 
+       Fix compatibility problems introduced in last change.
        * csu/initfini.c: Don't define __gmon_start__ if WEAK_GMON_START is
        defined.
        * sysdeps/unix/sysv/linux/i386/Makefile [subdir==csu]: Add
index 1649f15cbbeecd2d79a07cf84373be58bcdb345f..d563c31b8e7a57562780fc26ade209359633f02a 100644 (file)
@@ -253,25 +253,27 @@ __argp_fmtstream_update (argp_fmtstream_t fs)
          if (nextline == buf + len + 1
              ? fs->end - nl < fs->wmargin + 1
              : nextline - (nl + 1) < fs->wmargin)
-           /* The margin needs more blanks than we removed.  */
-           if (fs->end - fs->p > fs->wmargin + 1)
-             /* Make some space for them.  */
-             {
-               size_t mv = fs->p - nextline;
-               memmove (nl + 1 + fs->wmargin, nextline, mv);
-               nextline = nl + 1 + fs->wmargin;
-               len = nextline + mv - buf;
-               *nl++ = '\n';
-             }
-           else
-             /* Output the first line so we can use the space.  */
-             {
-               if (nl > fs->buf)
-                 fwrite_unlocked (fs->buf, 1, nl - fs->buf, fs->stream);
-               putc_unlocked ('\n', fs->stream);
-               len += buf - fs->buf;
-               nl = buf = fs->buf;
-             }
+           {
+             /* The margin needs more blanks than we removed.  */
+             if (fs->end - fs->p > fs->wmargin + 1)
+               /* Make some space for them.  */
+               {
+                 size_t mv = fs->p - nextline;
+                 memmove (nl + 1 + fs->wmargin, nextline, mv);
+                 nextline = nl + 1 + fs->wmargin;
+                 len = nextline + mv - buf;
+                 *nl++ = '\n';
+               }
+             else
+               /* Output the first line so we can use the space.  */
+               {
+                 if (nl > fs->buf)
+                   fwrite_unlocked (fs->buf, 1, nl - fs->buf, fs->stream);
+                 putc_unlocked ('\n', fs->stream);
+                 len += buf - fs->buf;
+                 nl = buf = fs->buf;
+               }
+           }
          else
            /* We can fit the newline and blanks in before
               the next word.  */
index 8fe3b2e584e3065ba6ac865f382a82f315b9b9a0..9a1c05387ff6da8743b09ebc7c9a67e760f4e983 100644 (file)
@@ -183,14 +183,16 @@ fill_in_uparams (const struct argp_state *state)
              }
 
            if (unspec)
-             if (var[0] == 'n' && var[1] == 'o' && var[2] == '-')
-               {
-                 val = 0;
-                 var += 3;
-                 var_len -= 3;
-               }
-             else
-               val = 1;
+             {
+               if (var[0] == 'n' && var[1] == 'o' && var[2] == '-')
+                 {
+                   val = 0;
+                   var += 3;
+                   var_len -= 3;
+                 }
+               else
+                 val = 1;
+             }
            else if (isdigit (*arg))
              {
                val = atoi (arg);
@@ -709,20 +711,22 @@ hol_entry_cmp (const struct hol_entry *entry1,
   int group1 = entry1->group, group2 = entry2->group;
 
   if (entry1->cluster != entry2->cluster)
-    /* The entries are not within the same cluster, so we can't compare them
-       directly, we have to use the appropiate clustering level too.  */
-    if (! entry1->cluster)
-      /* ENTRY1 is at the `base level', not in a cluster, so we have to
-        compare it's group number with that of the base cluster in which
-        ENTRY2 resides.  Note that if they're in the same group, the
-        clustered option always comes laster.  */
-      return group_cmp (group1, hol_cluster_base (entry2->cluster)->group, -1);
-    else if (! entry2->cluster)
-      /* Likewise, but ENTRY2's not in a cluster.  */
-      return group_cmp (hol_cluster_base (entry1->cluster)->group, group2, 1);
-    else
-      /* Both entries are in clusters, we can just compare the clusters.  */
-      return hol_cluster_cmp (entry1->cluster, entry2->cluster);
+    {
+      /* The entries are not within the same cluster, so we can't compare them
+        directly, we have to use the appropiate clustering level too.  */
+      if (! entry1->cluster)
+       /* ENTRY1 is at the `base level', not in a cluster, so we have to
+          compare it's group number with that of the base cluster in which
+          ENTRY2 resides.  Note that if they're in the same group, the
+          clustered option always comes laster.  */
+       return group_cmp (group1, hol_cluster_base (entry2->cluster)->group, -1);
+      else if (! entry2->cluster)
+       /* Likewise, but ENTRY2's not in a cluster.  */
+       return group_cmp (hol_cluster_base (entry1->cluster)->group, group2, 1);
+      else
+       /* Both entries are in clusters, we can just compare the clusters.  */
+       return hol_cluster_cmp (entry1->cluster, entry2->cluster);
+    }
   else if (group1 == group2)
     /* The entries are both in the same cluster and group, so compare them
        alphabetically.  */
@@ -1115,13 +1119,15 @@ hol_entry_help (struct hol_entry *entry, const struct argp_state *state,
   __argp_fmtstream_set_lmargin (stream, 0);
 
   if (pest.first)
-    /* Didn't print any switches, what's up?  */
-    if (!oshort (real) && !real->name)
-      /* This is a group header, print it nicely.  */
-      print_header (real->doc, entry->argp, &pest);
-    else
-      /* Just a totally shadowed option or null header; print nothing.  */
-      goto cleanup;            /* Just return, after cleaning up.  */
+    {
+      /* Didn't print any switches, what's up?  */
+      if (!oshort (real) && !real->name)
+       /* This is a group header, print it nicely.  */
+       print_header (real->doc, entry->argp, &pest);
+      else
+       /* Just a totally shadowed option or null header; print nothing.  */
+       goto cleanup;           /* Just return, after cleaning up.  */
+    }
   else
     {
       const char *tstr = real->doc ? dgettext (state->root_argp->argp_domain,
index ee2b8cbf479e923a4a56555d66c075febbe9ebe4..d1c92a035baa681294aa0451dac7298d8fc8a936 100644 (file)
@@ -838,16 +838,18 @@ write_out (struct catalog *catalog, const char *output_name,
                 #define out.  But we have to take care for the set
                 not having a symbolic name.  */
              if (message_run->symbol != NULL)
-               if (set_run->symbol == NULL)
-                 fprintf (fp, "#define AutomaticSet%d%s %#x\t/* %s:%Zu */\n",
-                          set_run->number, message_run->symbol,
-                          message_run->number, message_run->fname,
-                          message_run->line);
-               else
-                 fprintf (fp, "#define %s%s %#x\t/* %s:%Zu */\n",
-                          set_run->symbol, message_run->symbol,
-                          message_run->number, message_run->fname,
-                          message_run->line);
+               {
+                 if (set_run->symbol == NULL)
+                   fprintf (fp, "#define AutomaticSet%d%s %#x\t/* %s:%Zu */\n",
+                            set_run->number, message_run->symbol,
+                            message_run->number, message_run->fname,
+                            message_run->line);
+                 else
+                   fprintf (fp, "#define %s%s %#x\t/* %s:%Zu */\n",
+                            set_run->symbol, message_run->symbol,
+                            message_run->number, message_run->fname,
+                            message_run->line);
+               }
 
              message_run = message_run->next;
            }
@@ -995,11 +997,13 @@ read_old (struct catalog *catalog, const char *file_name)
   __open_catalog (&old_cat_obj);
 
   if (old_cat_obj.status != mmapped && old_cat_obj.status != malloced)
-    if (errno == ENOENT)
-      /* No problem, the catalog simply does not exist.  */
-      return;
-    else
-      error (EXIT_FAILURE, errno, gettext ("while opening old catalog file"));
+    {
+      if (errno == ENOENT)
+       /* No problem, the catalog simply does not exist.  */
+       return;
+      else
+       error (EXIT_FAILURE, errno, gettext ("while opening old catalog file"));
+    }
 
   /* OK, we have the catalog loaded.  Now read all messages and merge
      them.  When set and message number clash for any message the new
index cfb6b9ead52dafe1e0c18df8330b2891a127f286..228c1a80a1a91b79f482cb34379c395fbeab4f55 100644 (file)
@@ -33,15 +33,15 @@ struct catch
   };
 
 /* Multiple threads at once can use the `_dl_catch_error' function.  The
-   calls can come from the `_dl_map_object_deps', `_dlerror_run', or from
+   calls can come from `_dl_map_object_deps', `_dlerror_run', or from
    any of the libc functionality which loads dynamic objects (NSS, iconv).
-   Therefore we have to be prepared to safe the state in thread-local
+   Therefore we have to be prepared to save the state in thread-local
    memory.  `catch' will only be used for the non-threaded case.
 
    Please note the horrible kludge we have to use to check for the
    thread functions to be defined.  The problem is that while running
-   ld.so standalone (i.e., before the relocation with the libc symbols
-   available) we do not have a real handling of undefined weak symbols.
+   ld.so standalone (i.e., before the relocation with the available
+   libc symbols) we do not have a real handling of undefined weak symbols.
    All symbols are relocated, regardless of the availability.  They are
    relocated relative to the load address of the dynamic linker.  Adding
    this start address to zero (the value in the GOT for undefined symbols)
index 35c34e03057f13f8964ac6d11ea0644e34b3d2ae..1082205a23041e4be9b2c2e9a8b1a8e6e2523422 100644 (file)
@@ -1100,23 +1100,25 @@ open_path (const char *name, size_t namelen, int preloaded,
 
          fd = __open (buf, O_RDONLY);
          if (this_dir->status[cnt] == unknown)
-           if (fd != -1)
-             this_dir->status[cnt] = existing;
-           else
-             {
-               /* We failed to open machine dependent library.  Let's
-                  test whether there is any directory at all.  */
-               struct stat st;
-
-               buf[buflen - namelen - 1] = '\0';
-
-               if (__xstat (_STAT_VER, buf, &st) != 0
-                   || ! S_ISDIR (st.st_mode))
-                 /* The directory does not exist or it is no directory.  */
-                 this_dir->status[cnt] = nonexisting;
-               else
-                 this_dir->status[cnt] = existing;
-             }
+           {
+             if (fd != -1)
+               this_dir->status[cnt] = existing;
+             else
+               {
+                 /* We failed to open machine dependent library.  Let's
+                    test whether there is any directory at all.  */
+                 struct stat st;
+
+                 buf[buflen - namelen - 1] = '\0';
+
+                 if (__xstat (_STAT_VER, buf, &st) != 0
+                     || ! S_ISDIR (st.st_mode))
+                   /* The directory does not exist or it is no directory.  */
+                   this_dir->status[cnt] = nonexisting;
+                 else
+                   this_dir->status[cnt] = existing;
+               }
+           }
 
          if (fd != -1 && preloaded && __libc_enable_secure)
            {
index 694b0ebfaaf1a73f722fe36804f8f74994b37440..e5509dffd411670980972b4126f82d3d87b5a197 100644 (file)
@@ -127,6 +127,8 @@ dl_open_worker (void *a)
   new->l_global = (mode & RTLD_GLOBAL) ? 1 : 0;
   if (new->l_global)
     {
+      struct link_map **new_global;
+
       /* The symbols of the new object and its dependencies are to be
         introduced into the global scope that will be used to resolve
         references from other dynamically-loaded objects.
@@ -143,8 +145,6 @@ dl_open_worker (void *a)
       if (_dl_global_scope_alloc == 0)
        {
          /* This is the first dynamic object given global scope.  */
-         struct link_map **new_global;
-
          _dl_global_scope_alloc = _dl_main_searchlist->r_nlist + 8;
          new_global = (struct link_map **)
            malloc (_dl_global_scope_alloc * sizeof (struct link_map *));
@@ -166,8 +166,6 @@ dl_open_worker (void *a)
        {
          /* We have to extend the existing array of link maps in the
             main map.  */
-         struct link_map **new_global;
-
          new_global = (struct link_map **)
            malloc ((_dl_global_scope_alloc + 8) * sizeof (struct link_map *));
          if (new_global == NULL)
index e58091a16349b341c00f27236bc74e56fc123858..4ab924a3deba556a4de51e3faee9ef69f2c00278 100644 (file)
@@ -291,11 +291,13 @@ add_module (char *rp, const char *directory, size_t dir_len, void **modules,
        memcpy (tmp - 1, gconv_module_ext, sizeof (gconv_module_ext));
 
       if (__tfind (new_module, modules, module_compare) == NULL)
-       if (__tsearch (new_module, modules, module_compare) == NULL)
-         /* Something went wrong while inserting the new module.  */
-         free (new_module);
-       else
-         ++*nmodules;
+       {
+         if (__tsearch (new_module, modules, module_compare) == NULL)
+           /* Something went wrong while inserting the new module.  */
+           free (new_module);
+         else
+           ++*nmodules;
+       }
     }
 }
 
index f12a69020eae5cb006002ffaf421289d9e3b3749..7dd0f3422c9c3bfe0a37ebe80a09b8c7d810b288 100644 (file)
@@ -139,11 +139,13 @@ main (int argc, char *argv[])
   /* Let's see whether we have these coded character sets.  */
   cd = iconv_open (to_code, from_code);
   if (cd == (iconv_t) -1)
-    if (errno == EINVAL)
-      error (EXIT_FAILURE, 0, _("conversion from `%s' to `%s' not supported"),
-            from_code, to_code);
-    else
-      error (EXIT_FAILURE, errno, _("failed to start conversion processing"));
+    {
+      if (errno == EINVAL)
+       error (EXIT_FAILURE, 0, _("conversion from `%s' to `%s' not supported"),
+              from_code, to_code);
+      else
+       error (EXIT_FAILURE, errno, _("failed to start conversion processing"));
+    }
 
   /* Determine output file.  */
   if (output_file != NULL)
index 4c570846fa8f4a90470cd2d3605e2dfe150d31ce..4ce65274418771d6a04eb7990f0ee643704b223d 100644 (file)
--- a/io/fts.c
+++ b/io/fts.c
@@ -313,12 +313,13 @@ fts_read(sp)
        if (instr == FTS_FOLLOW &&
            (p->fts_info == FTS_SL || p->fts_info == FTS_SLNONE)) {
                p->fts_info = fts_stat(sp, NULL, p, 1);
-               if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR))
+               if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR)) {
                        if ((p->fts_symfd = __open(".", O_RDONLY, 0)) < 0) {
                                p->fts_errno = errno;
                                p->fts_info = FTS_ERR;
                        } else
                                p->fts_flags |= FTS_SYMFOLLOW;
+               }
                return (p);
        }
 
@@ -401,13 +402,14 @@ next:     tmp = p;
                        goto next;
                if (p->fts_instr == FTS_FOLLOW) {
                        p->fts_info = fts_stat(sp, NULL, p, 1);
-                       if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR))
+                       if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR)) {
                                if ((p->fts_symfd =
                                    __open(".", O_RDONLY, 0)) < 0) {
                                        p->fts_errno = errno;
                                        p->fts_info = FTS_ERR;
                                } else
                                        p->fts_flags |= FTS_SYMFOLLOW;
+                       }
                        p->fts_instr = FTS_NOINSTR;
                }
 
@@ -641,7 +643,7 @@ fts_build(sp, type)
         * checking FTS_NS on the returned nodes.
         */
        cderrno = 0;
-       if (nlinks || type == BREAD)
+       if (nlinks || type == BREAD) {
                if (FCHDIR(sp, dirfd(dirp))) {
                        if (nlinks && type == BREAD)
                                cur->fts_errno = errno;
@@ -650,7 +652,7 @@ fts_build(sp, type)
                        cderrno = errno;
                } else
                        descend = 1;
-       else
+       else
                descend = 0;
 
        /*
index db687e3dbda910cfbc0f6fb4f6d1a3b5f9bda65d..e012ded938f549c75c9895fadb6c0ca89bfe1c79 100644 (file)
--- a/io/ftw.c
+++ b/io/ftw.c
@@ -547,46 +547,48 @@ ftw_startup (const char *dir, int is_nftw, void *func, int descriptors,
 
   /* Get stat info for start directory.  */
   if (result == 0)
-    if (((flags & FTW_PHYS)
-        ? LXSTAT (_STAT_VER, data.dirbuf, &st)
-        : XSTAT (_STAT_VER, data.dirbuf, &st)) < 0)
-      {
-       if (errno == EACCES)
-         result = (*data.func) (data.dirbuf, &st, FTW_NS, &data.ftw);
-       else if (!(flags & FTW_PHYS)
-                && errno == ENOENT
-                && LXSTAT (_STAT_VER, dir, &st) == 0
-                && S_ISLNK (st.st_mode))
-         result = (*data.func) (data.dirbuf, &st, data.cvt_arr[FTW_SLN],
-                                &data.ftw);
-       else
-         /* No need to call the callback since we cannot say anything
-            about the object.  */
-         result = -1;
-      }
-    else
-      {
-       if (S_ISDIR (st.st_mode))
-         {
-           /* Remember the device of the initial directory in case
-              FTW_MOUNT is given.  */
-           data.dev = st.st_dev;
-
-           /* We know this directory now.  */
-           if (!(flags & FTW_PHYS))
-             result = add_object (&data, &st);
-
-           if (result == 0)
-             result = ftw_dir (&data, &st);
-         }
-       else
-         {
-           int flag = S_ISLNK (st.st_mode) ? FTW_SL : FTW_F;
-
-           result = (*data.func) (data.dirbuf, &st, data.cvt_arr[flag],
+    {
+      if (((flags & FTW_PHYS)
+          ? LXSTAT (_STAT_VER, data.dirbuf, &st)
+          : XSTAT (_STAT_VER, data.dirbuf, &st)) < 0)
+       {
+         if (errno == EACCES)
+           result = (*data.func) (data.dirbuf, &st, FTW_NS, &data.ftw);
+         else if (!(flags & FTW_PHYS)
+                  && errno == ENOENT
+                  && LXSTAT (_STAT_VER, dir, &st) == 0
+                  && S_ISLNK (st.st_mode))
+           result = (*data.func) (data.dirbuf, &st, data.cvt_arr[FTW_SLN],
                                   &data.ftw);
-         }
-      }
+         else
+           /* No need to call the callback since we cannot say anything
+              about the object.  */
+           result = -1;
+       }
+      else
+       {
+         if (S_ISDIR (st.st_mode))
+           {
+             /* Remember the device of the initial directory in case
+                FTW_MOUNT is given.  */
+             data.dev = st.st_dev;
+
+             /* We know this directory now.  */
+             if (!(flags & FTW_PHYS))
+               result = add_object (&data, &st);
+
+             if (result == 0)
+               result = ftw_dir (&data, &st);
+           }
+         else
+           {
+             int flag = S_ISLNK (st.st_mode) ? FTW_SL : FTW_F;
+
+             result = (*data.func) (data.dirbuf, &st, data.cvt_arr[flag],
+                                    &data.ftw);
+           }
+       }
+    }
 
   /* Return to the start directory (if necessary).  */
   if (cwd != NULL)
index b810129678e09d351b36e1f5f94d0d8dddf2784f..873b61b5de6a19f6f082bb45e86783d6b887d194 100644 (file)
@@ -78,11 +78,8 @@ translate_string (char *str, struct charset_t *charset)
 
       tp = &str[1];
       while (tp[0] != '\0' && tp[0] != '>')
-       if (tp[0] == '\\')
-         if (tp[1] != '\0')
-           tp += 2;
-         else
-           ++tp;
+       if (tp[0] == '\\' && tp[1] != '\0')
+         tp += 2;
        else
          ++tp;
 
index 0187ac49572e3dacb568cf965610911d3e1c3deb..8c6cf568a5f45e1ca01f3c0e47860c3c5f5fd9cb 100644 (file)
@@ -79,16 +79,18 @@ getpass (prompt)
   /* Read the password.  */
   nread = __getline (&buf, &bufsize, in);
   if (buf != NULL)
-    if (nread < 0)
-      buf[0] = '\0';
-    else if (buf[nread - 1] == '\n')
-      {
-       /* Remove the newline.  */
-       buf[nread - 1] = '\0';
-       if (tty_changed)
-         /* Write the newline that was not echoed.  */
-         putc_unlocked ('\n', out);
-      }
+    {
+      if (nread < 0)
+       buf[0] = '\0';
+      else if (buf[nread - 1] == '\n')
+       {
+         /* Remove the newline.  */
+         buf[nread - 1] = '\0';
+         if (tty_changed)
+           /* Write the newline that was not echoed.  */
+           putc_unlocked ('\n', out);
+       }
+    }
 
   /* Restore the original setting.  */
   if (tty_changed)
index 7219c8d5a5af48ae80c20dbd0f4e229ee0c6f096..f0b8c910ab7102fc2848ab300bb9e2d2b581cc1b 100644 (file)
@@ -662,11 +662,13 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
              usage ();
            value = sysconf (c->call_name);
            if (value == -1l)
-             if (c->call_name == _SC_UINT_MAX
-                 || c->call_name == _SC_ULONG_MAX)
-               printf ("%lu\n", value);
-             else
-               puts (_("undefined"));
+             {
+               if (c->call_name == _SC_UINT_MAX
+                   || c->call_name == _SC_ULONG_MAX)
+                 printf ("%lu\n", value);
+               else
+                 puts (_("undefined"));
+             }
            else
              printf ("%ld\n", value);
            exit (0);
index 4d837c041a65fa6555f5ade6ed755bca91266afc..81cef23f9bd5fec08d9a15e2741c059bc0baccc2 100644 (file)
@@ -695,16 +695,18 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
              else
                {
                  if (opterr)
-                  if (argv[optind - 1][1] == '-')
-                   /* --option */
-                   fprintf (stderr,
-                    _("%s: option `--%s' doesn't allow an argument\n"),
-                    argv[0], pfound->name);
-                  else
-                   /* +option or -option */
-                   fprintf (stderr,
-                    _("%s: option `%c%s' doesn't allow an argument\n"),
-                    argv[0], argv[optind - 1][0], pfound->name);
+                   {
+                     if (argv[optind - 1][1] == '-')
+                       /* --option */
+                       fprintf (stderr,
+                                _("%s: option `--%s' doesn't allow an argument\n"),
+                                argv[0], pfound->name);
+                     else
+                       /* +option or -option */
+                       fprintf (stderr,
+                                _("%s: option `%c%s' doesn't allow an argument\n"),
+                                argv[0], argv[optind - 1][0], pfound->name);
+                   }
 
                  nextchar += strlen (nextchar);
 
index dff5d30dadb09f392a0963c47fbbc067c7bf7113..0eb07212307abc1e8983c9d443064510fb3e8aa1 100644 (file)
@@ -426,6 +426,7 @@ parse_glob (char **word, size_t *word_length, size_t *max_length,
 
       /* Sort out quoting */
       if (words[*offset] == '\'')
+       {
          if (quoted == 0)
            {
              quoted = 1;
@@ -436,17 +437,20 @@ parse_glob (char **word, size_t *word_length, size_t *max_length,
              quoted = 0;
              continue;
            }
+       }
       else if (words[*offset] == '"')
-       if (quoted == 0)
-         {
-           quoted = 2;
-           continue;
-         }
-       else if (quoted == 2)
-         {
-           quoted = 0;
-           continue;
-         }
+       {
+         if (quoted == 0)
+           {
+             quoted = 2;
+             continue;
+           }
+         else if (quoted == 2)
+           {
+             quoted = 0;
+             continue;
+           }
+       }
 
       /* Sort out other special characters */
       if (quoted != 1 && words[*offset] == '$')
index 845928903c2e7f6a85a6abdc6e1bb136f6697cb2..e3b0533476b8193c0e8038247310202d7bff1772 100644 (file)
@@ -182,29 +182,32 @@ _itoa (value, buflim, base, upper_case)
          mp_limb_t work_hi = value >> (64 - BITS_PER_MP_LIMB);           \
                                                                          \
          if (BITS_PER_MP_LIMB == 32)                                     \
-           if (work_hi != 0)                                             \
-             {                                                           \
-               mp_limb_t work_lo;                                        \
-               int cnt;                                                  \
+           {                                                             \
+             if (work_hi != 0)                                           \
+               {                                                         \
+                 mp_limb_t work_lo;                                      \
+                 int cnt;                                                \
                                                                          \
-               work_lo = value & 0xfffffffful;                           \
-               for (cnt = BITS_PER_MP_LIMB / BITS; cnt > 0; --cnt)       \
-                 {                                                       \
-                   *--bp = digits[work_lo & ((1ul << BITS) - 1)];        \
-                   work_lo >>= BITS;                                     \
-                 }                                                       \
-               if (BITS_PER_MP_LIMB % BITS != 0)                         \
-                 {                                                       \
-                   work_lo |= ((work_hi                                  \
-                                & ((1 << (BITS - BITS_PER_MP_LIMB%BITS)) \
-                                   - 1))                                 \
-                               << BITS_PER_MP_LIMB % BITS);              \
-                   *--bp = digits[work_lo];                              \
-                   work_hi >>= BITS - BITS_PER_MP_LIMB % BITS;           \
-                 }                                                       \
-             }                                                           \
-           else                                                          \
-             work_hi = value & 0xfffffffful;                             \
+                 work_lo = value & 0xfffffffful;                         \
+                 for (cnt = BITS_PER_MP_LIMB / BITS; cnt > 0; --cnt)     \
+                   {                                                     \
+                     *--bp = digits[work_lo & ((1ul << BITS) - 1)];      \
+                     work_lo >>= BITS;                                   \
+                   }                                                     \
+                 if (BITS_PER_MP_LIMB % BITS != 0)                       \
+                   {                                                     \
+                     work_lo                                             \
+                       |= ((work_hi                                      \
+                            & ((1 << (BITS - BITS_PER_MP_LIMB%BITS))     \
+                               - 1))                                     \
+                           << BITS_PER_MP_LIMB % BITS);                  \
+                     *--bp = digits[work_lo];                            \
+                     work_hi >>= BITS - BITS_PER_MP_LIMB % BITS;         \
+                   }                                                     \
+               }                                                         \
+             else                                                        \
+               work_hi = value & 0xfffffffful;                           \
+           }                                                             \
          do                                                              \
            {                                                             \
              *--bp = digits[work_hi & ((1 << BITS) - 1)];                \
index e54fac0a572ca029624e682687768a6dd6a59eec..e5e3026bce601288682d17185fb1ba16fdddf68c 100644 (file)
@@ -574,19 +574,21 @@ __printf_fp (FILE *fp,
                 for overflow.  This is done by comparing with 10 shifted
                 to the right position.  */
              if (incr == exponent + 3)
-               if (cnt_h <= BITS_PER_MP_LIMB - 4)
-                 {
-                   topval[0] = 0;
-                   topval[1]
-                     = ((mp_limb_t) 10) << (BITS_PER_MP_LIMB - 4 - cnt_h);
-                 }
-               else
-                 {
-                   topval[0] = ((mp_limb_t) 10) << (BITS_PER_MP_LIMB - 4);
-                   topval[1] = 0;
-                   (void) __mpn_lshift (topval, topval, 2,
-                                        BITS_PER_MP_LIMB - cnt_h);
-                 }
+               {
+                 if (cnt_h <= BITS_PER_MP_LIMB - 4)
+                   {
+                     topval[0] = 0;
+                     topval[1]
+                       = ((mp_limb_t) 10) << (BITS_PER_MP_LIMB - 4 - cnt_h);
+                   }
+                 else
+                   {
+                     topval[0] = ((mp_limb_t) 10) << (BITS_PER_MP_LIMB - 4);
+                     topval[1] = 0;
+                     (void) __mpn_lshift (topval, topval, 2,
+                                          BITS_PER_MP_LIMB - cnt_h);
+                   }
+               }
 
              /* We have to be careful when multiplying the last factor.
                 If the result is greater than 1.0 be have to test it
@@ -816,23 +818,25 @@ __printf_fp (FILE *fp,
        char *tp = cp;
 
        if (digit == '5' && (*(cp - 1) & 1) == 0)
-         /* This is the critical case.  */
-         if (fracsize == 1 && frac[0] == 0)
-           /* Rest of the number is zero -> round to even.
-              (IEEE 754-1985 4.1 says this is the default rounding.)  */
-           goto do_expo;
-         else if (scalesize == 0)
-           {
-             /* Here we have to see whether all limbs are zero since no
-                normalization happened.  */
-             size_t lcnt = fracsize;
-             while (lcnt >= 1 && frac[lcnt - 1] == 0)
-               --lcnt;
-             if (lcnt == 0)
-               /* Rest of the number is zero -> round to even.
-                  (IEEE 754-1985 4.1 says this is the default rounding.)  */
-               goto do_expo;
-           }
+         {
+           /* This is the critical case.        */
+           if (fracsize == 1 && frac[0] == 0)
+             /* Rest of the number is zero -> round to even.
+                (IEEE 754-1985 4.1 says this is the default rounding.)  */
+             goto do_expo;
+           else if (scalesize == 0)
+             {
+               /* Here we have to see whether all limbs are zero since no
+                  normalization happened.  */
+               size_t lcnt = fracsize;
+               while (lcnt >= 1 && frac[lcnt - 1] == 0)
+                 --lcnt;
+               if (lcnt == 0)
+                 /* Rest of the number is zero -> round to even.
+                    (IEEE 754-1985 4.1 says this is the default rounding.)  */
+                 goto do_expo;
+             }
+         }
 
        if (fracdig_no > 0)
          {
index 116b19b442f311ff3aede47fb29c632d0a90602b..f9bbb6929e12fa3f5222e097407066d03c4dfb3f 100644 (file)
@@ -602,11 +602,13 @@ __vfscanf (FILE *s, const char *format, va_list argptr)
 #define NEXT_WIDE_CHAR(First)                                                \
                c = inchar ();                                                \
                if (c == EOF)                                                 \
-                 /* EOF is only an error for the first character.  */        \
-                 if (First)                                                  \
-                   input_error ();                                           \
-                 else                                                        \
-                   break;                                                    \
+                 {                                                           \
+                   /* EOF is only an error for the first character.  */      \
+                   if (First)                                                \
+                     input_error ();                                         \
+                   else                                                      \
+                     break;                                                  \
+                 }                                                           \
                val = c;                                                      \
                if (val >= 0x80)                                              \
                  {                                                           \
index e1ff401e721ec4373e0951792a5ccefe26a3d0e8..187e33fe37951138abd065e5341b280a3e039e43 100644 (file)
@@ -296,18 +296,22 @@ __strfmon_l (char *s, size_t maxsize, __locale_t loc, const char *format, ...)
        case 'i':               /* Use international currency symbol.  */
          currency_symbol = _NL_CURRENT (LC_MONETARY, INT_CURR_SYMBOL);
          if (right_prec == -1)
-           if (*_NL_CURRENT (LC_MONETARY, INT_FRAC_DIGITS) == CHAR_MAX)
-             right_prec = 2;
-           else
-             right_prec = *_NL_CURRENT (LC_MONETARY, INT_FRAC_DIGITS);
+           {
+             if (*_NL_CURRENT (LC_MONETARY, INT_FRAC_DIGITS) == CHAR_MAX)
+               right_prec = 2;
+             else
+               right_prec = *_NL_CURRENT (LC_MONETARY, INT_FRAC_DIGITS);
+           }
          break;
        case 'n':               /* Use national currency symbol.  */
          currency_symbol = _NL_CURRENT (LC_MONETARY, CURRENCY_SYMBOL);
          if (right_prec == -1)
-           if (*_NL_CURRENT (LC_MONETARY, FRAC_DIGITS) == CHAR_MAX)
-             right_prec = 2;
-           else
-             right_prec = *_NL_CURRENT (LC_MONETARY, FRAC_DIGITS);
+           {
+             if (*_NL_CURRENT (LC_MONETARY, FRAC_DIGITS) == CHAR_MAX)
+               right_prec = 2;
+             else
+               right_prec = *_NL_CURRENT (LC_MONETARY, FRAC_DIGITS);
+           }
          break;
        default:                /* Any unrecognized format is an error.  */
          __set_errno (EINVAL);
@@ -493,24 +497,26 @@ __strfmon_l (char *s, size_t maxsize, __locale_t loc, const char *format, ...)
 
       /* Now test whether the output width is filled.  */
       if (dest - startp < width)
-       if (left)
-         /* We simply have to fill using spaces.  */
-         do
-           out_char (' ');
-         while (dest - startp < width);
-       else
-         {
-           int dist = width - (dest - startp);
-           char *cp;
-           for (cp = dest - 1; cp >= startp; --cp)
-             cp[dist] = cp[0];
+       {
+         if (left)
+           /* We simply have to fill using spaces.  */
+           do
+             out_char (' ');
+           while (dest - startp < width);
+         else
+           {
+             int dist = width - (dest - startp);
+             char *cp;
+             for (cp = dest - 1; cp >= startp; --cp)
+               cp[dist] = cp[0];
 
-           dest += dist;
+             dest += dist;
 
-           do
-             startp[--dist] = ' ';
-           while (dist > 0);
-         }
+             do
+               startp[--dist] = ' ';
+             while (dist > 0);
+           }
+       }
     }
 
   /* Terminate the string.  */
index 08ffd6356356f0a5c07cc72d9682b41aa4868257..f44f6c1f6d98cf2d29948f0cda4a979040ff2248 100644 (file)
@@ -117,8 +117,9 @@ STRCOLL (s1, s2, l)
                     == (uint32_t) IGNORE_CHAR))
            {
              ++s1ignore;
-             if ((forward && ++s1idx >= s1run->data[pass].number)
-                 || (!forward && --s1idx < 0))
+             if (forward
+                 ? ++s1idx >= s1run->data[pass].number
+                 : --s1idx < 0)
                {
                  weight_t *nextp = forward ? s1run->next : s1run->prev;
                  if (nextp == NULL)
@@ -139,8 +140,9 @@ STRCOLL (s1, s2, l)
                     == (uint32_t) IGNORE_CHAR))
            {
              ++s2ignore;
-             if ((forward && ++s2idx >= s2run->data[pass].number)
-                 || (!forward && --s2idx < 0))
+             if (forward
+                 ? ++s2idx >= s2run->data[pass].number
+                 : --s2idx < 0)
                {
                  weight_t *nextp = forward ? s2run->next : s2run->prev;
                  if (nextp == NULL)
index b3e99fb094863c2326f5ab4e149f8324ab3436a6..0bdf1069b658fb3ecb8e140ff5bfaaf9cc5fe75c 100644 (file)
@@ -217,8 +217,9 @@ STRXFRM (STRING_TYPE *dest, const STRING_TYPE *src, size_t n, __locale_t l)
                     == (u_int32_t) IGNORE_CHAR))
            {
              ++ignore;
-             if ((forward && ++idx >= run->data[pass].number)
-                 || (!forward && --idx < 0))
+             if (forward
+                 ? ++idx >= run->data[pass].number
+                 : --idx < 0)
                {
                  weight_t *nextp = forward ? run->next : run->prev;
                  if (nextp == NULL)
index c41d03f8b2ca162b15cc8aa6b0001f9f2b2e7413..e50963e9c4ac7a19054a78738061352aa4a1eaab 100644 (file)
@@ -659,10 +659,12 @@ glob (pattern, flags, errfunc, pglob)
                }
            }
          if (home_dir == NULL || home_dir[0] == '\0')
-           if (flags & GLOB_TILDE_CHECK)
-             return GLOB_NOMATCH;
-           else
-             home_dir = "~"; /* No luck.  */
+           {
+             if (flags & GLOB_TILDE_CHECK)
+               return GLOB_NOMATCH;
+             else
+               home_dir = "~"; /* No luck.  */
+           }
 #  endif /* WINDOWS32 */
 # endif
          /* Now construct the full directory.  */
@@ -882,78 +884,80 @@ glob (pattern, flags, errfunc, pglob)
         flag was set we must return the list consisting of the disrectory
         names followed by the filename.  */
       if (pglob->gl_pathc == oldcount)
-       /* No matches.  */
-       if (flags & GLOB_NOCHECK)
-         {
-           size_t filename_len = strlen (filename) + 1;
-           char **new_pathv;
-           struct stat st;
-
-           /* This is an pessimistic guess about the size.  */
-           pglob->gl_pathv
-             = (char **) realloc (pglob->gl_pathv,
-                                  (pglob->gl_pathc +
-                                   ((flags & GLOB_DOOFFS) ?
-                                    pglob->gl_offs : 0) +
-                                   dirs.gl_pathc + 1) *
-                                  sizeof (char *));
-           if (pglob->gl_pathv == NULL)
-             {
-               globfree (&dirs);
-               return GLOB_NOSPACE;
-             }
+       {
+         /* No matches.  */
+         if (flags & GLOB_NOCHECK)
+           {
+             size_t filename_len = strlen (filename) + 1;
+             char **new_pathv;
+             struct stat st;
+
+             /* This is an pessimistic guess about the size.  */
+             pglob->gl_pathv
+               = (char **) realloc (pglob->gl_pathv,
+                                    (pglob->gl_pathc +
+                                     ((flags & GLOB_DOOFFS) ?
+                                      pglob->gl_offs : 0) +
+                                     dirs.gl_pathc + 1) *
+                                    sizeof (char *));
+             if (pglob->gl_pathv == NULL)
+               {
+                 globfree (&dirs);
+                 return GLOB_NOSPACE;
+               }
 
-           if (flags & GLOB_DOOFFS)
-             while (pglob->gl_pathc < pglob->gl_offs)
-               pglob->gl_pathv[pglob->gl_pathc++] = NULL;
+             if (flags & GLOB_DOOFFS)
+               while (pglob->gl_pathc < pglob->gl_offs)
+                 pglob->gl_pathv[pglob->gl_pathc++] = NULL;
 
-           for (i = 0; i < dirs.gl_pathc; ++i)
-             {
-               const char *dir = dirs.gl_pathv[i];
-               size_t dir_len = strlen (dir);
-
-               /* First check whether this really is a directory.  */
-               if (((flags & GLOB_ALTDIRFUNC)
-                    ? (*pglob->gl_stat) (dir, &st) : __stat (dir, &st)) != 0
-                   || !S_ISDIR (st.st_mode))
-                 /* No directory, ignore this entry.  */
-                 continue;
-
-               pglob->gl_pathv[pglob->gl_pathc] = malloc (dir_len + 1
-                                                          + filename_len);
-               if (pglob->gl_pathv[pglob->gl_pathc] == NULL)
-                 {
-                   globfree (&dirs);
-                   globfree (pglob);
-                   return GLOB_NOSPACE;
-                 }
+             for (i = 0; i < dirs.gl_pathc; ++i)
+               {
+                 const char *dir = dirs.gl_pathv[i];
+                 size_t dir_len = strlen (dir);
+
+                 /* First check whether this really is a directory.  */
+                 if (((flags & GLOB_ALTDIRFUNC)
+                      ? (*pglob->gl_stat) (dir, &st) : __stat (dir, &st)) != 0
+                     || !S_ISDIR (st.st_mode))
+                   /* No directory, ignore this entry.  */
+                   continue;
+
+                 pglob->gl_pathv[pglob->gl_pathc] = malloc (dir_len + 1
+                                                            + filename_len);
+                 if (pglob->gl_pathv[pglob->gl_pathc] == NULL)
+                   {
+                     globfree (&dirs);
+                     globfree (pglob);
+                     return GLOB_NOSPACE;
+                   }
 
 #ifdef HAVE_MEMPCPY
-               mempcpy (mempcpy (mempcpy (pglob->gl_pathv[pglob->gl_pathc],
-                                          dir, dir_len),
-                                 "/", 1),
-                        filename, filename_len);
+                 mempcpy (mempcpy (mempcpy (pglob->gl_pathv[pglob->gl_pathc],
+                                            dir, dir_len),
+                                   "/", 1),
+                          filename, filename_len);
 #else
-               memcpy (pglob->gl_pathv[pglob->gl_pathc], dir, dir_len);
-               pglob->gl_pathv[pglob->gl_pathc][dir_len] = '/';
-               memcpy (&pglob->gl_pathv[pglob->gl_pathc][dir_len + 1],
-                       filename, filename_len);
+                 memcpy (pglob->gl_pathv[pglob->gl_pathc], dir, dir_len);
+                 pglob->gl_pathv[pglob->gl_pathc][dir_len] = '/';
+                 memcpy (&pglob->gl_pathv[pglob->gl_pathc][dir_len + 1],
+                         filename, filename_len);
 #endif
-               ++pglob->gl_pathc;
-             }
+                 ++pglob->gl_pathc;
+               }
 
-           pglob->gl_pathv[pglob->gl_pathc] = NULL;
-           pglob->gl_flags = flags;
+             pglob->gl_pathv[pglob->gl_pathc] = NULL;
+             pglob->gl_flags = flags;
 
-           /* Now we know how large the gl_pathv vector must be.  */
-           new_pathv = (char **) realloc (pglob->gl_pathv,
-                                          ((pglob->gl_pathc + 1)
-                                           * sizeof (char *)));
-           if (new_pathv != NULL)
-             pglob->gl_pathv = new_pathv;
-         }
-       else
-         return GLOB_NOMATCH;
+             /* Now we know how large the gl_pathv vector must be.  */
+             new_pathv = (char **) realloc (pglob->gl_pathv,
+                                            ((pglob->gl_pathc + 1)
+                                             * sizeof (char *)));
+             if (new_pathv != NULL)
+               pglob->gl_pathv = new_pathv;
+           }
+         else
+           return GLOB_NOMATCH;
+       }
 
       globfree (&dirs);
     }
@@ -1352,10 +1356,12 @@ glob_in_dir (pattern, directory, flags, errfunc, pglob)
 
   save = errno;
   if (stream != NULL)
-    if (flags & GLOB_ALTDIRFUNC)
-      (*pglob->gl_closedir) (stream);
-    else
-      closedir ((DIR *) stream);
+    {
+      if (flags & GLOB_ALTDIRFUNC)
+       (*pglob->gl_closedir) (stream);
+      else
+       closedir ((DIR *) stream);
+    }
   __set_errno (save);
 
   return nfound == 0 ? GLOB_NOMATCH : 0;
index 30cc6364e710e0b194b3ded6310400b07170428d..7502e00e6aceb860311ed7a2be6d45c3f381e05f 100644 (file)
@@ -283,10 +283,12 @@ gaih_inet (const char *name, const struct gaih_service *service,
             ((req->ai_socktype != tp->socktype) || !req->ai_socktype) &&
             ((req->ai_protocol != tp->protocol) || !req->ai_protocol); tp++);
       if (tp->name == NULL)
-       if (req->ai_socktype)
-         return (GAIH_OKIFUNSPEC | -EAI_SOCKTYPE);
-       else
-         return (GAIH_OKIFUNSPEC | -EAI_SERVICE);
+       {
+         if (req->ai_socktype)
+           return (GAIH_OKIFUNSPEC | -EAI_SOCKTYPE);
+         else
+           return (GAIH_OKIFUNSPEC | -EAI_SERVICE);
+       }
     }
 
   if (service != NULL)
index bb449a9d34678fbfb1d959f95a9a5a02ca7ea3a8..ce6fcd02ab6a4f18687dc7fd9dbf581f5b102795 100644 (file)
@@ -278,7 +278,7 @@ extern void __process_machine_rela (struct link_map *map,
    LOADADDR is the load address of the object; INFO is an array indexed
    by DT_* of the .dynamic section info.  */
 
-extern void
+inline void
 elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
                  const Elf32_Sym *sym, const struct r_found_version *version,
                  Elf32_Addr *const reloc_addr)
index f5a4f61f67e0733f4deb9548833e85f9572fe4a4..ce691c84513192b62c2e436d9785400eca1b6fab 100644 (file)
@@ -26,8 +26,8 @@
 #endif
 
 /* Some systems need this in order to declare localtime_r properly.  */
-#ifndef _REENTRANT
-# define _REENTRANT 1
+#ifndef __EXTENSIONS__
+# define __EXTENSIONS__ 1
 #endif
 
 #ifdef _LIBC
index ed029605d98324c1a2779deff143a8c6d3680c35..f724bf3e3b658b1a7754dc606c8d18623419f55d 100644 (file)
@@ -21,8 +21,8 @@
 #endif
 
 /* Some hosts need this in order to declare localtime_r properly.  */
-#ifndef _REENTRANT
-# define _REENTRANT 1
+#ifndef __EXTENSIONS__
+# define __EXTENSIONS__ 1
 #endif
 
 #ifdef _LIBC
@@ -547,7 +547,7 @@ my_strftime (s, maxsize, format, tp)
                    len += strlen (f + len);
                    break;
                  }
-               
+
                if (bytes == (size_t) -1)
                  {
                    len++;
index 1e8c95fe7f082d64399d5274fbd0d1fdc0e91ce5..5ce6061e93fa89275d3208d4e3a488f4186fc2a1 100644 (file)
@@ -32,13 +32,15 @@ wcstok (wcs, delim, save_ptr)
   wchar_t *result;
 
   if (wcs == NULL)
-    if (*save_ptr == NULL)
-      {
-       __set_errno (EINVAL);
-       return NULL;
-      }
-    else
-      wcs = *save_ptr;
+    {
+      if (*save_ptr == NULL)
+       {
+         __set_errno (EINVAL);
+         return NULL;
+       }
+      else
+       wcs = *save_ptr;
+    }
 
   /* Scan leading delimiters.  */
   wcs += wcsspn (wcs, delim);