]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - sunrpc/xdr_ref.c
sunrpc: Improvements for UDP client timeout handling [BZ #20257]
[thirdparty/glibc.git] / sunrpc / xdr_ref.c
index e2acb84754702725e1515bf07cf4b4ba532da0c7..2b7ebc8e11ca4dab20877cbaec042666195c6f7f 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * xdr_reference.c, Generic XDR routines implementation.
  *
- * Copyright (C) 1987, Sun Microsystems, Inc.
+ * Copyright (c) 2010, Oracle America, Inc.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
@@ -13,7 +13,7 @@
  *       copyright notice, this list of conditions and the following
  *       disclaimer in the documentation and/or other materials
  *       provided with the distribution.
- *     * Neither the name of Sun Microsystems, Inc. nor the names of its
+ *     * Neither the name of the "Oracle America, Inc." nor the names of its
  *       contributors may be used to endorse or promote products derived
  *       from this software without specific prior written permission.
  *
 #include <rpc/types.h>
 #include <rpc/xdr.h>
 #include <libintl.h>
-
-#ifdef USE_IN_LIBIO
-# include <wchar.h>
-# include <libio/iolibio.h>
-#endif
+#include <wchar.h>
+#include <libio/iolibio.h>
 
 #define LASTUNSIGNED   ((u_int)0-1)
 
  * proc is the routine to handle the referenced structure.
  */
 bool_t
-xdr_reference (xdrs, pp, size, proc)
-     XDR *xdrs;
-     caddr_t *pp;              /* the pointer to work on */
-     u_int size;               /* size of the object pointed to */
-     xdrproc_t proc;           /* xdr routine to handle the object */
+xdr_reference (XDR *xdrs,
+              /* the pointer to work on */
+              caddr_t *pp,
+              /* size of the object pointed to */
+              u_int size,
+              /* xdr routine to handle the object */
+              xdrproc_t proc)
 {
   caddr_t loc = *pp;
   bool_t stat;
@@ -93,7 +92,7 @@ xdr_reference (xdrs, pp, size, proc)
     }
   return stat;
 }
-INTDEF(xdr_reference)
+libc_hidden_nolink_sunrpc (xdr_reference, GLIBC_2_0)
 
 
 /*
@@ -116,17 +115,13 @@ INTDEF(xdr_reference)
  *
  */
 bool_t
-xdr_pointer (xdrs, objpp, obj_size, xdr_obj)
-     XDR *xdrs;
-     char **objpp;
-     u_int obj_size;
-     xdrproc_t xdr_obj;
+xdr_pointer (XDR *xdrs, char **objpp, u_int obj_size, xdrproc_t xdr_obj)
 {
 
   bool_t more_data;
 
   more_data = (*objpp != NULL);
-  if (!INTUSE(xdr_bool) (xdrs, &more_data))
+  if (!xdr_bool (xdrs, &more_data))
     {
       return FALSE;
     }
@@ -135,5 +130,10 @@ xdr_pointer (xdrs, objpp, obj_size, xdr_obj)
       *objpp = NULL;
       return TRUE;
     }
-  return INTUSE(xdr_reference) (xdrs, objpp, obj_size, xdr_obj);
+  return xdr_reference (xdrs, objpp, obj_size, xdr_obj);
 }
+#ifdef EXPORT_RPC_SYMBOLS
+libc_hidden_def (xdr_pointer)
+#else
+libc_hidden_nolink_sunrpc (xdr_pointer, GLIBC_2_0)
+#endif