mirror of
https://sourceware.org/git/glibc.git
synced 2025-06-13 19:21:36 +03:00
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.
This commit is contained in:
53
ChangeLog
53
ChangeLog
@ -1,4 +1,54 @@
|
||||
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.
|
||||
@ -8,6 +58,7 @@ Wed Sep 9 10:34:06 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.
|
||||
|
||||
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
|
||||
|
@ -253,6 +253,7 @@ __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. */
|
||||
@ -272,6 +273,7 @@ __argp_fmtstream_update (argp_fmtstream_t fs)
|
||||
len += buf - fs->buf;
|
||||
nl = buf = fs->buf;
|
||||
}
|
||||
}
|
||||
else
|
||||
/* We can fit the newline and blanks in before
|
||||
the next word. */
|
||||
|
@ -183,6 +183,7 @@ fill_in_uparams (const struct argp_state *state)
|
||||
}
|
||||
|
||||
if (unspec)
|
||||
{
|
||||
if (var[0] == 'n' && var[1] == 'o' && var[2] == '-')
|
||||
{
|
||||
val = 0;
|
||||
@ -191,6 +192,7 @@ fill_in_uparams (const struct argp_state *state)
|
||||
}
|
||||
else
|
||||
val = 1;
|
||||
}
|
||||
else if (isdigit (*arg))
|
||||
{
|
||||
val = atoi (arg);
|
||||
@ -709,6 +711,7 @@ 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)
|
||||
@ -723,6 +726,7 @@ hol_entry_cmp (const struct hol_entry *entry1,
|
||||
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,6 +1119,7 @@ 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. */
|
||||
@ -1122,6 +1127,7 @@ hol_entry_help (struct hol_entry *entry, const struct argp_state *state,
|
||||
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,
|
||||
|
@ -838,6 +838,7 @@ 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,
|
||||
@ -848,6 +849,7 @@ write_out (struct catalog *catalog, const char *output_name,
|
||||
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"));
|
||||
}
|
||||
|
||||
/* OK, we have the catalog loaded. Now read all messages and merge
|
||||
them. When set and message number clash for any message the new
|
||||
|
@ -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)
|
||||
|
@ -1100,6 +1100,7 @@ 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
|
||||
@ -1117,6 +1118,7 @@ open_path (const char *name, size_t namelen, int preloaded,
|
||||
else
|
||||
this_dir->status[cnt] = existing;
|
||||
}
|
||||
}
|
||||
|
||||
if (fd != -1 && preloaded && __libc_enable_secure)
|
||||
{
|
||||
|
@ -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)
|
||||
|
@ -291,12 +291,14 @@ 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -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"));
|
||||
}
|
||||
|
||||
/* Determine output file. */
|
||||
if (output_file != NULL)
|
||||
|
10
io/fts.c
10
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;
|
||||
|
||||
/*
|
||||
|
2
io/ftw.c
2
io/ftw.c
@ -547,6 +547,7 @@ 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)
|
||||
@ -587,6 +588,7 @@ ftw_startup (const char *dir, int is_nftw, void *func, int descriptors,
|
||||
&data.ftw);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Return to the start directory (if necessary). */
|
||||
if (cwd != NULL)
|
||||
|
@ -78,13 +78,10 @@ translate_string (char *str, struct charset_t *charset)
|
||||
|
||||
tp = &str[1];
|
||||
while (tp[0] != '\0' && tp[0] != '>')
|
||||
if (tp[0] == '\\')
|
||||
if (tp[1] != '\0')
|
||||
if (tp[0] == '\\' && tp[1] != '\0')
|
||||
tp += 2;
|
||||
else
|
||||
++tp;
|
||||
else
|
||||
++tp;
|
||||
|
||||
if (tp[0] == '\0')
|
||||
{
|
||||
|
@ -79,6 +79,7 @@ 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')
|
||||
@ -89,6 +90,7 @@ getpass (prompt)
|
||||
/* Write the newline that was not echoed. */
|
||||
putc_unlocked ('\n', out);
|
||||
}
|
||||
}
|
||||
|
||||
/* Restore the original setting. */
|
||||
if (tty_changed)
|
||||
|
@ -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"));
|
||||
}
|
||||
else
|
||||
printf ("%ld\n", value);
|
||||
exit (0);
|
||||
|
@ -695,6 +695,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||
else
|
||||
{
|
||||
if (opterr)
|
||||
{
|
||||
if (argv[optind - 1][1] == '-')
|
||||
/* --option */
|
||||
fprintf (stderr,
|
||||
@ -705,6 +706,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||
fprintf (stderr,
|
||||
_("%s: option `%c%s' doesn't allow an argument\n"),
|
||||
argv[0], argv[optind - 1][0], pfound->name);
|
||||
}
|
||||
|
||||
nextchar += strlen (nextchar);
|
||||
|
||||
|
@ -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,7 +437,9 @@ parse_glob (char **word, size_t *word_length, size_t *max_length,
|
||||
quoted = 0;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else if (words[*offset] == '"')
|
||||
{
|
||||
if (quoted == 0)
|
||||
{
|
||||
quoted = 2;
|
||||
@ -447,6 +450,7 @@ parse_glob (char **word, size_t *word_length, size_t *max_length,
|
||||
quoted = 0;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
/* Sort out other special characters */
|
||||
if (quoted != 1 && words[*offset] == '$')
|
||||
|
@ -182,6 +182,7 @@ _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; \
|
||||
@ -195,7 +196,8 @@ _itoa (value, buflim, base, upper_case)
|
||||
} \
|
||||
if (BITS_PER_MP_LIMB % BITS != 0) \
|
||||
{ \
|
||||
work_lo |= ((work_hi \
|
||||
work_lo \
|
||||
|= ((work_hi \
|
||||
& ((1 << (BITS - BITS_PER_MP_LIMB%BITS)) \
|
||||
- 1)) \
|
||||
<< BITS_PER_MP_LIMB % BITS); \
|
||||
@ -205,6 +207,7 @@ _itoa (value, buflim, base, upper_case)
|
||||
} \
|
||||
else \
|
||||
work_hi = value & 0xfffffffful; \
|
||||
} \
|
||||
do \
|
||||
{ \
|
||||
*--bp = digits[work_hi & ((1 << BITS) - 1)]; \
|
||||
|
@ -574,6 +574,7 @@ __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;
|
||||
@ -587,6 +588,7 @@ __printf_fp (FILE *fp,
|
||||
(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,6 +818,7 @@ __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.
|
||||
@ -833,6 +836,7 @@ __printf_fp (FILE *fp,
|
||||
(IEEE 754-1985 4.1 says this is the default rounding.) */
|
||||
goto do_expo;
|
||||
}
|
||||
}
|
||||
|
||||
if (fracdig_no > 0)
|
||||
{
|
||||
|
@ -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; \
|
||||
} \
|
||||
val = c; \
|
||||
if (val >= 0x80) \
|
||||
{ \
|
||||
|
@ -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);
|
||||
}
|
||||
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);
|
||||
}
|
||||
break;
|
||||
default: /* Any unrecognized format is an error. */
|
||||
__set_errno (EINVAL);
|
||||
@ -493,6 +497,7 @@ __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
|
||||
@ -512,6 +517,7 @@ __strfmon_l (char *s, size_t maxsize, __locale_t loc, const char *format, ...)
|
||||
while (dist > 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Terminate the string. */
|
||||
out_char ('\0');
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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. */
|
||||
}
|
||||
# endif /* WINDOWS32 */
|
||||
# endif
|
||||
/* Now construct the full directory. */
|
||||
@ -882,6 +884,7 @@ 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)
|
||||
{
|
||||
@ -954,6 +957,7 @@ glob (pattern, flags, errfunc, pglob)
|
||||
}
|
||||
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);
|
||||
}
|
||||
__set_errno (save);
|
||||
|
||||
return nfound == 0 ? GLOB_NOMATCH : 0;
|
||||
|
@ -283,11 +283,13 @@ 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 (service != NULL)
|
||||
{
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -32,6 +32,7 @@ wcstok (wcs, delim, save_ptr)
|
||||
wchar_t *result;
|
||||
|
||||
if (wcs == NULL)
|
||||
{
|
||||
if (*save_ptr == NULL)
|
||||
{
|
||||
__set_errno (EINVAL);
|
||||
@ -39,6 +40,7 @@ wcstok (wcs, delim, save_ptr)
|
||||
}
|
||||
else
|
||||
wcs = *save_ptr;
|
||||
}
|
||||
|
||||
/* Scan leading delimiters. */
|
||||
wcs += wcsspn (wcs, delim);
|
||||
|
Reference in New Issue
Block a user