]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Updated to fedora-glibc-20051221T0931
authorJakub Jelinek <jakub@redhat.com>
Wed, 21 Dec 2005 09:35:28 +0000 (09:35 +0000)
committerJakub Jelinek <jakub@redhat.com>
Wed, 21 Dec 2005 09:35:28 +0000 (09:35 +0000)
36 files changed:
ChangeLog
csu/dso_handle.c
fedora/branch.mk
fedora/glibc.spec.in
iconv/gconv_charset.h
iconv/gconv_conf.c
iconv/gconv_int.h
iconv/gconv_open.c
include/locale.h
intl/plural-exp.c
intl/plural-exp.h
io/fts.c
locale/duplocale.c
locale/freelocale.c
locale/newlocale.c
locale/xlocale.c
misc/getusershell.c
misc/syslog.c
nss/databases.def
nss/nsswitch.c
resolv/herror.c
resolv/res_hconf.c
stdlib/strtod_l.c
sunrpc/auth_des.c
sunrpc/auth_none.c
sunrpc/auth_unix.c
sunrpc/clnt_raw.c
sunrpc/clnt_tcp.c
sunrpc/clnt_udp.c
sunrpc/clnt_unix.c
sunrpc/svc_raw.c
sysdeps/mach/hurd/ifreq.c [moved from sysdeps/mach/hurd/ifreq.h with 81% similarity]
sysdeps/mach/hurd/xmknod.c
sysdeps/unix/sysv/linux/getloadavg.c
sysdeps/unix/sysv/linux/ifreq.c
sysdeps/unix/sysv/linux/ifreq.h [deleted file]

index e5003fb02b875bfbadb68297e9be9e5131477ef5..93c0f79b0b05d29b567e4a4e2bbc6bb5a84a7b57 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,80 @@
+2005-12-21  Ulrich Drepper  <drepper@redhat.com>
+
+       [BZ #1962]
+       * io/fts.c (fts_open): Change type of len to size_t.
+       (fts_build): Remove cast in call to fts_alloc.
+       (fts_alloc): Change third parameter's type to size_t.
+
+       [BZ #1960]
+       * io/fts.c (fts_open): Avoid function call in MAX macro use.
+
 2005-12-20  Ulrich Drepper  <drepper@redhat.com>
 
+       * locale/xlocale.c (_nl_C_locobj): Mark as const.
+       * include/locale.h: Define _nl_C_locobj_ptr.
+       * iconv/gconv_charset.h: Use _nl_C_locobj_ptr instead of using pointer
+       to _nl_C_locobj because we also need a cast.
+       * iconv/gconv_conf.c: Likewise.
+       * iconv/gconv_int.h: Likewise.
+       * iconv/gconv_open.c: Likewise.
+       * locale/duplocale.c: Likewise.
+       * locale/freelocale.c: Likewise.
+       * locale/newlocale.c: Likewise.
+       * misc/syslog.c: Likewise.
+       * stdlib/strtod_l.c: Likewise.
+       * sysdeps/unix/sysv/linux/getloadavg.c: Likewise.
+
+       * csu/dso_handle.c (__dso_handle): Mark as const.
+
+       * intl/plural-exp.c (GERMANIC_PLURAL): Mark as const.
+       * intl/plural-exp.h: Adjust declaration of
+       __gettext_germanic_plural.
+
+       * resolv/herror.c (h_errlist): Mark as const.
+       (h_nerr): Likewise.
+
+2005-12-15  Thomas Schwinge  <tschwinge@gnu.org>
+
+       [BZ #2061]
+       * sysdeps/mach/hurd/xmknod.c (__xmknod): Handle S_IFREG.
+
+2005-12-20  Roland McGrath  <roland@redhat.com>
+
+       * sysdeps/unix/sysv/linux/ifreq.h: File removed.
+       * sysdeps/unix/sysv/linux/ifreq.c: #include "kernel-features.h" here.
+
+       * sysdeps/mach/hurd/ifreq.h: File removed.
+       (__ifreq): Function moved to ...
+       * sysdeps/mach/hurd/ifreq.c: ... here, new file.
+
+2005-12-20  Ulrich Drepper  <drepper@redhat.com>
+
+       * sunrpc/clnt_unix.c (unix_ops): Mark as const.
+       * sunrpc/auth_des.c (authdes_ops): Likewise.
+       * sunrpc/svc_raw.c (server_ops): Likewise.
+       * sunrpc/clnt_udp.c (udp_ops): Likewise.
+       * sunrpc/clnt_tcp.c (tcp_ops): Likewise.
+       * sunrpc/clnt_raw.c (client_ops): Likewise.
+       * sunrpc/auth_unix.c (auth_unix_ops): Likewise.
+       * sunrpc/auth_none.c (ops): Likewise.
+
+       * nss/nsswitch.c (databases): Mark as const.  Change name field
+       into array.
+       * nss/databases.def: Add warning.
+
+       * resolv/res_hconf.c (arg_service_list): Reduce size of svcs and
+       mark const.
+       (cmd): Mark as const.
+       (parse_line): Mark c as pointer to const.
+
+       * misc/getusershell.c (initshells): Remove unnecessary tests.
+       (endusershell): Likewise.
+       (okshells): Mark as const.
+
+       * sysdeps/posix/gai_strerror.c: Complete rewrite. Avoid relocations.
+       * sysdeps/posix/gai_strerror-strs.h: New file.
+       * sysdeps/posix/Dist: New file.
+
        * sysdeps/posix/getaddrinfo.c (gaih): Mark as const.
        * locale/loadlocale.c (_nl_value_types): Likewise.
        * iconv/gconv_conf.c (builtin_aliases): Likewise.
index 04ed07862580f01118b5d11a3a15618d87433793..72f80889d73f89edb6a380aea6ad6ae7bd2768e1 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2005 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
@@ -18,4 +18,5 @@
 
 /* We have to define __dso_handle ourselves since we do not use gcc's
    crtbegin files.  */
-void *__dso_handle __attribute__ ((__visibility__ ("hidden"))) = &__dso_handle;
+void *const __dso_handle __attribute__ ((__visibility__ ("hidden")))
+  = &__dso_handle;
index e40e93094d61acce44f4add1ed2b80fa895645e8..43a878b1bd74f52ce54d8ef9575b9d6f698dcd0a 100644 (file)
@@ -3,5 +3,5 @@ glibc-branch := fedora
 glibc-base := HEAD
 DIST_BRANCH := devel
 COLLECTION := dist-fc4
-fedora-sync-date := 2005-12-20 17:51 UTC
-fedora-sync-tag := fedora-glibc-20051220T1751
+fedora-sync-date := 2005-12-21 09:31 UTC
+fedora-sync-tag := fedora-glibc-20051221T0931
index ea7640684d3f1658a4c6416a72bdcf7a37e25491..d28e5481ab7f5003927875ac5e65207ace51f26c 100644 (file)
@@ -1,4 +1,4 @@
-%define glibcrelease 21
+%define glibcrelease 22
 %define auxarches i586 i686 athlon sparcv9 alphaev6
 %define prelinkarches noarch
 %define xenarches i686 athlon
@@ -1074,6 +1074,11 @@ rm -f *.filelist*
 %endif
 
 %changelog
+* Wed Dec 21 2005 Jakub Jelinek <jakub@redhat.com> 2.3.90-22
+- update from CVS
+  - minor fts fixes
+- revert broken _Pragma () workaround
+
 * Tue Dec 20 2005 Jakub Jelinek <jakub@redhat.com> 2.3.90-21
 - update from CVS
   - fix pointer (de)mangling in gconv_cache.c
index 4a3db73118753b1505cb95263b2389b81d81648b..c18abec57871c4efa3d77101f65d964b09e0d8af 100644 (file)
@@ -1,5 +1,5 @@
 /* Charset name normalization.
-   Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 2001.
 
@@ -29,9 +29,9 @@ strip (char *wp, const char *s)
 
   while (*s != '\0')
     {
-      if (__isalnum_l (*s, &_nl_C_locobj)
+      if (__isalnum_l (*s, _nl_C_locobj_ptr)
          || *s == '_' || *s == '-' || *s == '.' || *s == ',')
-       *wp++ = __toupper_l (*s, &_nl_C_locobj);
+       *wp++ = __toupper_l (*s, _nl_C_locobj_ptr);
       else if (*s == '/')
        {
          if (++slash_count == 3)
@@ -52,7 +52,7 @@ static inline char * __attribute__ ((unused, always_inline))
 upstr (char *dst, const char *str)
 {
   char *cp = dst;
-  while ((*cp++ = __toupper_l (*str++, &_nl_C_locobj)) != '\0')
+  while ((*cp++ = __toupper_l (*str++, _nl_C_locobj_ptr)) != '\0')
     /* nothing */;
   return dst;
 }
index 37179518ba9a5f7e00ce3aa7823ab5680dec9145..78f41cb368cca787515344bcbc78ed520c74d5d0 100644 (file)
@@ -133,20 +133,20 @@ add_alias (char *rp, void *modules)
   struct gconv_alias *new_alias;
   char *from, *to, *wp;
 
-  while (__isspace_l (*rp, &_nl_C_locobj))
+  while (__isspace_l (*rp, _nl_C_locobj_ptr))
     ++rp;
   from = wp = rp;
-  while (*rp != '\0' && !__isspace_l (*rp, &_nl_C_locobj))
-    *wp++ = __toupper_l (*rp++, &_nl_C_locobj);
+  while (*rp != '\0' && !__isspace_l (*rp, _nl_C_locobj_ptr))
+    *wp++ = __toupper_l (*rp++, _nl_C_locobj_ptr);
   if (*rp == '\0')
     /* There is no `to' string on the line.  Ignore it.  */
     return;
   *wp++ = '\0';
   to = ++rp;
-  while (__isspace_l (*rp, &_nl_C_locobj))
+  while (__isspace_l (*rp, _nl_C_locobj_ptr))
     ++rp;
-  while (*rp != '\0' && !__isspace_l (*rp, &_nl_C_locobj))
-    *wp++ = __toupper_l (*rp++, &_nl_C_locobj);
+  while (*rp != '\0' && !__isspace_l (*rp, _nl_C_locobj_ptr))
+    *wp++ = __toupper_l (*rp++, _nl_C_locobj_ptr);
   if (to == wp)
     /* No `to' string, ignore the line.  */
     return;
@@ -254,30 +254,30 @@ add_module (char *rp, const char *directory, size_t dir_len, void **modules,
   int need_ext;
   int cost_hi;
 
-  while (__isspace_l (*rp, &_nl_C_locobj))
+  while (__isspace_l (*rp, _nl_C_locobj_ptr))
     ++rp;
   from = rp;
-  while (*rp != '\0' && !__isspace_l (*rp, &_nl_C_locobj))
+  while (*rp != '\0' && !__isspace_l (*rp, _nl_C_locobj_ptr))
     {
-      *rp = __toupper_l (*rp, &_nl_C_locobj);
+      *rp = __toupper_l (*rp, _nl_C_locobj_ptr);
       ++rp;
     }
   if (*rp == '\0')
     return;
   *rp++ = '\0';
   to = wp = rp;
-  while (__isspace_l (*rp, &_nl_C_locobj))
+  while (__isspace_l (*rp, _nl_C_locobj_ptr))
     ++rp;
-  while (*rp != '\0' && !__isspace_l (*rp, &_nl_C_locobj))
-    *wp++ = __toupper_l (*rp++, &_nl_C_locobj);
+  while (*rp != '\0' && !__isspace_l (*rp, _nl_C_locobj_ptr))
+    *wp++ = __toupper_l (*rp++, _nl_C_locobj_ptr);
   if (*rp == '\0')
     return;
   *wp++ = '\0';
   do
     ++rp;
-  while (__isspace_l (*rp, &_nl_C_locobj));
+  while (__isspace_l (*rp, _nl_C_locobj_ptr));
   module = wp;
-  while (*rp != '\0' && !__isspace_l (*rp, &_nl_C_locobj))
+  while (*rp != '\0' && !__isspace_l (*rp, _nl_C_locobj_ptr))
     *wp++ = *rp++;
   if (*rp == '\0')
     {
@@ -392,7 +392,7 @@ read_conf_file (const char *filename, const char *directory, size_t dir_len,
        if (rp[n - 1] == '\n')
          rp[n - 1] = '\0';
 
-      while (__isspace_l (*rp, &_nl_C_locobj))
+      while (__isspace_l (*rp, _nl_C_locobj_ptr))
        ++rp;
 
       /* If this is an empty line go on with the next one.  */
@@ -400,7 +400,7 @@ read_conf_file (const char *filename, const char *directory, size_t dir_len,
        continue;
 
       word = rp;
-      while (*rp != '\0' && !__isspace_l (*rp, &_nl_C_locobj))
+      while (*rp != '\0' && !__isspace_l (*rp, _nl_C_locobj_ptr))
        ++rp;
 
       if (rp - word == sizeof ("alias") - 1
index 768ebf0a97af074cb0b7b1d6e8fcae52dc81059b..ace2bae1c6e40e4f14e427e8104e38c17226e1e8 100644 (file)
@@ -148,7 +148,7 @@ __libc_lock_define (extern, __gconv_lock);
     tmp = result = __alloca (cp - (str) + 3 + suffix_len);                   \
     cp = (str);                                                                      \
     while (*cp != '\0')                                                              \
-      *tmp++ = __toupper_l (*cp++, &_nl_C_locobj);                           \
+      *tmp++ = __toupper_l (*cp++, _nl_C_locobj_ptr);                        \
     if (cnt < 2)                                                             \
       {                                                                              \
        *tmp++ = '/';                                                         \
index 95f320339455e490e84f3729dc9e44d56b2ea14a..bbf27b3dc59a6689cd39f8ed4c258448b28a5b43 100644 (file)
@@ -67,7 +67,7 @@ __gconv_open (const char *toset, const char *fromset, __gconv_t *handle,
          tok = __strtok_r (tok, ",", &ptr);
          while (tok != NULL)
            {
-             if (__strcasecmp_l (tok, "TRANSLIT", &_nl_C_locobj) == 0)
+             if (__strcasecmp_l (tok, "TRANSLIT", _nl_C_locobj_ptr) == 0)
                {
                  /* It's the builtin transliteration handling.  We only
                     support it for working on the internal encoding.  */
@@ -101,7 +101,7 @@ __gconv_open (const char *toset, const char *fromset, __gconv_t *handle,
                        lastp->next = newp;
                    }
                }
-             else if (__strcasecmp_l (tok, "IGNORE", &_nl_C_locobj) == 0)
+             else if (__strcasecmp_l (tok, "IGNORE", _nl_C_locobj_ptr) == 0)
                /* Set the flag to ignore all errors.  */
                conv_flags |= __GCONV_IGNORE_ERRORS;
              else
@@ -115,7 +115,7 @@ __gconv_open (const char *toset, const char *fromset, __gconv_t *handle,
                  for (runp = trans; runp != NULL; runp = runp->next)
                    if (runp->name != NULL
                        && __strcasecmp_l (tok, runp->name,
-                                          &_nl_C_locobj) == 0)
+                                          _nl_C_locobj_ptr) == 0)
                      break;
                    else
                      lastp = runp;
@@ -235,7 +235,7 @@ __gconv_open (const char *toset, const char *fromset, __gconv_t *handle,
              for (runp = trans; runp != NULL; runp = runp->next)
                for (n = 0; n < runp->ncsnames; ++n)
                  if (__strcasecmp_l (steps[cnt].__from_name,
-                                     runp->csnames[n], &_nl_C_locobj) == 0)
+                                     runp->csnames[n], _nl_C_locobj_ptr) == 0)
                    {
                      void *data = NULL;
 
index 22770b9ad2c2723e0408b9faadc0a6fcd9f61c7a..522600192955208db2084c54a493d95cb972b2d3 100644 (file)
@@ -11,7 +11,8 @@ libc_hidden_proto (setlocale)
 extern struct loaded_l10nfile *_nl_locale_file_list[] attribute_hidden;
 
 /* Locale object for C locale.  */
-extern struct __locale_struct _nl_C_locobj attribute_hidden;
+extern const struct __locale_struct _nl_C_locobj attribute_hidden;
+#define _nl_C_locobj_ptr ((struct __locale_struct *) &_nl_C_locobj)
 
 /* Now define the internal interfaces.  */
 extern struct lconv *__localeconv (void);
index ba5d455cd5bed82180c6f86db8648c986c714330..9cb7a4540a809c4825a4c2be207e940116f74de4 100644 (file)
@@ -1,5 +1,5 @@
 /* Expression parsing for plural form selection.
-   Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2001, 2005 Free Software Foundation, Inc.
    Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
    This file is part of the GNU C Library.
 
@@ -47,7 +47,7 @@ static const struct expression plone =
     .num = 1
   }
 };
-struct expression GERMANIC_PLURAL =
+const struct expression GERMANIC_PLURAL =
 {
   .nargs = 2,
   .operation = not_equal,
index 75c702f79c31ef6f827340f9f574a2eb09a005ba..f8a5c87ff0115e584cd51ddedc89aa80dfe52d77 100644 (file)
@@ -1,5 +1,5 @@
 /* Expression parsing and evaluation for plural form selection.
-   Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2001, 2002, 2005 Free Software Foundation, Inc.
    Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
    This file is part of the GNU C Library.
 
@@ -113,7 +113,7 @@ struct parse_args
 extern void FREE_EXPRESSION PARAMS ((struct expression *exp))
      internal_function;
 extern int PLURAL_PARSE PARAMS ((void *arg));
-extern struct expression GERMANIC_PLURAL attribute_hidden;
+extern const struct expression GERMANIC_PLURAL attribute_hidden;
 extern void EXTRACT_PLURAL_EXPRESSION PARAMS ((const char *nullentry,
                                               struct expression **pluralp,
                                               unsigned long int *npluralsp))
index f0df56cc7ba4038021a6926e1bfbcfc7992576e8..2b99206b88a49aa0a680150022f8aefecfb86e8e 100644 (file)
--- a/io/fts.c
+++ b/io/fts.c
@@ -53,7 +53,7 @@ static char sccsid[] = "@(#)fts.c     8.6 (Berkeley) 8/14/94";
 #endif
 
 
-static FTSENT  *fts_alloc (FTS *, const char *, int) internal_function;
+static FTSENT  *fts_alloc (FTS *, const char *, size_t) internal_function;
 static FTSENT  *fts_build (FTS *, int) internal_function;
 static void     fts_lfree (FTSENT *) internal_function;
 static void     fts_load (FTS *, FTSENT *) internal_function;
@@ -94,7 +94,6 @@ fts_open(argv, options, compar)
        register FTSENT *p, *root;
        register int nitems;
        FTSENT *parent, *tmp;
-       int len;
 
        /* Options check. */
        if (options & ~FTS_OPTIONMASK) {
@@ -120,7 +119,8 @@ fts_open(argv, options, compar)
 #ifndef MAXPATHLEN
 #define MAXPATHLEN 1024
 #endif
-       if (fts_palloc(sp, MAX(fts_maxarglen(argv), MAXPATHLEN)))
+       size_t maxarglen = fts_maxarglen(argv);
+       if (fts_palloc(sp, MAX(maxarglen, MAXPATHLEN)))
                goto mem1;
 
        /* Allocate/initialize root's parent. */
@@ -131,7 +131,8 @@ fts_open(argv, options, compar)
        /* Allocate/initialize root(s). */
        for (root = NULL, nitems = 0; *argv != NULL; ++argv, ++nitems) {
                /* Don't allow zero-length paths. */
-               if ((len = strlen(*argv)) == 0) {
+               size_t len = strlen(*argv);
+               if (len == 0) {
                        __set_errno (ENOENT);
                        goto mem3;
                }
@@ -690,7 +691,7 @@ fts_build(sp, type)
                if (!ISSET(FTS_SEEDOT) && ISDOT(dp->d_name))
                        continue;
 
-               if ((p = fts_alloc(sp, dp->d_name, (int)_D_EXACT_NAMLEN (dp))) == NULL)
+               if ((p = fts_alloc(sp, dp->d_name, _D_EXACT_NAMLEN (dp))) == NULL)
                        goto mem1;
                if (_D_EXACT_NAMLEN (dp) >= maxlen) {/* include space for NUL */
                        oldaddr = sp->fts_path;
@@ -961,7 +962,7 @@ internal_function
 fts_alloc(sp, name, namelen)
        FTS *sp;
        const char *name;
-       register int namelen;
+       size_t namelen;
 {
        register FTSENT *p;
        size_t len;
index 77dfc01046f44593e3e72c9799707a9449ccc066..0cec09f63af7f4bb0ad56ebb7e01078f94f2b316 100644 (file)
@@ -1,5 +1,5 @@
 /* Duplicate handle for selection of locales.
-   Copyright (C) 1997, 2000, 2001, 2002 Free Software Foundation, Inc.
+   Copyright (C) 1997, 2000, 2001, 2002, 2005 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
 
@@ -34,7 +34,7 @@ __locale_t
 __duplocale (__locale_t dataset)
 {
   /* This static object is returned for newlocale (LC_ALL_MASK, "C").  */
-  if (dataset == &_nl_C_locobj)
+  if (dataset == _nl_C_locobj_ptr)
     return dataset;
 
   __locale_t result;
index ec169bcb66aa9d11b1eafa2fc8c242fc52beac2a..7430455d56c1e867d39855a397844b10018e39b7 100644 (file)
@@ -1,5 +1,5 @@
 /* Free data allocated by a call to setlocale_r
-   Copyright (C) 1996, 1997, 2000, 2002 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1997, 2000, 2002, 2005 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
 
@@ -35,7 +35,7 @@ __freelocale (__locale_t dataset)
   int cnt;
 
   /* This static object is returned for newlocale (LC_ALL_MASK, "C").  */
-  if (dataset == &_nl_C_locobj)
+  if (dataset == _nl_C_locobj_ptr)
     return;
 
   /* We modify global data (the usage counts).  */
index b646ffeacdd47d28d0128b179652a94e305d694b..b3d4b464b1fc5874778d348b4446740c4cc7549e 100644 (file)
@@ -1,5 +1,5 @@
 /* Return a reference to locale information record.
-   Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2004
+   Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2004, 2005
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -66,7 +66,7 @@ __newlocale (int category_mask, const char *locale, __locale_t base)
   if (locale == NULL)
     ERROR_RETURN;
 
-  if (base == &_nl_C_locobj)
+  if (base == _nl_C_locobj_ptr)
     /* We're to modify BASE, returned for a previous call with "C".
        We can't really modify the read-only structure, so instead
        start over by copying it.  */
@@ -75,7 +75,7 @@ __newlocale (int category_mask, const char *locale, __locale_t base)
   if ((base == NULL || category_mask == (1 << __LC_LAST) - 1 - (1 << LC_ALL))
       && (category_mask == 0 || !strcmp (locale, "C")))
     /* Asking for the "C" locale needn't allocate a new object.  */
-    return &_nl_C_locobj;
+    return _nl_C_locobj_ptr;
 
   /* Allocate memory for the result.  */
   if (base != NULL)
index d9d344262148c8bebc8d58b6dea6d6778d531093..4573e6f390e80780694cff7a0f52cb9a92b162a9 100644 (file)
@@ -1,5 +1,5 @@
 /* C locale object.
-   Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2002, 2005 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 2001.
 
@@ -32,7 +32,7 @@ extern const char _nl_C_LC_CTYPE_toupper[] attribute_hidden;
 extern const char _nl_C_LC_CTYPE_tolower[] attribute_hidden;
 
 
-struct __locale_struct _nl_C_locobj attribute_hidden =
+const struct __locale_struct _nl_C_locobj attribute_hidden =
   {
     .__locales =
     {
index 95f0eab5e21f4bfa218c4833defea8bdebbe0b42..f41c6fa5f03080755ef13dc60ae39d2cda6db841 100644 (file)
@@ -46,7 +46,7 @@ static char sccsid[] = "@(#)getusershell.c    8.1 (Berkeley) 6/4/93";
  * /etc/shells.
  */
 
-static const char *okshells[] = { _PATH_BSHELL, _PATH_CSHELL, NULL };
+static const char *const okshells[] = { _PATH_BSHELL, _PATH_CSHELL, NULL };
 static char **curshell, **shells, *strings;
 static char **initshells (void) __THROW;
 
@@ -70,11 +70,9 @@ void
 endusershell()
 {
 
-       if (shells != NULL)
-               free(shells);
+       free(shells);
        shells = NULL;
-       if (strings != NULL)
-               free(strings);
+       free(strings);
        strings = NULL;
        curshell = NULL;
 }
@@ -94,11 +92,9 @@ initshells()
        struct stat64 statb;
        int flen;
 
-       if (shells != NULL)
-               free(shells);
+       free(shells);
        shells = NULL;
-       if (strings != NULL)
-               free(strings);
+       free(strings);
        strings = NULL;
        if ((fp = fopen(_PATH_SHELLS, "rc")) == NULL)
                return (char **) okshells;
@@ -117,8 +113,6 @@ initshells()
                strings = NULL;
                return (char **) okshells;
        }
-       /* No threads using this stream.  */
-       __fsetlocking (fp, FSETLOCKING_BYCALLER);
        sp = shells;
        cp = strings;
        flen = statb.st_size;
index 9c5597f5aa16fd50dd812d7568417e4e3bf77d58..cae13f876bfd05e9c388e9ab557f2e231333562f 100644 (file)
@@ -195,7 +195,7 @@ __vsyslog_chk(int pri, int flag, const char *fmt, va_list ap)
                                              - f->_IO_write_ptr,
                                              "%h %e %T ",
                                              __localtime_r (&now, &now_tm),
-                                             &_nl_C_locobj);
+                                             _nl_C_locobj_ptr);
            msgoff = ftell (f);
            if (LogTag == NULL)
              LogTag = __progname;
index 27c15fc04ff9e2b3d7e4bd28d966831137a5ccbc..c35d7f18c213e3c8a7d3d96e65fcf9879168157f 100644 (file)
@@ -1,5 +1,5 @@
 /* List of all databases defined for the NSS in GNU C Library.
-   Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1997, 2005 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
 
@@ -18,7 +18,8 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
-/* This list must be kept sorted!!!  */
+/* This list must be kept sorted!!!  If any long name is added the
+   field size for it must be increases.  */
 
 DEFINE_DATABASE (aliases)
 DEFINE_DATABASE (ethers)
index 895b17825a1f39eca002b59c8d75f91f1282bbe3..7e5e6e81642ae8532446a07470d078f0e4ca7af6 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004
+/* Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -59,9 +59,9 @@ static service_library *nss_new_service (name_database *database,
 #undef DEFINE_DATABASE
 
 /* Structure to map database name to variable.  */
-static struct
+static const struct
 {
-  const char *name;
+  const char name[10];
   service_user **dbp;
 } databases[] =
 {
index a61a3a9a4d8ef8f388277ee083a3bde08fe1761c..c143cec28c1e021000b24e545006472f53846114 100644 (file)
@@ -64,14 +64,14 @@ static const char rcsid[] = "$BINDId: herror.c,v 8.11 1999/10/13 16:39:39 vixie
 #include <libintl.h>
 #include <not-cancel.h>
 
-const char *h_errlist[] = {
+const char *const h_errlist[] = {
        N_("Resolver Error 0 (no error)"),
        N_("Unknown host"),                     /* 1 HOST_NOT_FOUND */
        N_("Host name lookup failure"),         /* 2 TRY_AGAIN */
        N_("Unknown server error"),             /* 3 NO_RECOVERY */
        N_("No address associated with name"),  /* 4 NO_ADDRESS */
 };
-int    h_nerr = { sizeof h_errlist / sizeof h_errlist[0] };
+const int      h_nerr = { sizeof h_errlist / sizeof h_errlist[0] };
 
 /*
  * herror --
index 9beb881701477eb5020fa326522d260f0507c9ee..c54b28dadd4200a7ea00372d671150d51736f159 100644 (file)
@@ -67,7 +67,7 @@ static const char *arg_trimdomain_list (const char *, int, const char *,
 static const char *arg_spoof (const char *, int, const char *, unsigned int);
 static const char *arg_bool (const char *, int, const char *, unsigned int);
 
-static struct cmd
+static const struct cmd
 {
   const char *name;
   const char *(*parse_args) (const char * filename, int line_num,
@@ -114,10 +114,10 @@ arg_service_list (const char *fname, int line_num, const char *args,
   const char *start;
   size_t len;
   size_t i;
-  static struct
+  static const struct
   {
-    const char * name;
-    enum Name_Service service;
+    const char name[6];
+    int16_t service;
   } svcs[] =
     {
       {"bind", SERVICE_BIND},
@@ -315,7 +315,7 @@ static void
 parse_line (const char *fname, int line_num, const char *str)
 {
   const char *start;
-  struct cmd *c = 0;
+  const struct cmd *c = 0;
   size_t len;
   size_t i;
 
index c7901c29fee0e48984cdb90a843816bc669c33f0..5743ee434c36eaf008bf9f00a3b5fa4f7347961f 100644 (file)
@@ -100,9 +100,9 @@ extern unsigned long long int ____strtoull_l_internal (const char *, char **,
 # define ISDIGIT(Ch) __iswdigit_l ((Ch), loc)
 # define ISXDIGIT(Ch) __iswxdigit_l ((Ch), loc)
 # define TOLOWER(Ch) __towlower_l ((Ch), loc)
-# define TOLOWER_C(Ch) __towlower_l ((Ch), &_nl_C_locobj)
+# define TOLOWER_C(Ch) __towlower_l ((Ch), _nl_C_locobj_ptr)
 # define STRNCASECMP(S1, S2, N) \
-  __wcsncasecmp_l ((S1), (S2), (N), &_nl_C_locobj)
+  __wcsncasecmp_l ((S1), (S2), (N), _nl_C_locobj_ptr)
 # define STRTOULL(S, E, B) ____wcstoull_l_internal ((S), (E), (B), 0, loc)
 #else
 # define STRING_TYPE char
@@ -112,9 +112,9 @@ extern unsigned long long int ____strtoull_l_internal (const char *, char **,
 # define ISDIGIT(Ch) __isdigit_l ((Ch), loc)
 # define ISXDIGIT(Ch) __isxdigit_l ((Ch), loc)
 # define TOLOWER(Ch) __tolower_l ((Ch), loc)
-# define TOLOWER_C(Ch) __tolower_l ((Ch), &_nl_C_locobj)
+# define TOLOWER_C(Ch) __tolower_l ((Ch), _nl_C_locobj_ptr)
 # define STRNCASECMP(S1, S2, N) \
-  __strncasecmp_l ((S1), (S2), (N), &_nl_C_locobj)
+  __strncasecmp_l ((S1), (S2), (N), _nl_C_locobj_ptr)
 # define STRTOULL(S, E, B) ____strtoull_l_internal ((S), (E), (B), 0, loc)
 #endif
 
index dbd12e5aad6127176a03c8d9eda8e255b5153c36..a76f0278ce8be5e9b7a8cd4e104a2d34e4a3c164 100644 (file)
@@ -66,7 +66,7 @@ static void authdes_destroy (AUTH *);
 static bool_t synchronize (struct sockaddr *, struct rpc_timeval *)
      internal_function;
 
-static struct auth_ops authdes_ops = {
+static const struct auth_ops authdes_ops = {
   authdes_nextverf,
   authdes_marshal,
   authdes_validate,
@@ -185,7 +185,7 @@ authdes_pk_create (const char *servername, netobj *pkey, u_int window,
    */
   auth->ah_cred.oa_flavor = AUTH_DES;
   auth->ah_verf.oa_flavor = AUTH_DES;
-  auth->ah_ops = &authdes_ops;
+  auth->ah_ops = (struct auth_ops *) &authdes_ops;
   auth->ah_private = (caddr_t) ad;
 
   if (!authdes_refresh (auth))
index 9c4d3fde6639689258168588fcae40e680efad42..f459520a2c51ba35d1f00871561d6bde11b6757f 100644 (file)
@@ -49,7 +49,7 @@ static bool_t authnone_marshal (AUTH *, XDR *);
 static bool_t authnone_validate (AUTH *, struct opaque_auth *);
 static bool_t authnone_refresh (AUTH *);
 
-static struct auth_ops ops = {
+static const struct auth_ops ops = {
   authnone_verf,
   authnone_marshal,
   authnone_validate,
@@ -80,7 +80,7 @@ authnone_create_once (void)
   ap = &authnone_private;
 
   ap->no_client.ah_cred = ap->no_client.ah_verf = _null_auth;
-  ap->no_client.ah_ops = &ops;
+  ap->no_client.ah_ops = (struct auth_ops *) &ops;
   xdrs = &xdr_stream;
   INTUSE(xdrmem_create) (xdrs, ap->marshalled_client,
                         (u_int) MAX_MARSHAL_SIZE, XDR_ENCODE);
@@ -88,7 +88,7 @@ authnone_create_once (void)
   (void) INTUSE(xdr_opaque_auth) (xdrs, &ap->no_client.ah_verf);
   ap->mcnt = XDR_GETPOS (xdrs);
   XDR_DESTROY (xdrs);
-}  
+}
 
 AUTH *
 authnone_create (void)
index c5a874bbbe5dc00d08eb05b4074b35f4b9ce9e75..1740e58cdcd45baae231eadbba67ea7245aa7e0a 100644 (file)
@@ -65,7 +65,7 @@ static bool_t authunix_validate (AUTH *, struct opaque_auth *);
 static bool_t authunix_refresh (AUTH *);
 static void authunix_destroy (AUTH *);
 
-static struct auth_ops auth_unix_ops = {
+static const struct auth_ops auth_unix_ops = {
   authunix_nextverf,
   authunix_marshal,
   authunix_validate,
@@ -116,7 +116,7 @@ no_memory:
       mem_free (au, sizeof (*au));
       return NULL;
     }
-  auth->ah_ops = &auth_unix_ops;
+  auth->ah_ops = (struct auth_ops *) &auth_unix_ops;
   auth->ah_private = (caddr_t) au;
   auth->ah_verf = au->au_shcred = _null_auth;
   au->au_shfaults = 0;
index e8613422a557ba149f26e9a87f453e965dff7024..019f1bbae05f31365dda3b4a5e3bc3f3d686d59b 100644 (file)
@@ -74,7 +74,7 @@ static bool_t clntraw_freeres (CLIENT *, xdrproc_t, caddr_t);
 static bool_t clntraw_control (CLIENT *, int, char *);
 static void clntraw_destroy (CLIENT *);
 
-static struct clnt_ops client_ops =
+static const struct clnt_ops client_ops =
 {
   clntraw_call,
   clntraw_abort,
@@ -127,7 +127,7 @@ clntraw_create (u_long prog, u_long vers)
   /*
    * create client handle
    */
-  client->cl_ops = &client_ops;
+  client->cl_ops = (struct clnt_ops *) &client_ops;
   client->cl_auth = INTUSE(authnone_create) ();
   return client;
 }
index 095baa87aaa4579b627c2a2b3a9038be9b85ae00..5bec3bcf3a3eaf686b7034680c23150bc744db47 100644 (file)
@@ -91,7 +91,7 @@ static bool_t clnttcp_freeres (CLIENT *, xdrproc_t, caddr_t);
 static bool_t clnttcp_control (CLIENT *, int, char *);
 static void clnttcp_destroy (CLIENT *);
 
-static struct clnt_ops tcp_ops =
+static const struct clnt_ops tcp_ops =
 {
   clnttcp_call,
   clnttcp_abort,
@@ -213,7 +213,7 @@ clnttcp_create (struct sockaddr_in *raddr, u_long prog, u_long vers,
    */
   INTUSE(xdrrec_create) (&(ct->ct_xdrs), sendsz, recvsz,
                         (caddr_t) ct, readtcp, writetcp);
-  h->cl_ops = &tcp_ops;
+  h->cl_ops = (struct clnt_ops *) &tcp_ops;
   h->cl_private = (caddr_t) ct;
   h->cl_auth = INTUSE(authnone_create) ();
   return h;
index f4a46b5036d2978770958e24a6576ba7aa3bf8f8..8c24677c83e8e060b24fff5209e6accf22468ac8 100644 (file)
@@ -74,7 +74,7 @@ static bool_t clntudp_freeres (CLIENT *, xdrproc_t, caddr_t);
 static bool_t clntudp_control (CLIENT *, int, char *);
 static void clntudp_destroy (CLIENT *);
 
-static struct clnt_ops udp_ops =
+static const struct clnt_ops udp_ops =
 {
   clntudp_call,
   clntudp_abort,
@@ -153,7 +153,7 @@ clntudp_bufcreate (struct sockaddr_in *raddr, u_long program, u_long version,
        }
       raddr->sin_port = htons (port);
     }
-  cl->cl_ops = &udp_ops;
+  cl->cl_ops = (struct clnt_ops *) &udp_ops;
   cl->cl_private = (caddr_t) cu;
   cu->cu_raddr = *raddr;
   cu->cu_rlen = sizeof (cu->cu_raddr);
index 4e93e0d855d6e08814b3feca46f0c0678ed08303..848a480581c5816a2909c68974f0115e7a374e86 100644 (file)
@@ -88,7 +88,7 @@ static bool_t clntunix_freeres (CLIENT *, xdrproc_t, caddr_t);
 static bool_t clntunix_control (CLIENT *, int, char *);
 static void clntunix_destroy (CLIENT *);
 
-static struct clnt_ops unix_ops =
+static const struct clnt_ops unix_ops =
 {
   clntunix_call,
   clntunix_abort,
@@ -192,7 +192,7 @@ clntunix_create (struct sockaddr_un *raddr, u_long prog, u_long vers,
    */
   INTUSE(xdrrec_create) (&(ct->ct_xdrs), sendsz, recvsz,
                         (caddr_t) ct, readunix, writeunix);
-  h->cl_ops = &unix_ops;
+  h->cl_ops = (struct clnt_ops *) &unix_ops;
   h->cl_private = (caddr_t) ct;
   h->cl_auth = INTUSE(authnone_create) ();
   return h;
index 37a027d412cde1c9eab06e89fd58d92775d9260f..ff8fa7ccd938cd7e01ea9b78a763c84ca9bab874 100644 (file)
@@ -66,7 +66,7 @@ static bool_t svcraw_reply (SVCXPRT *, struct rpc_msg *);
 static bool_t svcraw_freeargs (SVCXPRT *, xdrproc_t, caddr_t);
 static void svcraw_destroy (SVCXPRT *);
 
-static struct xp_ops server_ops =
+static const struct xp_ops server_ops =
 {
   svcraw_recv,
   svcraw_stat,
@@ -89,7 +89,7 @@ svcraw_create (void)
     }
   srp->server.xp_sock = 0;
   srp->server.xp_port = 0;
-  srp->server.xp_ops = &server_ops;
+  srp->server.xp_ops = (struct xp_ops *) &server_ops;
   srp->server.xp_verf.oa_base = srp->verf_body;
   INTUSE(xdrmem_create) (&srp->xdr_stream, srp->_raw_buf, UDPMSGSIZE,
                         XDR_FREE);
similarity index 81%
rename from sysdeps/mach/hurd/ifreq.h
rename to sysdeps/mach/hurd/ifreq.c
index 77f0b9cac04a427002a83c0099522595e510c74f..258ea6368dd5177cdaf4ddc06016ee955f7f6f0d 100644 (file)
@@ -1,5 +1,5 @@
 /* Fetch the host's network interface list.  Hurd version.
-   Copyright (C) 2002 Free Software Foundation, Inc.
+   Copyright (C) 2002,2005 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
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
-#include <net/if.h>
-#include <hurd.h>
-#include <hurd/pfinet.h>
-#include <sys/socket.h>
-#include <sys/mman.h>
-
-
-static inline void
+void
 __ifreq (struct ifreq **ifreqs, int *num_ifs, int sockfd)
 {
   file_t server;
@@ -64,17 +57,3 @@ __ifreq (struct ifreq **ifreqs, int *num_ifs, int sockfd)
     }
 
 }
-
-
-static inline struct ifreq *
-__if_nextreq (struct ifreq *ifr)
-{
-  return ifr + 1;
-}
-
-
-static inline void
-__if_freereq (struct ifreq *ifreqs, int num_ifs)
-{
-  __munmap (ifreqs, num_ifs * sizeof (struct ifreq));
-}
index 2989215d9c285f7d8cf7de5da8164c1212ddaa30..aaa6771cd8358e2fe56cc074e457b6ceafc620ce 100644 (file)
@@ -1,4 +1,5 @@
-/* Copyright (C) 1991,92,93,94,95,96,99,2002 Free Software Foundation, Inc.
+/* Copyright (C) 1991,1992,1993,1994,1995,1996,1999,2002,2005
+       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
@@ -57,13 +58,18 @@ __xmknod (int vers, const char *file_name, mode_t mode, dev_t *dev)
       translator = _HURD_FIFO;
       len = sizeof (_HURD_FIFO);
     }
+  else if (S_ISREG (mode))
+    {
+      translator = NULL;
+      len = 0;
+    }
   else
     {
       errno = EINVAL;
       return -1;
     }
 
-  if (! S_ISFIFO (mode))
+  if (translator != NULL && ! S_ISFIFO (mode))
     {
       /* We set the translator to "ifmt\0major\0minor\0", where IFMT
         depends on the S_IFMT bits of our MODE argument, and MAJOR and
@@ -89,7 +95,7 @@ __xmknod (int vers, const char *file_name, mode_t mode, dev_t *dev)
   /* Create a new, unlinked node in the target directory.  */
   err = __dir_mkfile (dir, O_WRITE, (mode & ~S_IFMT) & ~_hurd_umask, &node);
 
-  if (! err)
+  if (! err && translator != NULL)
     /* Set the node's translator to make it a device.  */
     err = __file_set_translator (node,
                                 FS_TRANS_EXCL | FS_TRANS_SET,
index 6a521431ba67cc93dacfa29e859755f0e2f7bf6b..81a1c0dd527d6c84b165a6752f4a22a4b485e1d8 100644 (file)
@@ -1,5 +1,5 @@
 /* Get system load averages.  Linux (/proc/loadavg) version.
-   Copyright (C) 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2000, 2001, 2003, 2005 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
@@ -55,7 +55,7 @@ getloadavg (double loadavg[], int nelem)
       for (i = 0; i < nelem; ++i)
        {
          char *endp;
-         loadavg[i] = __strtod_l (p, &endp, &_nl_C_locobj);
+         loadavg[i] = __strtod_l (p, &endp, _nl_C_locobj_ptr);
          if (endp == p)
            /* This should not happen.  The format of /proc/loadavg
               must have changed.  Don't return with what we have,
index 098f11750ffa6f2b96c263dd35dbdfa082aa14a5..43d54014bcaaa4003da889ccd4681454fadf523e 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2002, 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 1999,2002,2003,2004,2005 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Andreas Jaeger <aj@suse.de>.
 
@@ -18,6 +18,7 @@
    02111-1307 USA.  */
 
 #include "ifreq.h"
+#include "kernel-features.h"
 
 /* Variable to signal whether SIOCGIFCONF is not available.  */
 #if __ASSUME_SIOCGIFNAME == 0 || 1
diff --git a/sysdeps/unix/sysv/linux/ifreq.h b/sysdeps/unix/sysv/linux/ifreq.h
deleted file mode 100644 (file)
index b92e063..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-/* Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Andreas Jaeger <aj@suse.de>.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <net/if.h>
-#include <sys/socket.h>
-#include <sys/ioctl.h>
-#include "kernel-features.h"
-
-
-extern void __ifreq (struct ifreq **ifreqs, int *num_ifs, int sockfd);
-
-static inline struct ifreq *
-__if_nextreq (struct ifreq *ifr)
-{
-  return ifr + 1;
-}
-
-static inline void
-__if_freereq (struct ifreq *ifreqs, int num_ifs)
-{
-  free (ifreqs);
-}