* libamu/misc_rpc.c (make_rpc_packet): fix make_rpc_packet() on
authorIon Badulescu <ib42@cs.columbia.edu>
Sat, 28 Dec 2002 23:28:38 +0000 (23:28 +0000)
committerIon Badulescu <ib42@cs.columbia.edu>
Sat, 28 Dec 2002 23:28:38 +0000 (23:28 +0000)
64-bit big-endian platforms, bug report from Bill Fenner
<fenner@research.att.com>

ChangeLog
NEWS
libamu/misc_rpc.c

index 2cd992c8fb498918e3e3a9baab1b15ed593ecc6a..ff3b41354762075843b7dde71272dfa26bac34b5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2002-12-28  Ion Badulescu  <ionut@moisil.badula.org>
 
+       * libamu/misc_rpc.c (make_rpc_packet): fix make_rpc_packet() on
+       64-bit big-endian platforms, bug report from Bill Fenner
+       <fenner@research.att.com>
+
        * configure.in: increase library patchlevel
 
        * libamu/xutil.c (amu_release_controlling_tty): close and reopen
diff --git a/NEWS b/NEWS
index 77e990a640ad003e5c9e7ca7e5caee447f663a93..a02e651688be358b113e63dba0fcd1576be5b103 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,13 @@
 - Minor new ports:
        sparc-sun-solaris2.9
 
+- bugs fixed:
+
+       * handle std{in,out,err} correctly when releasing controlling tty
+         (for real this time)
+       * don't cast pointers between enum_t and u_long, it doesn't work on
+         64-bit big-endian platforms
+
 *** Notes specific to am-utils version 6.0.8:
 
 - Minor new ports:
index 7a3b6fc48cd7fc2365f54346a01267acb785d569..f08190d0159d9ce8436c694842b2d85aa70a4c56 100644 (file)
@@ -38,7 +38,7 @@
  *
  *      %W% (Berkeley) %G%
  *
- * $Id: misc_rpc.c,v 1.4.2.3 2002/12/27 22:45:12 ezk Exp $
+ * $Id: misc_rpc.c,v 1.4.2.4 2002/12/28 23:28:40 ib42 Exp $
  *
  */
 
@@ -127,6 +127,7 @@ make_rpc_packet(char *buf, int buflen, u_long proc, struct rpc_msg *mp, voidp ar
 {
   XDR msg_xdr;
   int len;
+  enum_t local_proc = (enum_t) proc;
 
   xdrmem_create(&msg_xdr, buf, buflen, XDR_ENCODE);
 
@@ -139,7 +140,7 @@ make_rpc_packet(char *buf, int buflen, u_long proc, struct rpc_msg *mp, voidp ar
   /*
    * Called procedure number
    */
-  if (!xdr_enum(&msg_xdr, (enum_t *) & proc))
+  if (!xdr_enum(&msg_xdr, &local_proc))
     return -EIO;
 
   /*