]> err.no Git - moreutils/commitdiff
* ifdata: patch from its author to make it behave properly on big endian
authorjoeyh <joeyh>
Sat, 25 Mar 2006 01:51:39 +0000 (01:51 +0000)
committerjoeyh <joeyh>
Sat, 25 Mar 2006 01:51:39 +0000 (01:51 +0000)
  systems. Closes: #358860

debian/changelog
ifdata.c
pee.1

index b00e67dcfb68125753a06075a3cb9e5b6f1fd034..bb4580ece8c40678b6e3d9da268b69f704b87ebd 100644 (file)
@@ -2,6 +2,8 @@ moreutils (0.8) UNRELEASED; urgency=low
 
   * Back to Mithandir's C sponge, now fixed.
   * tss.1, ifdata.1: typo fix. Closes: #358557, #358556
+  * ifdata: patch from its author to make it behave properly on big endian
+    systems. Closes: #358860
 
  -- Joey Hess <joeyh@debian.org>  Thu, 23 Mar 2006 03:45:30 -0500
 
index 1f1eb2afaa5e5ba1b057731e9df1b4237313c0e8..92b68a64730957d10a5ef7dd5b259c801e61fd53 100644 (file)
--- a/ifdata.c
+++ b/ifdata.c
@@ -64,11 +64,19 @@ struct if_stat {
 
 
 void print_quad_ipv4(unsigned int i) {
+#if      __BYTE_ORDER == __LITTLE_ENDIAN
        printf("%d.%d.%d.%d",
                        i&0xff,
                        (i&0xff00)>>8,
                        (i&0xff0000)>>16,
                        (i&0xff000000)>>24);
+#else
+       printf("%d.%d.%d.%d",
+                       (i&0xff000000)>>24,
+                       (i&0xff0000)>>16,
+                       (i&0xff00)>>8,
+                       i&0xff);
+#endif
 }
 
 void print_quad_ipv6(uint16_t *a) {
diff --git a/pee.1 b/pee.1
index 019488fc95332f2b9de796c0e247849c5fe8067d..b0faebf02c075980f2f4b73ac83060256072ca71 100644 (file)
--- a/pee.1
+++ b/pee.1
@@ -5,7 +5,8 @@ pee \- tee standard input to pipes
 \fBpee\fR [\fB"command"\fR\&...]
 .SH DESCRIPTION
 pee is like tee
-but for pipes. Each command is run and standard input is
-copied into it, as well as being sent to stdout.
+but for pipes. Each command is run and fed a copy of the
+stadard input. The output of all commands is sent to
+stdout.
 .SH "SEE ALSO"
 \fBtee\fR(1)