Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-commits
Navigation:
Lists: gentoo-commits: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-commits@g.o
From: "Sven Wegener (swegener)" <swegener@g.o>
Subject: gentoo-x86 commit in app-shells/pdsh/files: pdsh-2.14-gcc-4.3-unistd.h.patch pdsh-2.14-glibc-2.8-ARG_MAX.patch
Date: Sun, 15 Jun 2008 18:52:28 +0000
swegener    08/06/15 18:52:28

  Added:                pdsh-2.14-gcc-4.3-unistd.h.patch
                        pdsh-2.14-glibc-2.8-ARG_MAX.patch
  Log:
  Add compability patches for gcc-4.3 and glibc-2.8.
  (Portage version: 2.1.5.5)

Revision  Changes    Path
1.1                  app-shells/pdsh/files/pdsh-2.14-gcc-4.3-unistd.h.patch

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-shells/pdsh/files/pdsh-2.14-gcc-4.3-unistd.h.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-shells/pdsh/files/pdsh-2.14-gcc-4.3-unistd.h.patch?rev=1.1&content-type=text/plain

Index: pdsh-2.14-gcc-4.3-unistd.h.patch
===================================================================
gcc-4.3 no longer includes this by default, needed to get the ssize_t type.

--- pdsh-2.14/src/modules/machines.c
+++ pdsh-2.14/src/modules/machines.c
@@ -28,6 +28,8 @@
 #  include "config.h"
 #endif
 
+#include <unistd.h>
+
 #include "src/pdsh/wcoll.h"
 #include "src/pdsh/mod.h"
 #include "src/common/hostlist.h"



1.1                  app-shells/pdsh/files/pdsh-2.14-glibc-2.8-ARG_MAX.patch

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-shells/pdsh/files/pdsh-2.14-glibc-2.8-ARG_MAX.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-shells/pdsh/files/pdsh-2.14-glibc-2.8-ARG_MAX.patch?rev=1.1&content-type=text/plain

Index: pdsh-2.14-glibc-2.8-ARG_MAX.patch
===================================================================
glibc-2.8 no longer provides the ARG_MAX macro.

--- pdsh-2.14/src/pdsh/xpopen.c
+++ pdsh-2.14/src/pdsh/xpopen.c
@@ -84,10 +84,17 @@
     struct pid *cur;
     int fds[2], read, fd;
     pid_t pid;
-    char *av[ARG_MAX + 1];
     int maxfd = sysconf(_SC_OPEN_MAX);
+    long arg_max;
+    char **av;
+
+    arg_max = sysconf(_SC_ARG_MAX);
+    if (arg_max < 0)
+        errx("%p: unable to get _SC_OPEN_MAX (%m)\n");
+
+    av = Malloc(sizeof(char *) * (arg_max + 1));
     
-    _parse_command_with_quotes(av, ARG_MAX, cmd);
+    _parse_command_with_quotes(av, arg_max, cmd);
 
     if ((*mode != 'r' && *mode != 'w') || mode[1] != '\0') {
         errno = EINVAL;
@@ -101,6 +106,7 @@
     if (pipe(fds) < 0) {
         close(fds[0]);
         close(fds[1]);
+        Free((void **) &av);
         Free((void **) &cur);
         errx("%p: unable to dup stdout\n");
     }
@@ -143,6 +149,8 @@
     cur->next = pidlist;
     pidlist = cur;
 
+    Free((void **) &av);
+
     return (cur->fp);
 
 }



-- 
gentoo-commits@g.o mailing list


Navigation:
Lists: gentoo-commits: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
gentoo-x86 commit in dev-libs/rlog: ChangeLog rlog-1.4.ebuild
Next by thread:
gentoo-x86 commit in sys-block/gparted/files: gparted-0.3.7-hal-lock.patch
Previous by date:
gentoo-x86 commit in app-shells/pdsh: pdsh-2.14.ebuild ChangeLog
Next by date:
gentoo-x86 commit in profiles: ChangeLog use.local.desc


Updated May 10, 2012

Summary: Archive of the gentoo-commits mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.