commit-inetutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU Inetutils branch, master, updated. inetutils-1_9_1-251-gbaf8f


From: Mats Erik Andersson
Subject: [SCM] GNU Inetutils branch, master, updated. inetutils-1_9_1-251-gbaf8f5d
Date: Sat, 09 Mar 2013 00:18:59 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Inetutils ".

The branch, master has been updated
       via  baf8f5de12986c0d943ce012ea0b7e9e6d4c1940 (commit)
      from  4a5da0cab332f9ba3e7df5ef5d34916a465edbec (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=baf8f5de12986c0d943ce012ea0b7e9e6d4c1940


commit baf8f5de12986c0d943ce012ea0b7e9e6d4c1940
Author: Mats Erik Andersson <address@hidden>
Date:   Sat Mar 9 00:20:08 2013 +0100

    rcp: Portability fixes.

diff --git a/ChangeLog b/ChangeLog
index ddaf0f7..cab6285 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2013-03-09  Mats Erik Andersson  <address@hidden>
+
+       rcp: Portability fixes.
+
+       * src/rcp.c: Include <stdint.h>.
+       (options): Make argument to `-d' optional, since
+       the remote server need that form of invocation.
+       (source): Use format "%jd" and cast as intmax_t
+       to work around buggy library modes, which otherwise
+       are missing the last string argument.
+
 2013-03-08  Mats Erik Andersson  <address@hidden>
 
        * bootstrap: Updated from gnulib.
diff --git a/src/rcp.c b/src/rcp.c
index 832dd45..37fb8e6 100644
--- a/src/rcp.c
+++ b/src/rcp.c
@@ -75,6 +75,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdarg.h>
+#include <stdint.h>            /* intmax_t */
 #include <string.h>
 #include <string.h>
 #include <unistd.h>
@@ -162,7 +163,7 @@ static struct argp_option options[] = {
     "attempt to preserve (duplicate) in its copies the"
     " modification times and modes of the source files",
     GRID+1 },
-  { "target-directory", 'd', "DIRECTORY", 0,
+  { "target-directory", 'd', "DIRECTORY", OPTION_ARG_OPTIONAL,
     "copy all SOURCE arguments into DIRECTORY",
     GRID+1 },
   { "from", 'f', NULL, 0,
@@ -741,11 +742,8 @@ source (int argc, char *argv[])
            goto next;
        }
 #define RCP_MODEMASK   (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)
-      snprintf (buf, sizeof buf,
-               (sizeof (stb.st_size) > sizeof (long)
-                ? "C%04o %zd %s\n"
-                : "C%04o %ld %s\n"),
-               stb.st_mode & RCP_MODEMASK, stb.st_size, last);
+      snprintf (buf, sizeof buf, "C%04o %jd %s\n",
+               stb.st_mode & RCP_MODEMASK, (intmax_t) stb.st_size, last);
       write (rem, buf, strlen (buf));
       if (response () < 0)
        goto next;

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog |   11 +++++++++++
 src/rcp.c |   10 ++++------
 2 files changed, 15 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]