diff options
| author | Ulrich Drepper <drepper@redhat.com> | 1998-09-09 11:53:19 +0000 |
|---|---|---|
| committer | Ulrich Drepper <drepper@redhat.com> | 1998-09-09 11:53:19 +0000 |
| commit | 6e4c40baacfd7eaf1578f707759d79b5d95d626c (patch) | |
| tree | ebea3ca25b71a1f21e657b7ab8a506f640197d79 | |
| parent | 7fd18ea2de82bb4f0e393aee1dc412cd025f3be8 (diff) | |
| download | glibc-6e4c40baacfd7eaf1578f707759d79b5d95d626c.tar.xz glibc-6e4c40baacfd7eaf1578f707759d79b5d95d626c.zip | |
Update.
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.
| -rw-r--r-- | ChangeLog | 55 | ||||
| -rw-r--r-- | argp/argp-fmtstream.c | 40 | ||||
| -rw-r--r-- | argp/argp-help.c | 64 | ||||
| -rw-r--r-- | catgets/gencat.c | 34 | ||||
| -rw-r--r-- | elf/dl-error.c | 8 | ||||
| -rw-r--r-- | elf/dl-load.c | 36 | ||||
| -rw-r--r-- | elf/dl-open.c | 6 | ||||
| -rw-r--r-- | iconv/gconv_conf.c | 12 | ||||
| -rw-r--r-- | iconv/iconv_prog.c | 12 | ||||
| -rw-r--r-- | io/fts.c | 10 | ||||
| -rw-r--r-- | io/ftw.c | 80 | ||||
| -rw-r--r-- | locale/programs/stringtrans.c | 7 | ||||
| -rw-r--r-- | misc/getpass.c | 22 | ||||
| -rw-r--r-- | posix/getconf.c | 12 | ||||
| -rw-r--r-- | posix/getopt.c | 22 | ||||
| -rw-r--r-- | posix/wordexp.c | 24 | ||||
| -rw-r--r-- | stdio-common/_itoa.c | 47 | ||||
| -rw-r--r-- | stdio-common/printf_fp.c | 64 | ||||
| -rw-r--r-- | stdio-common/vfscanf.c | 12 | ||||
| -rw-r--r-- | stdlib/strfmon.c | 54 | ||||
| -rw-r--r-- | string/strcoll.c | 10 | ||||
| -rw-r--r-- | string/strxfrm.c | 5 | ||||
| -rw-r--r-- | sysdeps/generic/glob.c | 150 | ||||
| -rw-r--r-- | sysdeps/posix/getaddrinfo.c | 10 | ||||
| -rw-r--r-- | sysdeps/powerpc/dl-machine.h | 2 | ||||
| -rw-r--r-- | time/mktime.c | 4 | ||||
| -rw-r--r-- | time/strftime.c | 6 | ||||
| -rw-r--r-- | wcsmbs/wcstok.c | 16 |
28 files changed, 465 insertions, 359 deletions
@@ -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 diff --git a/argp/argp-fmtstream.c b/argp/argp-fmtstream.c index 1649f15cbb..d563c31b8e 100644 --- a/argp/argp-fmtstream.c +++ b/argp/argp-fmtstream.c @@ -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. */ diff --git a/argp/argp-help.c b/argp/argp-help.c index 8fe3b2e584..9a1c05387f 100644 --- a/argp/argp-help.c +++ b/argp/argp-help.c @@ -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, diff --git a/catgets/gencat.c b/catgets/gencat.c index ee2b8cbf47..d1c92a035b 100644 --- a/catgets/gencat.c +++ b/catgets/gencat.c @@ -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 diff --git a/elf/dl-error.c b/elf/dl-error.c index cfb6b9ead5..228c1a80a1 100644 --- a/elf/dl-error.c +++ b/elf/dl-error.c @@ -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) diff --git a/elf/dl-load.c b/elf/dl-load.c index 35c34e0305..1082205a23 100644 --- a/elf/dl-load.c +++ b/elf/dl-load.c @@ -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) { diff --git a/elf/dl-open.c b/elf/dl-open.c index 694b0ebfaa..e5509dffd4 100644 --- a/elf/dl-open.c +++ b/elf/dl-open.c @@ -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) diff --git a/iconv/gconv_conf.c b/iconv/gconv_conf.c index e58091a163..4ab924a3de 100644 --- a/iconv/gconv_conf.c +++ b/iconv/gconv_conf.c @@ -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; + } } } diff --git a/iconv/iconv_prog.c b/iconv/iconv_prog.c index f12a69020e..7dd0f3422c 100644 --- a/iconv/iconv_prog.c +++ b/iconv/iconv_prog.c @@ -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) @@ -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)) |
