Like already done in various other places and advised by Roland in

https://lists.gnu.org/archive/html/bug-hurd/2012-04/msg00124.html
---
 hurd/hurd/lookup.h             | 4 ++--
 hurd/hurdlookup.c              | 2 +-
 hurd/lookup-at.c               | 2 +-
 hurd/lookup-retry.c            | 2 +-
 sysdeps/mach/hurd/bind.c       | 2 +-
 sysdeps/mach/hurd/dl-sysdep.c  | 2 +-
 sysdeps/mach/hurd/fexecve.c    | 2 +-
 sysdeps/mach/hurd/getlogin.c   | 2 +-
 sysdeps/mach/hurd/readlinkat.c | 2 +-
 sysdeps/mach/hurd/ttyname.c    | 2 +-
 sysdeps/mach/hurd/ttyname_r.c  | 2 +-
 11 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/hurd/hurd/lookup.h b/hurd/hurd/lookup.h
index f2ff0a1537..45f365f8d3 100644
--- a/hurd/hurd/lookup.h
+++ b/hurd/hurd/lookup.h
@@ -138,7 +138,7 @@ error_t __hurd_file_name_lookup_retry (error_t 
(*use_init_port)
                                          string_t retry_name,
                                          mach_port_t *result),
                                       enum retry_type doretry,
-                                      char retryname[1024],
+                                      string_t retryname,
                                       int flags, mode_t mode,
                                       file_t *result);
 error_t hurd_file_name_lookup_retry (error_t (*use_init_port)
@@ -152,7 +152,7 @@ error_t hurd_file_name_lookup_retry (error_t 
(*use_init_port)
                                        string_t retry_name,
                                        mach_port_t *result),
                                     enum retry_type doretry,
-                                    char retryname[1024],
+                                    string_t retryname,
                                     int flags, mode_t mode,
                                     file_t *result);
 
diff --git a/hurd/hurdlookup.c b/hurd/hurdlookup.c
index 994d557ff7..f27bf3af6d 100644
--- a/hurd/hurdlookup.c
+++ b/hurd/hurdlookup.c
@@ -51,7 +51,7 @@ __hurd_file_name_lookup (error_t (*use_init_port)
 {
   error_t err;
   enum retry_type doretry;
-  char retryname[1024];                /* XXX string_t LOSES! */
+  string_t retryname;
   int startport;
 
   error_t lookup_op (mach_port_t startdir)
diff --git a/hurd/lookup-at.c b/hurd/lookup-at.c
index c2a1139dea..064b1ba4c6 100644
--- a/hurd/lookup-at.c
+++ b/hurd/lookup-at.c
@@ -40,7 +40,7 @@ __file_name_lookup_at (int fd, int at_flags,
   if (empty != 0 && file_name[0] == '\0')
     {
       enum retry_type doretry;
-      char retryname[1024];    /* XXX string_t LOSES! */
+      string_t retryname;
 
       err = HURD_DPORT_USE (fd, __dir_lookup (port, "", flags, mode,
                                              &doretry, retryname,
diff --git a/hurd/lookup-retry.c b/hurd/lookup-retry.c
index 3a9ad70f5d..6b94a10eae 100644
--- a/hurd/lookup-retry.c
+++ b/hurd/lookup-retry.c
@@ -53,7 +53,7 @@ __hurd_file_name_lookup_retry (error_t (*use_init_port)
                                  retry_type *do_retry, string_t retry_name,
                                  mach_port_t *result),
                               enum retry_type doretry,
-                              char retryname[1024],
+                              string_t retryname,
                               int flags, mode_t mode,
                               file_t *result)
 {
diff --git a/sysdeps/mach/hurd/bind.c b/sysdeps/mach/hurd/bind.c
index bb408afcf6..cdcdd305ad 100644
--- a/sysdeps/mach/hurd/bind.c
+++ b/sysdeps/mach/hurd/bind.c
@@ -66,7 +66,7 @@ __bind  (int fd, __CONST_SOCKADDR_ARG addrarg, socklen_t len)
          if (! err)
            {
              enum retry_type doretry;
-             char retryname[1024];
+             string_t retryname;
              /* Get a port to the ifsock translator.  */
              err = __dir_lookup (node, "", 0, 0, &doretry, retryname, &ifsock);
              if (! err && (doretry != FS_RETRY_NORMAL || retryname[0] != '\0'))
diff --git a/sysdeps/mach/hurd/dl-sysdep.c b/sysdeps/mach/hurd/dl-sysdep.c
index 0ddb220a4e..173499c4c1 100644
--- a/sysdeps/mach/hurd/dl-sysdep.c
+++ b/sysdeps/mach/hurd/dl-sysdep.c
@@ -267,7 +267,7 @@ open_file (const char *file_name, int flags,
           mach_port_t *port, struct stat64 *stat)
 {
   enum retry_type doretry;
-  char retryname[1024];                /* XXX string_t LOSES! */
+  string_t retryname;
   file_t startdir;
   error_t err;
 
diff --git a/sysdeps/mach/hurd/fexecve.c b/sysdeps/mach/hurd/fexecve.c
index 906cd86be4..cd3bd2b269 100644
--- a/sysdeps/mach/hurd/fexecve.c
+++ b/sysdeps/mach/hurd/fexecve.c
@@ -28,7 +28,7 @@ fexecve (int fd, char *const argv[], char *const envp[])
   file_t file;
   error_t err;
   enum retry_type doretry;
-  char retryname[1024];
+  string_t retryname;
 
   err = HURD_DPORT_USE (fd,
       __dir_lookup (port, "", O_EXEC, 0, &doretry, retryname, &file));
diff --git a/sysdeps/mach/hurd/getlogin.c b/sysdeps/mach/hurd/getlogin.c
index b3427b0fc0..d73c034373 100644
--- a/sysdeps/mach/hurd/getlogin.c
+++ b/sysdeps/mach/hurd/getlogin.c
@@ -25,7 +25,7 @@
 char *
 getlogin (void)
 {
-  static char login[1024];     /* XXX */
+  static string_t login;
   error_t err;
 
   if (err = __USEPORT (PROC, __proc_getlogin (port, login)))
diff --git a/sysdeps/mach/hurd/readlinkat.c b/sysdeps/mach/hurd/readlinkat.c
index e56764de54..dbbc528ffb 100644
--- a/sysdeps/mach/hurd/readlinkat.c
+++ b/sysdeps/mach/hurd/readlinkat.c
@@ -32,7 +32,7 @@ __readlinkat (int fd, const char *file_name, char *buf, 
size_t len)
   file_t file_stat;
   struct stat64 st;
   enum retry_type doretry;
-  char retryname[1024];
+  string_t retryname;
   file_t file;
   char *rbuf = buf;
   mach_msg_type_number_t nread = len;
diff --git a/sysdeps/mach/hurd/ttyname.c b/sysdeps/mach/hurd/ttyname.c
index 62c3bf7615..1353fe8e1d 100644
--- a/sysdeps/mach/hurd/ttyname.c
+++ b/sysdeps/mach/hurd/ttyname.c
@@ -27,7 +27,7 @@ char *
 ttyname (int fd)
 {
   error_t err;
-  static char nodename[1024];  /* XXX */
+  static string_t nodename;
 
   if (err = HURD_DPORT_USE (fd, __term_get_nodename (port, nodename)))
     {
diff --git a/sysdeps/mach/hurd/ttyname_r.c b/sysdeps/mach/hurd/ttyname_r.c
index f0e3f65dbe..836ec6aca2 100644
--- a/sysdeps/mach/hurd/ttyname_r.c
+++ b/sysdeps/mach/hurd/ttyname_r.c
@@ -28,7 +28,7 @@ int
 __ttyname_r (int fd, char *buf, size_t buflen)
 {
   error_t err;
-  char nodename[1024]; /* XXX */
+  string_t nodename;
   size_t len;
 
   if (err = HURD_DPORT_USE (fd, __term_get_nodename (port, nodename)))
-- 
2.47.2


Reply via email to