SecBSD's official ports repository

This commit is contained in:
purplerain 2023-08-16 22:26:55 +00:00
commit 2c0afcbbf3
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
64331 changed files with 5339189 additions and 0 deletions

22
devel/libio/Makefile Normal file
View file

@ -0,0 +1,22 @@
COMMENT= abstraction for general data transport
DISTNAME= libio-0.1
CATEGORIES= devel
MASTER_SITES= http://monkey.org/~provos/
HOMEPAGE= http://monkey.org/~provos/libio/
# BSD
PERMIT_PACKAGE= Yes
WRKDIST= ${WRKDIR}/libio
NO_TEST= Yes
CONFIGURE_STYLE=gnu
do-install:
${INSTALL_DATA} ${WRKSRC}/libio.a ${PREFIX}/lib
${INSTALL_DATA} ${WRKSRC}/io.h ${PREFIX}/include
.include <bsd.port.mk>

2
devel/libio/distinfo Normal file
View file

@ -0,0 +1,2 @@
SHA256 (libio-0.1.tar.gz) = nwVzIAQ9++MaZIaV2f3+aUFjJGT5/uUcRjJS1mNgeVg=
SIZE (libio-0.1.tar.gz) = 36574

View file

@ -0,0 +1,82 @@
--- io.c.orig Wed Mar 27 05:41:07 2002
+++ io.c Sat May 22 22:33:59 2010
@@ -102,7 +102,7 @@ io_detach_child(struct io_header *hparent, struct io_l
}
if (lparent == NULL)
- errx(1, __FUNCTION__": data corrupt");
+ errx(1, "%s: data corrupt", __FUNCTION__);
TAILQ_REMOVE(&hchild->ihdr_parent, lparent, il_next);
free(lparent);
@@ -121,7 +121,7 @@ io_detach_parent(struct io_list *lparent, struct io_he
}
if (lchild == NULL)
- errx(1, __FUNCTION__": data corrupt");
+ errx(1, "%s: data corrupt", __FUNCTION__);
TAILQ_REMOVE(&hparent->ihdr_queue, lchild, il_next);
free(lchild);
@@ -142,7 +142,7 @@ io_detach_hdr(struct io_header *parent, struct io_head
}
if (lchild == NULL)
- errx(1, __FUNCTION__": data corrupt");
+ errx(1, "%s: data corrupt", __FUNCTION__);
TAILQ_REMOVE(&parent->ihdr_queue, lchild, il_next);
free(lchild);
@@ -152,7 +152,7 @@ io_detach_hdr(struct io_header *parent, struct io_head
}
if (lparent == NULL)
- errx(1, __FUNCTION__": data corrupt");
+ errx(1, "%s: data corrupt", __FUNCTION__);
TAILQ_REMOVE(&child->ihdr_parent, lparent, il_next);
free(lparent);
}
@@ -311,7 +311,7 @@ io_buffer_extend(struct io_buffer *buf, size_t size)
p = realloc(buf->data, buf->off + size);
if (p == NULL) {
- warn(__FUNCTION__": realloc");
+ warn("%s: realloc", __FUNCTION__);
return (-1);
}
@@ -424,7 +424,7 @@ io_buffer_write(struct io_obj *obj, struct io_buffer *
filt = (struct io_filter *)obj;
if (obj->io_type != IOTYPE_FILTER || filt->io_filter == NULL)
- errx(1, __FUNCTION__": data corrupt: %p\n", obj);
+ errx(1, "%s: data corrupt: %p\n", __FUNCTION__, obj);
res = filt->io_filter(filt->io_state, filt, buf, 0);
switch (res) {
@@ -704,12 +704,12 @@ io_header_init(struct io_header *hdr, int type)
struct io_obj *
io_new_obj(int fd, int type,
- int (*method)(int, void *, size_t), size_t blocksize)
+ ssize_t (*method)(int, void *, size_t), size_t blocksize)
{
struct io_obj *obj;
if (type != IOTYPE_SOURCE && type != IOTYPE_SINK) {
- warnx(__FUNCTION__": bad type: %d", type);
+ warnx("%s: bad type: %d", type, __FUNCTION__);
return (NULL);
}
@@ -759,8 +759,8 @@ io_duplex_halffree(struct io_duplex *dplx, struct io_o
*/
struct io_duplex *
-io_new_duplex(int fd, int (*mthd_read)(int, void *, size_t),
- int (*mthd_write)(int, const void *, size_t), size_t blocksize)
+io_new_duplex(int fd, ssize_t (*mthd_read)(int, void *, size_t),
+ ssize_t (*mthd_write)(int, const void *, size_t), size_t blocksize)
{
struct io_duplex *dplx;

View file

@ -0,0 +1,19 @@
--- io.h.orig Sat May 22 22:33:00 2010
+++ io.h Sat May 22 22:33:26 2010
@@ -96,14 +96,14 @@ struct io_header {
#define IO_OBJ_HOLD(x) \
do { \
if ((x)->io_flags & IOOBJ_HOLD) \
- errx(1, __FUNCTION__": %p already held", x); \
+ errx(1, "%s: %p already held", __FUNCTION__, x); \
(x)->io_flags |= IOOBJ_HOLD; \
} while (0)
#define IO_OBJ_RELEASE(x) \
do { \
if (!((x)->io_flags & IOOBJ_HOLD)) \
- errx(1, __FUNCTION__": %p not held", x); \
+ errx(1, "%s: %p not held", __FUNCTION__, x); \
(x)->io_flags &= ~IOOBJ_HOLD; \
} while (0)

View file

@ -0,0 +1,20 @@
--- io_method.c.orig Wed Mar 27 05:41:23 2002
+++ io_method.c Sat May 22 22:34:22 2010
@@ -59,7 +59,7 @@ ssize_t
io_method_accept(int fd, void *buf, size_t size)
{
struct sockaddr_storage from;
- size_t fromlen = sizeof(from);
+ socklen_t fromlen = sizeof(from);
if (size < sizeof(int))
return (0);
@@ -177,7 +177,7 @@ io_method_connect(struct io_obj *obj, int fd, void *bu
/* Check if the connection completed */
if (getsockopt(fd, SOL_SOCKET, SO_ERROR, &error, &errsz) == -1) {
- warn(__FUNCTION__": getsockopt for %d", fd);
+ warn("%s: getsockopt for %d", __FUNCTION__, fd);
return (-1);
}

5
devel/libio/pkg/DESCR Normal file
View file

@ -0,0 +1,5 @@
libio provides an abstraction for general data transport. It creates
data sources and data sinks. The sources and sinks can be connected with
multiple filters. As a result encryption and authentication can happen
completely transparent to the main core of an application. Mutliplex
nodes can be used to deal with N-fan in and M-fan out.

2
devel/libio/pkg/PLIST Normal file
View file

@ -0,0 +1,2 @@
include/io.h
lib/libio.a