Module Name:    src
Committed By:   christos
Date:           Wed May 31 17:56:01 UTC 2017

Modified Files:
        src/lib/libpuffs: framebuf.c puffs.c

Log Message:
Adjust to prototype.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/lib/libpuffs/framebuf.c
cvs rdiff -u -r1.120 -r1.121 src/lib/libpuffs/puffs.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libpuffs/framebuf.c
diff -u src/lib/libpuffs/framebuf.c:1.33 src/lib/libpuffs/framebuf.c:1.34
--- src/lib/libpuffs/framebuf.c:1.33	Tue May  9 17:15:30 2017
+++ src/lib/libpuffs/framebuf.c	Wed May 31 13:56:00 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: framebuf.c,v 1.33 2017/05/09 21:15:30 christos Exp $	*/
+/*	$NetBSD: framebuf.c,v 1.34 2017/05/31 17:56:00 christos Exp $	*/
 
 /*
  * Copyright (c) 2007  Antti Kantee.  All Rights Reserved.
@@ -35,7 +35,7 @@
 
 #include <sys/cdefs.h>
 #if !defined(lint)
-__RCSID("$NetBSD: framebuf.c,v 1.33 2017/05/09 21:15:30 christos Exp $");
+__RCSID("$NetBSD: framebuf.c,v 1.34 2017/05/31 17:56:00 christos Exp $");
 #endif /* !lint */
 
 #include <sys/types.h>
@@ -559,7 +559,7 @@ puffs_framev_enqueue_waitevent(struct pu
 	if (*what & PUFFS_FBIO_READ)
 		if ((fio->stat & FIO_ENABLE_R) == 0)
 			EV_SET(&kev, fd, EVFILT_READ, EV_ENABLE,
-			    0, 0, (uintptr_t)fio);
+			    0, 0, (intptr_t)fio);
 
 	if (kevent(pu->pu_kq, &kev, 1, NULL, 0, NULL) == -1)
 		return -1;
@@ -578,7 +578,7 @@ puffs_framev_enqueue_waitevent(struct pu
 		fio->rwait--;
 		if (fio->rwait == 0 && (fio->stat & FIO_ENABLE_R) == 0) {
 			EV_SET(&kev, fd, EVFILT_READ, EV_DISABLE,
-			    0, 0, (uintptr_t)fio);
+			    0, 0, (intptr_t)fio);
 			rv = kevent(pu->pu_kq, &kev, 1, NULL, 0, NULL);
 #if 0
 			if (rv != 0)
@@ -869,7 +869,7 @@ puffs_framev_enablefd(struct puffs_userm
 
 	/* write is enabled in the event loop if there is output */
 	if (what & PUFFS_FBIO_READ && fio->rwait == 0) {
-		EV_SET(&kev, fd, EVFILT_READ, EV_ENABLE, 0, 0, (uintptr_t)fio);
+		EV_SET(&kev, fd, EVFILT_READ, EV_ENABLE, 0, 0, (intptr_t)fio);
 		rv = kevent(pu->pu_kq, &kev, 1, NULL, 0, NULL);
 	}
 
@@ -902,12 +902,12 @@ puffs_framev_disablefd(struct puffs_user
 	i = 0;
 	if (what & PUFFS_FBIO_READ && fio->rwait == 0) {
 		EV_SET(&kev[0], fd,
-		    EVFILT_READ, EV_DISABLE, 0, 0, (uintptr_t)fio);
+		    EVFILT_READ, EV_DISABLE, 0, 0, (intptr_t)fio);
 		i++;
 	}
 	if (what & PUFFS_FBIO_WRITE && fio->stat & FIO_WR && fio->wwait == 0) {
 		EV_SET(&kev[1], fd,
-		    EVFILT_WRITE, EV_DISABLE, 0, 0, (uintptr_t)fio);
+		    EVFILT_WRITE, EV_DISABLE, 0, 0, (intptr_t)fio);
 		i++;
 	}
 	if (i)

Index: src/lib/libpuffs/puffs.c
diff -u src/lib/libpuffs/puffs.c:1.120 src/lib/libpuffs/puffs.c:1.121
--- src/lib/libpuffs/puffs.c:1.120	Tue Jun 16 20:15:26 2015
+++ src/lib/libpuffs/puffs.c	Wed May 31 13:56:00 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: puffs.c,v 1.120 2015/06/17 00:15:26 christos Exp $	*/
+/*	$NetBSD: puffs.c,v 1.121 2017/05/31 17:56:00 christos Exp $	*/
 
 /*
  * Copyright (c) 2005, 2006, 2007  Antti Kantee.  All Rights Reserved.
@@ -31,7 +31,7 @@
 
 #include <sys/cdefs.h>
 #if !defined(lint)
-__RCSID("$NetBSD: puffs.c,v 1.120 2015/06/17 00:15:26 christos Exp $");
+__RCSID("$NetBSD: puffs.c,v 1.121 2017/05/31 17:56:00 christos Exp $");
 #endif /* !lint */
 
 #include <sys/param.h>
@@ -846,14 +846,14 @@ puffs__theloop(struct puffs_cc *pcc)
 			if (FIO_EN_WRITE(fio)) {
 				EV_SET(&pu->pu_evs[nchanges], fio->io_fd,
 				    EVFILT_WRITE, EV_ENABLE, 0, 0,
-				    (uintptr_t)fio);
+				    (intptr_t)fio);
 				fio->stat |= FIO_WR;
 				nchanges++;
 			}
 			if (FIO_RM_WRITE(fio)) {
 				EV_SET(&pu->pu_evs[nchanges], fio->io_fd,
 				    EVFILT_WRITE, EV_DISABLE, 0, 0,
-				    (uintptr_t)fio);
+				    (intptr_t)fio);
 				fio->stat &= ~FIO_WR;
 				nchanges++;
 			}
@@ -967,10 +967,10 @@ puffs_mainloop(struct puffs_usermount *p
 
 	LIST_FOREACH(fio, &pu->pu_ios, fio_entries) {
 		EV_SET(curev, fio->io_fd, EVFILT_READ, EV_ADD,
-		    0, 0, (uintptr_t)fio);
+		    0, 0, (intptr_t)fio);
 		curev++;
 		EV_SET(curev, fio->io_fd, EVFILT_WRITE, EV_ADD | EV_DISABLE,
-		    0, 0, (uintptr_t)fio);
+		    0, 0, (intptr_t)fio);
 		curev++;
 	}
 	for (i = 0; i < NSIG; i++) {

Reply via email to