Print this page
5910 libnisdb won't build with modern GCC


   2  * CDDL HEADER START
   3  *
   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License, Version 1.0 only
   6  * (the "License").  You may not use this file except in compliance
   7  * with the License.
   8  *
   9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  10  * or http://www.opensolaris.org/os/licensing.
  11  * See the License for the specific language governing permissions
  12  * and limitations under the License.
  13  *
  14  * When distributing Covered Code, include this CDDL HEADER in each
  15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  16  * If applicable, add the following below this CDDL HEADER, with the
  17  * fields enclosed by brackets "[]" replaced with your own identifying
  18  * information: Portions Copyright [yyyy] [name of copyright owner]
  19  *
  20  * CDDL HEADER END
  21  */

  22 /*




  23  * This is a non-recursive version of XDR routine used for db_index_entry
  24  * type.
  25  */
  26 
  27 #pragma ident   "%Z%%M% %I%     %E% SMI"
  28 
  29 #include <sys/types.h>
  30 #include <sys/syslog.h>
  31 #include <stdio.h>
  32 #include <rpc/types.h>
  33 #include <rpc/xdr.h>
  34 #include <memory.h>
  35 #include "db_index_entry_c.h"
  36 #include "db_table_c.h"

  37 
  38 bool_t
  39 xdr_db_index_entry(xdrs, objp)
  40         register XDR *xdrs;
  41         db_index_entry *objp;
  42 {
  43         bool_t  more_data;
  44         register db_index_entry *ep = objp;
  45         register db_index_entry *loc;
  46         register db_index_entry *freeptr = NULL;
  47 
  48         for (;;) {
  49                 if (!xdr_u_long(xdrs, &ep->hashval))
  50                         return (FALSE);
  51                 if (!xdr_pointer(xdrs, (char **)&ep->key, sizeof (item),
  52                         (xdrproc_t) xdr_item))
  53                         return (FALSE);
  54                 if (!xdr_entryp(xdrs, &ep->location))
  55                         return (FALSE);
  56                 if (!xdr_nullptr(xdrs, &ep->next_result))




   2  * CDDL HEADER START
   3  *
   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License, Version 1.0 only
   6  * (the "License").  You may not use this file except in compliance
   7  * with the License.
   8  *
   9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  10  * or http://www.opensolaris.org/os/licensing.
  11  * See the License for the specific language governing permissions
  12  * and limitations under the License.
  13  *
  14  * When distributing Covered Code, include this CDDL HEADER in each
  15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  16  * If applicable, add the following below this CDDL HEADER, with the
  17  * fields enclosed by brackets "[]" replaced with your own identifying
  18  * information: Portions Copyright [yyyy] [name of copyright owner]
  19  *
  20  * CDDL HEADER END
  21  */
  22 
  23 /*
  24  * Copyright 2015 Gary Mills
  25  */
  26 
  27 /*
  28  * This is a non-recursive version of XDR routine used for db_index_entry
  29  * type.
  30  */
  31 


  32 #include <sys/types.h>
  33 #include <sys/syslog.h>
  34 #include <stdio.h>
  35 #include <rpc/types.h>
  36 #include <rpc/xdr.h>
  37 #include <memory.h>
  38 #include "db_index_entry_c.h"
  39 #include "db_table_c.h"
  40 #include "xdr_nullptr.h"
  41 
  42 bool_t
  43 xdr_db_index_entry(xdrs, objp)
  44         register XDR *xdrs;
  45         db_index_entry *objp;
  46 {
  47         bool_t  more_data;
  48         register db_index_entry *ep = objp;
  49         register db_index_entry *loc;
  50         register db_index_entry *freeptr = NULL;
  51 
  52         for (;;) {
  53                 if (!xdr_u_long(xdrs, &ep->hashval))
  54                         return (FALSE);
  55                 if (!xdr_pointer(xdrs, (char **)&ep->key, sizeof (item),
  56                         (xdrproc_t) xdr_item))
  57                         return (FALSE);
  58                 if (!xdr_entryp(xdrs, &ep->location))
  59                         return (FALSE);
  60                 if (!xdr_nullptr(xdrs, &ep->next_result))