* minor new ports: i386-pc-linux-fc5.
authorErez Zadok <ezk@cs.sunysb.edu>
Tue, 21 Mar 2006 16:46:55 +0000 (16:46 +0000)
committerErez Zadok <ezk@cs.sunysb.edu>
Tue, 21 Mar 2006 16:46:55 +0000 (16:46 +0000)
* amd/info_ldap.c: as of Linux Fedora Core 5 (which comes with
openldap-2.3.9), the ldap.h headers deprecate several functions
used in this file, such as ldap_unbind.  You get compile errors
about missing extern definitions.  Those externs are still in
<ldap.h>, but surrounded by an ifdef LDAP_DEPRECATED.  I am
turning on that ifdef at the top of info_ldap.c, under the
assumption that the functions may be deprecated, but they still
work for this (older?) version of the LDAP API.  It gets am-utils
to compile, but it is not clear if it will work perfectly.

* libamu/xdr_func.c (xdr_am_mountres3_ok), amq/amq_xdr.c
(xdr_amq_mount_tree, xdr_amq_mount_tree_p,
xdr_amq_mount_info_list, xdr_amq_mount_tree_list), amq/amq.c
(show_mti), amd/amq_subr.c (xdr_amq_setopt, xdr_amq_mount_subtree,
xdr_amq_mount_tree, xdr_amq_mount_tree_list, xdr_amq_mount_tree),
libamu/xdr_func.c (xdr_am_mountres3_ok): use casing magic to stop
GCC-4.1 from complaining about "dereferencing type-punned pointer
will break strict-aliasing rules" here (but not elsewhere).

.cvsignore
ChangeLog
NEWS
amd/amq_subr.c
amd/info_ldap.c
amq/amq.c
amq/amq_xdr.c
libamu/xdr_func.c

index 5c7826cbca00f737d6cfbbba85344008405f6bde..8940a9548361384993350788f499146970e0ddfb 100644 (file)
@@ -163,3 +163,4 @@ A.i386-unknown-netbsdelf3.0
 A.i386-unknown-netbsdelf2.1
 A.i386-unknown-openbsd3.8
 A.powerpc-ibm-aix5.2.0.0-cc
+A.i386-pc-linux-fc5
index 975f5ce6882cd3c78f5c01dd3c3a4b2e376ba266..9f521f607eb715975523143fbd325b7021e7c817 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,26 @@
+2006-03-21  Erez Zadok  <ezk@cs.sunysb.edu>
+
+       * minor new ports: i386-pc-linux-fc5.
+
+       * amd/info_ldap.c: as of Linux Fedora Core 5 (which comes with
+       openldap-2.3.9), the ldap.h headers deprecate several functions
+       used in this file, such as ldap_unbind.  You get compile errors
+       about missing extern definitions.  Those externs are still in
+       <ldap.h>, but surrounded by an ifdef LDAP_DEPRECATED.  I am
+       turning on that ifdef at the top of info_ldap.c, under the
+       assumption that the functions may be deprecated, but they still
+       work for this (older?) version of the LDAP API.  It gets am-utils
+       to compile, but it is not clear if it will work perfectly.
+
+       * libamu/xdr_func.c (xdr_am_mountres3_ok), amq/amq_xdr.c
+       (xdr_amq_mount_tree, xdr_amq_mount_tree_p,
+       xdr_amq_mount_info_list, xdr_amq_mount_tree_list), amq/amq.c
+       (show_mti), amd/amq_subr.c (xdr_amq_setopt, xdr_amq_mount_subtree,
+       xdr_amq_mount_tree, xdr_amq_mount_tree_list, xdr_amq_mount_tree),
+       libamu/xdr_func.c (xdr_am_mountres3_ok): use casing magic to stop
+       GCC-4.1 from complaining about "dereferencing type-punned pointer
+       will break strict-aliasing rules" here (but not elsewhere).
+
 2006-03-20  Christos Zoulas  <christos@zoulas.com>
 
        * libamu/wire.c: avoid potential dereferencing of a NULL pointer
diff --git a/NEWS b/NEWS
index 963b42b75ef1537dcea79427564ddd552e4d2af7..021cae60ef0b7c21ddb4047b064281fb715c58c6 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,7 @@ Support new mount options for type:=pcfs mounts: longname, nowin95,
 shortname, user=N, group=N, mask=N, and dirmask=N.
 
 - minor new ports:
+       i386-pc-linux-fc5 (Fedora Core 5)
        i386-unknown-freebsd6.0 (RELEASE)
        i386-unknown-netbsdelf2.1
        i386-unknown-netbsdelf3.0 (RELEASE)
index 2244ce8dfb22751a1375d3e034c8c3e914ebf353..79ecafc3d9b35ba3b223dcec1b657772a0e987f7 100644 (file)
@@ -258,7 +258,7 @@ amqproc_pawd_1_svc(voidp argp, struct svc_req *rqstp)
 bool_t
 xdr_amq_setopt(XDR *xdrs, amq_setopt *objp)
 {
-  if (!xdr_enum(xdrs, (enum_t *) & objp->as_opt)) {
+  if (!xdr_enum(xdrs, (enum_t *) ((voidp) &objp->as_opt))) {
     return (FALSE);
   }
   if (!xdr_string(xdrs, &objp->as_str, AMQ_STRLEN)) {
@@ -323,10 +323,16 @@ xdr_amq_mount_subtree(XDR *xdrs, amq_mount_tree *objp)
   if (!xdr_amq_mount_tree_node(xdrs, objp)) {
     return (FALSE);
   }
-  if (!xdr_pointer(xdrs, (char **) &mp->am_osib, sizeof(amq_mount_tree), (XDRPROC_T_TYPE) xdr_amq_mount_subtree)) {
+  if (!xdr_pointer(xdrs,
+                  (char **) ((voidp) &mp->am_osib),
+                  sizeof(amq_mount_tree),
+                  (XDRPROC_T_TYPE) xdr_amq_mount_subtree)) {
     return (FALSE);
   }
-  if (!xdr_pointer(xdrs, (char **) &mp->am_child, sizeof(amq_mount_tree), (XDRPROC_T_TYPE) xdr_amq_mount_subtree)) {
+  if (!xdr_pointer(xdrs,
+                  (char **) ((voidp) &mp->am_child),
+                  sizeof(amq_mount_tree),
+                  (XDRPROC_T_TYPE) xdr_amq_mount_subtree)) {
     return (FALSE);
   }
   return (TRUE);
@@ -342,10 +348,16 @@ xdr_amq_mount_tree(XDR *xdrs, amq_mount_tree *objp)
   if (!xdr_amq_mount_tree_node(xdrs, objp)) {
     return (FALSE);
   }
-  if (!xdr_pointer(xdrs, (char **) ((void *)&mnil), sizeof(amq_mount_tree), (XDRPROC_T_TYPE) xdr_amq_mount_subtree)) {
+  if (!xdr_pointer(xdrs,
+                  (char **) ((voidp) &mnil),
+                  sizeof(amq_mount_tree),
+                  (XDRPROC_T_TYPE) xdr_amq_mount_subtree)) {
     return (FALSE);
   }
-  if (!xdr_pointer(xdrs, (char **) &mp->am_child, sizeof(amq_mount_tree), (XDRPROC_T_TYPE) xdr_amq_mount_subtree)) {
+  if (!xdr_pointer(xdrs,
+                  (char **) ((voidp) &mp->am_child),
+                  sizeof(amq_mount_tree),
+                  (XDRPROC_T_TYPE) xdr_amq_mount_subtree)) {
     return (FALSE);
   }
   return (TRUE);
@@ -389,7 +401,7 @@ bool_t
 xdr_amq_mount_tree_list(XDR *xdrs, amq_mount_tree_list *objp)
 {
   if (!xdr_array(xdrs,
-                (char **) &objp->amq_mount_tree_list_val,
+                (char **) ((voidp) &objp->amq_mount_tree_list_val),
                 (u_int *) &objp->amq_mount_tree_list_len,
                 ~0,
                 sizeof(amq_mount_tree_p),
index 6abe1790da8918438874f1f9cfb6f086f04660f2..f36908c28e900713d1397c50a08cf07785c9744a 100644 (file)
  * LDAP Home Page: http://www.umich.edu/~rsug/ldap/
  */
 
+/*
+ * WARNING: as of Linux Fedora Core 5 (which comes with openldap-2.3.9), the
+ * ldap.h headers deprecate several functions used in this file, such as
+ * ldap_unbind.  You get compile errors about missing extern definitions.
+ * Those externs are still in <ldap.h>, but surrounded by an ifdef
+ * LDAP_DEPRECATED.  I am turning on that ifdef here, under the assumption
+ * that the functions may be deprecated, but they still work for this
+ * (older?) version of the LDAP API.  It gets am-utils to compile, but it is
+ * not clear if it will work perfectly.
+ */
+#ifndef LDAP_DEPRECATED
+# define LDAP_DEPRECATED 1
+#endif /* not LDAP_DEPRECATED */
+
 #ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif /* HAVE_CONFIG_H */
index 57cecfb050503b383ff07656a1c3240371c50090..6f65cdcb8434d785038bd6a0d198b5a36a146771 100644 (file)
--- a/amq/amq.c
+++ b/amq/amq.c
@@ -101,7 +101,7 @@ show_mti(amq_mount_tree *mt, enum show_opt e, int *mwid, int *dwid, int *twid)
 
   case Full:
     {
-      struct tm *tp = localtime((time_t *) &mt->mt_mounttime);
+      struct tm *tp = localtime((time_t *) ((voidp) &mt->mt_mounttime));
       printf("%-*.*s %-*.*s %-*.*s %s\n\t%-5d %-7d %-6d %-7d %-7d %-6d %02d/%02d/%04d %02d:%02d:%02d\n",
             *dwid, *dwid,
             *mt->mt_directory ? mt->mt_directory : "/",        /* XXX */
@@ -126,7 +126,7 @@ show_mti(amq_mount_tree *mt, enum show_opt e, int *mwid, int *dwid, int *twid)
 
   case Stats:
     {
-      struct tm *tp = localtime((time_t *) &mt->mt_mounttime);
+      struct tm *tp = localtime((time_t *) ((voidp) &mt->mt_mounttime));
       printf("%-*.*s %-5d %-7d %-6d %-7d %-7d %-6d %02d/%02d/%02d %02d:%02d:%04d\n",
             *dwid, *dwid,
             *mt->mt_directory ? mt->mt_directory : "/",        /* XXX */
index 359d31f047eb1cefca7b6cbe01d908624f081075..692a0a4086079cf7e9819c631d5f568b21b36a29 100644 (file)
@@ -106,11 +106,17 @@ xdr_amq_mount_tree(XDR *xdrs, amq_mount_tree *objp)
     return (FALSE);
   }
 
-  if (!xdr_pointer(xdrs, (char **) &objp->mt_next, sizeof(amq_mount_tree), (XDRPROC_T_TYPE) xdr_amq_mount_tree)) {
+  if (!xdr_pointer(xdrs,
+                  (char **) ((voidp) &objp->mt_next),
+                  sizeof(amq_mount_tree),
+                  (XDRPROC_T_TYPE) xdr_amq_mount_tree)) {
     return (FALSE);
   }
 
-  if (!xdr_pointer(xdrs, (char **) &objp->mt_child, sizeof(amq_mount_tree), (XDRPROC_T_TYPE) xdr_amq_mount_tree)) {
+  if (!xdr_pointer(xdrs,
+                  (char **) ((voidp) &objp->mt_child),
+                  sizeof(amq_mount_tree),
+                  (XDRPROC_T_TYPE) xdr_amq_mount_tree)) {
     return (FALSE);
   }
 
@@ -121,7 +127,10 @@ xdr_amq_mount_tree(XDR *xdrs, amq_mount_tree *objp)
 bool_t
 xdr_amq_mount_tree_p(XDR *xdrs, amq_mount_tree_p *objp)
 {
-  if (!xdr_pointer(xdrs, (char **) objp, sizeof(amq_mount_tree), (XDRPROC_T_TYPE) xdr_amq_mount_tree)) {
+  if (!xdr_pointer(xdrs,
+                  (char **) objp,
+                  sizeof(amq_mount_tree),
+                  (XDRPROC_T_TYPE) xdr_amq_mount_tree)) {
     return (FALSE);
   }
   return (TRUE);
@@ -168,7 +177,7 @@ bool_t
 xdr_amq_mount_info_list(XDR *xdrs, amq_mount_info_list *objp)
 {
   if (!xdr_array(xdrs,
-                (char **) &objp->amq_mount_info_list_val,
+                (char **) ((voidp) &objp->amq_mount_info_list_val),
                 (u_int *) &objp->amq_mount_info_list_len,
                 ~0,
                 sizeof(amq_mount_info),
@@ -183,7 +192,7 @@ bool_t
 xdr_amq_mount_tree_list(XDR *xdrs, amq_mount_tree_list *objp)
 {
   if (!xdr_array(xdrs,
-                (char **) &objp->amq_mount_tree_list_val,
+                (char **) ((voidp) &objp->amq_mount_tree_list_val),
                 (u_int *) &objp->amq_mount_tree_list_len,
                 ~0,
                 sizeof(amq_mount_tree_p),
index 34d4c328edbdf9793771fb0e2086734e9b0be1fc..d29c4c7f58652e122f49ed7b4188919fe9876470 100644 (file)
@@ -942,11 +942,11 @@ xdr_am_mountres3_ok(XDR *xdrs, am_mountres3_ok *objp)
   if (!xdr_am_fhandle3(xdrs, &objp->fhandle))
     return (FALSE);
   if (!xdr_array(xdrs,
-                (char **)&objp->auth_flavors.auth_flavors_val,
+                (char **) ((voidp) &objp->auth_flavors.auth_flavors_val),
                 (u_int *) &objp->auth_flavors.auth_flavors_len,
                 ~0,
                 sizeof(int),
-                (xdrproc_t) xdr_int))
+                (XDRPROC_T_TYPE) xdr_int))
     return (FALSE);
   return (TRUE);
 }