]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - sunrpc/pm_getmaps.c
Update copyright dates with scripts/update-copyrights.
[thirdparty/glibc.git] / sunrpc / pm_getmaps.c
index 983b2bae8aa261ccfa44e8a19dc529c62891a668..6f7ad10ef6ff68a01732014e0bd345c245fedcce 100644 (file)
@@ -3,7 +3,7 @@
  * Client interface to pmap rpc service.
  * contains pmap_getmaps, which is only tcp service involved
  *
- * Copyright (C) 1984, 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
@@ -15,7 +15,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.
  *
@@ -43,6 +43,7 @@
 #include <errno.h>
 #include <libintl.h>
 #include <unistd.h>
+#include <not-cancel.h>
 
 
 /*
@@ -66,12 +67,11 @@ pmap_getmaps (struct sockaddr_in *address)
   if (socket != -1)
     closeit = true;
 
-  client = INTUSE(clnttcp_create) (address, PMAPPROG,
-                                  PMAPVERS, &socket, 50, 500);
+  client = clnttcp_create (address, PMAPPROG, PMAPVERS, &socket, 50, 500);
   if (client != (CLIENT *) NULL)
     {
-      if (CLNT_CALL (client, PMAPPROC_DUMP, (xdrproc_t)INTUSE(xdr_void), NULL,
-                    (xdrproc_t)INTUSE(xdr_pmaplist), (caddr_t)&head,
+      if (CLNT_CALL (client, PMAPPROC_DUMP, (xdrproc_t)xdr_void, NULL,
+                    (xdrproc_t)xdr_pmaplist, (caddr_t)&head,
                     minutetimeout) != RPC_SUCCESS)
        {
          clnt_perror (client, _("pmap_getmaps.c: rpc problem"));
@@ -80,7 +80,8 @@ pmap_getmaps (struct sockaddr_in *address)
     }
   /* We only need to close the socket here if we opened  it.  */
   if (closeit)
-    (void) __close (socket);
+    close_not_cancel (socket);
   address->sin_port = 0;
   return head;
 }
+libc_hidden_nolink_sunrpc (pmap_getmaps, GLIBC_2_0)