Loading...
--- Libc/Libc-320/net/FreeBSD/send.c
+++ Libc/Libc-825.26/net/FreeBSD/send.c
@@ -10,10 +10,6 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
@@ -35,7 +31,7 @@
static char sccsid[] = "@(#)send.c 8.2 (Berkeley) 2/21/94";
#endif /* LIBC_SCCS and not lint */
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/net/send.c,v 1.3 2002/03/22 21:52:30 obrien Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/net/send.c,v 1.4 2007/01/09 00:28:02 imp Exp $");
#include "namespace.h"
#include <sys/types.h>
@@ -44,11 +40,21 @@
#include <stddef.h>
#include "un-namespace.h"
+#ifdef VARIANT_CANCELABLE
+ssize_t __sendto(int, const void *, size_t, int, const struct sockaddr *, socklen_t);
+#else /* !VARIANT_CANCELABLE */
+ssize_t __sendto_nocancel(int, const void *, size_t, int, const struct sockaddr *, socklen_t);
+#endif /* VARIANT_CANCELABLE */
+
ssize_t
send(s, msg, len, flags)
int s, flags;
size_t len;
const void *msg;
{
- return (_sendto(s, msg, len, flags, NULL, 0));
+#ifdef VARIANT_CANCELABLE
+ return (__sendto(s, msg, len, flags, NULL, 0));
+#else /* !VARIANT_CANCELABLE */
+ return (__sendto_nocancel(s, msg, len, flags, NULL, 0));
+#endif /* VARIANT_CANCELABLE */
}