OSDN Git Service

make DODEBUG=y happy, update sysdeps/common/* copyright
[uclinux-h8/uClibc.git] / libc / inet / rpc / xdr_rec.c
index 7499554..76c9ba3 100644 (file)
 # include <wchar.h>
 # include <libio/iolibio.h>
 # define fputs(s, f) _IO_fputs (s, f)
+libc_hidden_proto(fwprintf)
 #endif
 
+libc_hidden_proto(memcpy)
+libc_hidden_proto(fputs)
+libc_hidden_proto(lseek)
+
 static bool_t xdrrec_getlong (XDR *, long *);
 static bool_t xdrrec_putlong (XDR *, const long *);
 static bool_t xdrrec_getbytes (XDR *, caddr_t, u_int);
@@ -142,8 +147,9 @@ static bool_t get_input_bytes (RECSTREAM *, caddr_t, int) internal_function;
  * write respectively.   They are like the system
  * calls expect that they take an opaque handle rather than an fd.
  */
-void attribute_hidden
-__xdrrec_create (XDR *xdrs, u_int sendsize,
+libc_hidden_proto(xdrrec_create)
+void
+xdrrec_create (XDR *xdrs, u_int sendsize,
               u_int recvsize, caddr_t tcp_handle,
               int (*readit) (char *, char *, int),
               int (*writeit) (char *, char *, int))
@@ -160,7 +166,7 @@ __xdrrec_create (XDR *xdrs, u_int sendsize,
     {
 #ifdef USE_IN_LIBIO
       if (_IO_fwide (stderr, 0) > 0)
-       (void) __fwprintf (stderr, L"%s", _("xdrrec_create: out of memory\n"));
+       (void) fwprintf (stderr, L"%s", _("xdrrec_create: out of memory\n"));
       else
 #endif
        (void) fputs (_("xdrrec_create: out of memory\n"), stderr);
@@ -204,7 +210,7 @@ __xdrrec_create (XDR *xdrs, u_int sendsize,
   rstrm->fbtbc = 0;
   rstrm->last_frag = TRUE;
 }
-strong_alias(__xdrrec_create,xdrrec_create)
+libc_hidden_def(xdrrec_create)
 
 
 /*
@@ -297,7 +303,7 @@ xdrrec_putbytes (XDR *xdrs, const char *addr, u_int len)
     {
       current = rstrm->out_boundry - rstrm->out_finger;
       current = (len < current) ? len : current;
-      __memcpy (rstrm->out_finger, addr, current);
+      memcpy (rstrm->out_finger, addr, current);
       rstrm->out_finger += current;
       addr += current;
       len -= current;
@@ -476,6 +482,7 @@ xdrrec_putint32 (XDR *xdrs, const int32_t *ip)
  * Before reading (deserializing from the stream, one should always call
  * this procedure to guarantee proper record alignment.
  */
+libc_hidden_proto(xdrrec_skiprecord)
 bool_t
 xdrrec_skiprecord (XDR *xdrs)
 {
@@ -492,12 +499,14 @@ xdrrec_skiprecord (XDR *xdrs)
   rstrm->last_frag = FALSE;
   return TRUE;
 }
+libc_hidden_def(xdrrec_skiprecord)
 
 /*
  * Lookahead function.
  * Returns TRUE iff there is no more input in the buffer
  * after consuming the rest of the current record.
  */
+libc_hidden_proto(xdrrec_eof)
 bool_t
 xdrrec_eof (XDR *xdrs)
 {
@@ -515,6 +524,7 @@ xdrrec_eof (XDR *xdrs)
     return TRUE;
   return FALSE;
 }
+libc_hidden_def(xdrrec_eof)
 
 /*
  * The client must tell the package when an end-of-record has occurred.
@@ -522,6 +532,7 @@ xdrrec_eof (XDR *xdrs)
  * (output) tcp stream.  (This lets the package support batched or
  * pipelined procedure calls.)  TRUE => immediate flush to tcp connection.
  */
+libc_hidden_proto(xdrrec_endofrecord)
 bool_t
 xdrrec_endofrecord (XDR *xdrs, bool_t sendnow)
 {
@@ -541,7 +552,7 @@ xdrrec_endofrecord (XDR *xdrs, bool_t sendnow)
   rstrm->out_finger += BYTES_PER_XDR_UNIT;
   return TRUE;
 }
-
+libc_hidden_def(xdrrec_endofrecord)
 
 /*
  * Internal useful routines
@@ -599,7 +610,7 @@ get_input_bytes (RECSTREAM *rstrm, caddr_t addr, int len)
          continue;
        }
       current = (len < current) ? len : current;
-      __memcpy (addr, rstrm->in_finger, current);
+      memcpy (addr, rstrm->in_finger, current);
       rstrm->in_finger += current;
       addr += current;
       len -= current;