]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Update.
authorUlrich Drepper <drepper@redhat.com>
Sat, 23 Jan 1999 22:17:17 +0000 (22:17 +0000)
committerUlrich Drepper <drepper@redhat.com>
Sat, 23 Jan 1999 22:17:17 +0000 (22:17 +0000)
1999-01-23  Ulrich Drepper  <drepper@cygnus.com>

* nss/nss_files/files-XXX.c (internal_getent): Make sure the buffer has
at least two bytes (not one).  Correct buflen parameter type.
* nss/nss_files/files-alias.c (get_next_alias): Make sure buffer
has at least two bytes.  Use fgets_unlocked instead of fgets.

* ctype/ctype.h: Don't user __tolower directly for tolower
implementation.  Use inline function which tests for the range
first.  Make _tolower equivalent to old tolower macros.
Likewise for toupper.
* ctype/ctype.c: Change tolower/toupper definition accordingly.

* argp/argp-help.c: Use _tolower instead of tolower if possible.
* inet/ether_aton_r.c: Likewise.
* inet/ether_line.c: Likewise.
* inet/rcmd.c: Likewise.
* intl/l10nflist.c: Likewise.
* locale/programs/ld-collate.c: Likewise.
* locale/programs/linereader.c: Likewise.
* locale/programs/localedef.c: Likewise.
* nis/nss_nis/nis-alias.c: Likewise.
* nis/nss_nis/nis-network.c: Likewise.
* posix/regex.c: Likewise.
* resolv/inet_net_pton.c: Likewise.
* stdio-common/printf_fp.c: Likewise.
* stdio-common/vfscanf.c: Likewise.
* sysdeps/generic/strcasestr.c: Likewise.

* math/bits/mathcalls.h: Fix typo.

19 files changed:
ChangeLog
argp/argp-help.c
inet/ether_aton_r.c
inet/ether_line.c
inet/rcmd.c
intl/l10nflist.c
locale/programs/ld-collate.c
locale/programs/linereader.c
locale/programs/localedef.c
math/bits/mathcalls.h
nis/nss_nis/nis-alias.c
nis/nss_nis/nis-network.c
nss/nss_files/files-XXX.c
nss/nss_files/files-alias.c
posix/regex.c
resolv/inet_net_pton.c
stdio-common/printf_fp.c
stdio-common/vfscanf.c
sysdeps/generic/strcasestr.c

index 976b1bb65bba05f12dadaeeeae23d77b742e4c2d..064eb5cae91b953bdf34215ebfe61fd2601ad5e7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,34 @@
+1999-01-23  Ulrich Drepper  <drepper@cygnus.com>
+
+       * nss/nss_files/files-XXX.c (internal_getent): Make sure the buffer has
+       at least two bytes (not one).  Correct buflen parameter type.
+       * nss/nss_files/files-alias.c (get_next_alias): Make sure buffer
+       has at least two bytes.  Use fgets_unlocked instead of fgets.
+
+       * ctype/ctype.h: Don't user __tolower directly for tolower
+       implementation.  Use inline function which tests for the range
+       first.  Make _tolower equivalent to old tolower macros.
+       Likewise for toupper.
+       * ctype/ctype.c: Change tolower/toupper definition accordingly.
+
+       * argp/argp-help.c: Use _tolower instead of tolower if possible.
+       * inet/ether_aton_r.c: Likewise.
+       * inet/ether_line.c: Likewise.
+       * inet/rcmd.c: Likewise.
+       * intl/l10nflist.c: Likewise.
+       * locale/programs/ld-collate.c: Likewise.
+       * locale/programs/linereader.c: Likewise.
+       * locale/programs/localedef.c: Likewise.
+       * nis/nss_nis/nis-alias.c: Likewise.
+       * nis/nss_nis/nis-network.c: Likewise.
+       * posix/regex.c: Likewise.
+       * resolv/inet_net_pton.c: Likewise.
+       * stdio-common/printf_fp.c: Likewise.
+       * stdio-common/vfscanf.c: Likewise.
+       * sysdeps/generic/strcasestr.c: Likewise.
+
+       * math/bits/mathcalls.h: Fix typo.
+
 1999-01-23  Roland McGrath  <roland@baalperazim.frob.com>
 
        * sysdeps/gnu/errlist.awk: Add comment.
index a3a1a12ef9efa2cbf28d615900466fe8e4b1ff93..d78060d12cefd26149a6aa967d0c7e3d1e94b76a 100644 (file)
@@ -1,5 +1,5 @@
 /* Hierarchial argument parsing help output
-   Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+   Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Written by Miles Bader <miles@gnu.ai.mit.edu>.
 
@@ -759,7 +759,11 @@ hol_entry_cmp (const struct hol_entry *entry1,
        {
          char first1 = short1 ? short1 : long1 ? *long1 : 0;
          char first2 = short2 ? short2 : long2 ? *long2 : 0;
+#ifdef _tolower
+         int lower_cmp = _tolower (first1) - _tolower (first2);
+#else
          int lower_cmp = tolower (first1) - tolower (first2);
+#endif
          /* Compare ignoring case, except when the options are both the
             same letter, in which case lower-case always comes first.  */
          return lower_cmp ? lower_cmp : first2 - first1;
index 14ccd2574fa8c8120919813760b798c736fb91f7..5ca21e8a1f574d60f156827fd990e18ef66ab7c5 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
 
@@ -33,12 +33,12 @@ ether_aton_r (const char *asc, struct ether_addr *addr)
       unsigned int number;
       char ch;
 
-      ch = tolower (*asc++);
+      ch = _tolower (*asc++);
       if ((ch < '0' || ch > '9') && (ch < 'a' || ch > 'f'))
        return NULL;
       number = isdigit (ch) ? (ch - '0') : (ch - 'a' + 10);
 
-      ch = tolower (*asc);
+      ch = _tolower (*asc);
       if ((cnt < 5 && ch != ':') || (cnt == 5 && ch != '\0' && !isspace (ch)))
        {
          ++asc;
index 9e9f7368b9ea686b0573aeca1ea0dc7ffa16ba34..889be0a4e9a4a1f37b21d5a777272d391066447e 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1999 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -34,12 +34,12 @@ ether_line (const char *line, struct ether_addr *addr, char *hostname)
       unsigned int number;
       char ch;
 
-      ch = tolower (*line++);
+      ch = _tolower (*line++);
       if ((ch < '0' || ch > '9') && (ch < 'a' || ch > 'f'))
        return -1;
       number = isdigit (ch) ? (ch - '0') : (ch - 'a' + 10);
 
-      ch = tolower (*line);
+      ch = _tolower (*line);
       if ((cnt < 5 && ch != ':') || (cnt == 5 && ch != '\0' && !isspace (ch)))
        {
          ++line;
index fe733424242e15bd3908a7567d3b861e2a611ac1..d8524f93c89b0027d4ff6031de6743eec719de03 100644 (file)
@@ -574,7 +574,7 @@ __ivaliduser2(hostf, raddr, luser, ruser, rhost)
        }
 
        for (;*p && !isspace(*p); ++p) {
-           *p = tolower (*p);
+           *p = _tolower (*p);
        }
 
        /* Next we want to find the permitted name for the remote user.  */
index b205b96c439974668b2199751a6d0dc12009a840..5edba3a4d89580fcca9fca7a2ba49df1a97f0fa2 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
    Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
 
    This file is part of the GNU C Library.  Its master source is NOT part of
@@ -384,7 +384,7 @@ _nl_normalize_codeset (codeset, name_len)
 
       for (cnt = 0; cnt < name_len; ++cnt)
        if (isalpha (codeset[cnt]))
-         *wp++ = tolower (codeset[cnt]);
+         *wp++ = _tolower (codeset[cnt]);
        else if (isdigit (codeset[cnt]))
          *wp++ = codeset[cnt];
 
index 5d2cb57820ad94afc8d56f9b15a9248e1dc6e6a8..772ab1af33fca4e94489b77cc207baf4e2aa08b3 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
 
@@ -1764,12 +1764,12 @@ collate_simple_weight (struct linereader *lr, struct localedef_t *locale,
                    int base;
 
                    ++runp;
-                   if (tolower (*runp) == 'x')
+                   if (_tolower (*runp) == 'x')
                      {
                        ++runp;
                        base = 16;
                      }
-                   else if (tolower (*runp) == 'd')
+                   else if (_tolower (*runp) == 'd')
                      {
                        ++runp;
                        base = 10;
@@ -1777,7 +1777,7 @@ collate_simple_weight (struct linereader *lr, struct localedef_t *locale,
                    else
                      base = 8;
 
-                   dp = strchr (digits, tolower (*runp));
+                   dp = strchr (digits, _tolower (*runp));
                    if (dp == NULL || (dp - digits) >= base)
                      {
                      illegal_char:
@@ -1789,7 +1789,7 @@ illegal character constant in string"));
                    wch = dp - digits;
                    ++runp;
 
-                   dp = strchr (digits, tolower (*runp));
+                   dp = strchr (digits, _tolower (*runp));
                    if (dp == NULL || (dp - digits) >= base)
                      goto illegal_char;
                    wch *= base;
@@ -1798,7 +1798,7 @@ illegal character constant in string"));
 
                    if (base != 16)
                      {
-                       dp = strchr (digits, tolower (*runp));
+                       dp = strchr (digits, _tolower (*runp));
                        if (dp != NULL && (dp - digits < base))
                          {
                            wch *= base;
index 4406e1ab72c8203592c45d0a538b318664a496ae..31278d63c27b66a2e4977e1e77de683b9d3cce26 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1996.
 
@@ -300,7 +300,7 @@ get_toplvl_escape (struct linereader *lr)
       if (isdigit (ch))
        byte = ch - '0';
       else
-       byte = tolower (ch) - 'a' + 10;
+       byte = _tolower (ch) - 'a' + 10;
 
       ch = lr_getc (lr);
       if ((base == 16 && !isxdigit (ch))
@@ -311,7 +311,7 @@ get_toplvl_escape (struct linereader *lr)
       if (isdigit (ch))
        byte += ch - '0';
       else
-       byte += tolower (ch) - 'a' + 10;
+       byte += _tolower (ch) - 'a' + 10;
 
       ch = lr_getc (lr);
       if (base != 16 && isdigit (ch))
index 98443b8e2da8f35036da7f74b7de8d006e407f57..5a7035dc133ce5403218b8230205699d007a5f30 100644 (file)
@@ -558,7 +558,7 @@ normalize_codeset (codeset, name_len)
 
       for (cnt = 0; cnt < name_len; ++cnt)
        if (isalpha (codeset[cnt]))
-         *wp++ = tolower (codeset[cnt]);
+         *wp++ = _tolower (codeset[cnt]);
        else if (isdigit (codeset[cnt]))
          *wp++ = codeset[cnt];
 
index 3f1d5b12235d1fcd16f8f6a991170dbd6dc1fe8e..025c4c78e455a8414dcf886ad0c110e8539f05b9 100644 (file)
@@ -275,7 +275,7 @@ __MATHDECL (int,ilogb,, (_Mdouble_ __x));
 /* Return X times (2 to the Nth power).  */
 __MATHCALL (scalbln,, (_Mdouble_ __x, long int __n));
 
-/* Round X to integral valuein floating-point format using current
+/* Round X to integral value in floating-point format using current
    rounding direction, but do not raise inexact exception.  */
 __MATHCALL (nearbyint,, (_Mdouble_ __x));
 
index d1dc992c83321e6eba0c753fc3b7a8a5e79db95e..64d0bf8de536cee1a5f9deeece37f148c9a7f76b 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1996.
 
@@ -245,7 +245,7 @@ _nss_nis_getaliasbyname_r (const char *name, struct aliasent *alias,
 
   /* Convert name to lowercase.  */
   for (i = 0; i < namlen; ++i)
-    name2[i] = tolower (name[i]);
+    name2[i] = _tolower (name[i]);
   name2[i] = '\0';
 
   retval = yperr2nss (yp_match (domain, "mail.aliases", name2, namlen,
index 7a1b65e5846e31c623bf55b8202b4b83eea29f1d..4e8c94fe9ae002077a1ca245235834145e92e26c 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1996.
 
@@ -195,7 +195,7 @@ _nss_nis_getnetbyname_r (const char *name, struct netent *net, char *buffer,
       int i;
 
       for (i = 0; i < namlen; ++i)
-       name2[i] = tolower (name[i]);
+       name2[i] = _tolower (name[i]);
       name2[i] = '\0';
 
       retval = yperr2nss (yp_match (domain, "networks.byname", name2,
index c1f3c4e4e2758a2588ec31457f4e931f037b015a..f4f2f2ce68ab66072dac1546bb5fa433d931fda4 100644 (file)
@@ -1,5 +1,5 @@
 /* Common code for file-based databases in nss_files module.
-   Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -162,14 +162,14 @@ CONCAT(_nss_files_end,ENTNAME) (void)
 
 static enum nss_status
 internal_getent (struct STRUCTURE *result,
-                char *buffer, int buflen, int *errnop H_ERRNO_PROTO)
+                char *buffer, size_t buflen, int *errnop H_ERRNO_PROTO)
 {
   char *p;
   struct parser_data *data = (void *) buffer;
   int linebuflen = buffer + buflen - data->linebuffer;
   int parse_result;
 
-  if (buflen < (int) sizeof *data + 1)
+  if (buflen < sizeof *data + 2)
     {
       *errnop = ERANGE;
       H_ERRNO_SET (NETDB_INTERNAL);
index b18361f66cf9a49f87a92e03cfe955467352bb0e..b9bba9cb8f1b12f596cabf609a8a7985e3b0df79 100644 (file)
@@ -1,5 +1,5 @@
 /* Mail alias file parser in nss_files module.
-   Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
 
@@ -148,10 +148,15 @@ get_next_alias (const char *match, struct aliasent *result,
       size_t room_left = buflen - (buflen % __alignof__ (char *));
       char *line;
 
+      /* Check whether the buffer is large enough for even trying to
+         read something.  */
+      if (room_left < 2)
+       goto no_more_room;
+
       /* Read the first line.  It must contain the alias name and
         possibly some alias names.  */
       first_unused[room_left - 1] = '\xff';
-      line = fgets (first_unused, room_left, stream);
+      line = fgets_unlocked (first_unused, room_left, stream);
       if (line == NULL)
        /* Nothing to read.  */
        break;
@@ -245,7 +250,8 @@ get_next_alias (const char *match, struct aliasent *result,
                          while (! feof (listfile))
                            {
                              first_unused[room_left - 1] = '\xff';
-                             line = fgets (first_unused, room_left, listfile);
+                             line = fgets_unlocked (first_unused, room_left,
+                                                    listfile);
                              if (line == NULL)
                                break;
                              if (first_unused[room_left - 1] != '\xff')
@@ -345,7 +351,7 @@ get_next_alias (const char *match, struct aliasent *result,
                  /* The just read character is a white space and so
                     can be ignored.  */
                  first_unused[room_left - 1] = '\xff';
-                 line = fgets (first_unused, room_left, stream);
+                 line = fgets_unlocked (first_unused, room_left, stream);
                  if (first_unused[room_left - 1] != '\xff')
                    goto no_more_room;
                  cp = strpbrk (line, "#\n");
index f05abc805d9408be9631b0e82b9fd994cd338ced..74fcf9c45ebb593a9c53c923d18fe00e4cc1301f 100644 (file)
@@ -2,7 +2,7 @@
    version 0.12.
    (Implements POSIX draft P1003.2/D11.2, except for some of the
    internationalization features.)
-   Copyright (C) 1993, 94, 95, 96, 97, 98 Free Software Foundation, Inc.
+   Copyright (C) 1993, 94, 95, 96, 97, 98, 99 Free Software Foundation, Inc.
 
    The GNU C Library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Library General Public License as
@@ -254,6 +254,12 @@ init_syntax_once ()
 #define ISUPPER(c) (ISASCII (c) && isupper (c))
 #define ISXDIGIT(c) (ISASCII (c) && isxdigit (c))
 
+#ifdef _tolower
+# define TOLOWER(c) _tolower(c)
+#else
+# define TOLOWER(c) tolower(c)
+#endif
+
 #ifndef NULL
 # define NULL (void *)0
 #endif
@@ -5628,7 +5634,7 @@ regcomp (preg, pattern, cflags)
 
       /* Map uppercase characters to corresponding lowercase ones.  */
       for (i = 0; i < CHAR_SET_SIZE; i++)
-        preg->translate[i] = ISUPPER (i) ? tolower (i) : i;
+        preg->translate[i] = ISUPPER (i) ? TOLOWER (i) : i;
     }
   else
     preg->translate = NULL;
index bf6fe02ed8e153b2602d76bba33d2d3888d1521a..d3f1350312cd77a11e2ef5edcc69a9e3f50a4a47 100644 (file)
@@ -107,8 +107,7 @@ inet_net_pton_ipv4(src, dst, size)
                src++;  /* skip x or X. */
                while ((ch = *src++) != '\0' &&
                       isascii(ch) && isxdigit(ch)) {
-                       if (isupper(ch))
-                               ch = tolower(ch);
+                       ch = _tolower(ch);
                        n = strchr(xdigits, ch) - xdigits;
                        assert(n >= 0 && n <= 15);
                        *dst |= n;
index 2ec00806d79d01731ee65fd3bd58ddcc9d016e17..bcd8a2d56e8b609dc88de3d88c477f50f1dcba95 100644 (file)
@@ -1,5 +1,5 @@
 /* Floating point output for `printf'.
-   Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+   Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
 
@@ -709,7 +709,7 @@ __printf_fp (FILE *fp,
     int dig_max;
     int significant;
 
-    if (tolower (info->spec) == 'e')
+    if (_tolower (info->spec) == 'e')
       {
        type = info->spec;
        intdig_max = 1;
index 174ecf523de396f7b3fc4f3e3566535c795c13b9..f05fc700dcc306eb148bfcce53f12b2c775a302f 100644 (file)
@@ -844,7 +844,7 @@ __vfscanf (FILE *s, const char *format, va_list argptr)
              ADDW (c);
              c = inchar ();
 
-             if (width != 0 && tolower (c) == 'x')
+             if (width != 0 && _tolower (c) == 'x')
                {
                  if (base == 0)
                    base = 16;
@@ -883,9 +883,9 @@ __vfscanf (FILE *s, const char *format, va_list argptr)
                 we must recognize "(nil)" as well.  */
              if (wpsize == 0 && read_pointer && (width < 0 || width >= 0)
                  && c == '('
-                 && tolower (inchar ()) == 'n'
-                 && tolower (inchar ()) == 'i'
-                 && tolower (inchar ()) == 'l'
+                 && _tolower (inchar ()) == 'n'
+                 && _tolower (inchar ()) == 'i'
+                 && _tolower (inchar ()) == 'l'
                  && inchar () == ')')
                /* We must produce the value of a NULL pointer.  A single
                   '0' digit is enough.  */
@@ -980,46 +980,46 @@ __vfscanf (FILE *s, const char *format, va_list argptr)
            negative = 0;
 
          /* Take care for the special arguments "nan" and "inf".  */
-         if (tolower (c) == 'n')
+         if (_tolower (c) == 'n')
            {
              /* Maybe "nan".  */
              ADDW (c);
-             if (inchar () == EOF || tolower (c) != 'a')
+             if (inchar () == EOF || _tolower (c) != 'a')
                input_error ();
              ADDW (c);
-             if (inchar () == EOF || tolower (c) != 'n')
+             if (inchar () == EOF || _tolower (c) != 'n')
                input_error ();
              ADDW (c);
              /* It is "nan".  */
              goto scan_float;
            }
-         else if (tolower (c) == 'i')
+         else if (_tolower (c) == 'i')
            {
              /* Maybe "inf" or "infinity".  */
              ADDW (c);
-             if (inchar () == EOF || tolower (c) != 'n')
+             if (inchar () == EOF || _tolower (c) != 'n')
                input_error ();
              ADDW (c);
-             if (inchar () == EOF || tolower (c) != 'f')
+             if (inchar () == EOF || _tolower (c) != 'f')
                input_error ();
              ADDW (c);
              /* It is as least "inf".  */
              if (inchar () != EOF)
                {
-                 if (tolower (c) == 'i')
+                 if (_tolower (c) == 'i')
                    {
                      /* No we have to read the rest as well.  */
                      ADDW (c);
-                     if (inchar () == EOF || tolower (c) != 'n')
+                     if (inchar () == EOF || _tolower (c) != 'n')
                        input_error ();
                      ADDW (c);
-                     if (inchar () == EOF || tolower (c) != 'i')
+                     if (inchar () == EOF || _tolower (c) != 'i')
                        input_error ();
                      ADDW (c);
-                     if (inchar () == EOF || tolower (c) != 't')
+                     if (inchar () == EOF || _tolower (c) != 't')
                        input_error ();
                      ADDW (c);
-                     if (inchar () == EOF || tolower (c) != 'y')
+                     if (inchar () == EOF || _tolower (c) != 'y')
                        input_error ();
                      ADDW (c);
                    }
@@ -1036,7 +1036,7 @@ __vfscanf (FILE *s, const char *format, va_list argptr)
            {
              ADDW (c);
              c = inchar ();
-             if (tolower (c) == 'x')
+             if (_tolower (c) == 'x')
                {
                  /* It is a number in hexadecimal format.  */
                  ADDW (c);
@@ -1060,7 +1060,7 @@ __vfscanf (FILE *s, const char *format, va_list argptr)
              else if (got_e && wp[wpsize - 1] == exp_char
                       && (c == '-' || c == '+'))
                ADDW (c);
-             else if (wpsize > 0 && !got_e && tolower (c) == exp_char)
+             else if (wpsize > 0 && !got_e && _tolower (c) == exp_char)
                {
                  ADDW (exp_char);
                  got_e = got_dot = 1;
index a5786fac58a947a920719ba5f8a381c52dbc908c..794b50beff74cc30bc8eb69636daf58fec43e8c1 100644 (file)
@@ -1,5 +1,5 @@
 /* Return the offset of one string within another.
-   Copyright (C) 1994, 1996, 1997, 1998 Free Software Foundation, Inc.
+   Copyright (C) 1994, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -52,7 +52,7 @@ __strcasestr (phaystack, pneedle)
   haystack = (const unsigned char *) phaystack;
   needle = (const unsigned char *) pneedle;
 
-  b = tolower (*needle);
+  b = _tolower (*needle);
   if (b != '\0')
     {
       haystack--;                              /* possible ANSI violation */
@@ -62,9 +62,9 @@ __strcasestr (phaystack, pneedle)
          if (c == '\0')
            goto ret0;
        }
-      while (tolower (c) != b);
+      while (_tolower (c) != b);
 
-      c = tolower (*++needle);
+      c = _tolower (*++needle);
       if (c == '\0')
        goto foundneedle;
       ++needle;
@@ -80,40 +80,40 @@ __strcasestr (phaystack, pneedle)
              a = *++haystack;
              if (a == '\0')
                goto ret0;
-             if (tolower (a) == b)
+             if (_tolower (a) == b)
                break;
              a = *++haystack;
              if (a == '\0')
                goto ret0;
 shloop:            }
-          while (tolower (a) != b);
+          while (_tolower (a) != b);
 
 jin:     a = *++haystack;
          if (a == '\0')
            goto ret0;
 
-         if (tolower (a) != c)
+         if (_tolower (a) != c)
            goto shloop;
 
          rhaystack = haystack-- + 1;
          rneedle = needle;
-         a = tolower (*rneedle);
+         a = _tolower (*rneedle);
 
-         if (tolower (*rhaystack) == a)
+         if (_tolower (*rhaystack) == a)
            do
              {
                if (a == '\0')
                  goto foundneedle;
                ++rhaystack;
-               a = tolower (*++needle);
-               if (tolower (*rhaystack) != a)
+               a = _tolower (*++needle);
+               if (_tolower (*rhaystack) != a)
                  break;
                if (a == '\0')
                  goto foundneedle;
                ++rhaystack;
-               a = tolower (*++needle);
+               a = _tolower (*++needle);
              }
-           while (tolower (*rhaystack) == a);
+           while (_tolower (*rhaystack) == a);
 
          needle = rneedle;             /* took the register-poor approach */