FreeBSD Bugzilla – Attachment 145320 Details for
Bug 192295
net/dante fails to build on i386
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
test case #1
pipe.c (text/plain), 893 bytes, created by
mp39590
on 2014-08-03 20:28:09 UTC
(
hide
)
Description:
test case #1
Filename:
MIME Type:
Creator:
mp39590
Created:
2014-08-03 20:28:09 UTC
Size:
893 bytes
patch
obsolete
>#include <sys/types.h> >#include <sys/socket.h> > >#include <assert.h> >#include <stdio.h> >#include <stdlib.h> >#include <string.h> >#include <unistd.h> >#include <fcntl.h> >#include <errno.h> > >#define PACKETSIZE (1024) > >int >main(void) >{ > size_t sent, packetcount, buflen; > ssize_t rc, i; > int sndbuf, sndbuf_set, rcvbuf, rcvbuf_set; > char buf[PACKETSIZE]; > int datapipev[2]; > > buflen = sizeof(buf); > > if (socketpair(AF_LOCAL, SOCK_DGRAM, 0, datapipev) != 0) { > perror("socketpair()"); > exit(1); > } > > sent = 0; > > while (1) { > if ((rc = write(datapipev[0], buf, buflen)) == -1) { > perror("write()"); > break; > } else { > printf("sent %zd\n", rc); > assert(rc == (ssize_t)buflen); > > ++i; > sent += rc; > printf("total: %zd\n-----------\n", sent); > } > } > > return (0); >} >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 192295
: 145320 |
146768