user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [PATCH 3/5] devel/sysdefs-list: show more info regardless of OS
  2023-10-06  9:45  6% [PATCH 0/5] Dragonfly BSD support Eric Wong
@ 2023-10-06  9:46  7% ` Eric Wong
  0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2023-10-06  9:46 UTC (permalink / raw)
  To: meta

We'll show SO_ACCEPTFILTER since it's supported on three
of the BSDs we support.
---
 devel/sysdefs-list | 45 ++++++++++++++++++++++-----------------------
 1 file changed, 22 insertions(+), 23 deletions(-)

diff --git a/devel/sysdefs-list b/devel/sysdefs-list
index edac253b..d0166461 100755
--- a/devel/sysdefs-list
+++ b/devel/sysdefs-list
@@ -37,13 +37,13 @@ __DATA__
 #include <assert.h>
 #include <signal.h>
 #include <stddef.h>
+#include <sys/socket.h>
 #include <sys/syscall.h>
 #include <sys/ioctl.h>
 #ifdef __linux__
 #	include <linux/fs.h>
 #	include <sys/epoll.h>
 #	include <sys/inotify.h>
-#	include <sys/socket.h> // we don't care about this on *BSD
 #	include <sys/vfs.h>
 #endif
 #include <sys/types.h>
@@ -93,8 +93,6 @@ int main(void)
 	D(SYS_inotify_rm_watch);
 	D(SYS_prctl);
 	D(SYS_fstatfs);
-	D(SYS_sendmsg);
-	D(SYS_recvmsg);
 
 	MAYBE X(FS_IOC_GETFLAGS);
 	MAYBE X(FS_IOC_SETFLAGS);
@@ -114,36 +112,21 @@ int main(void)
 		PR_OFF(name);
 	STRUCT_END;
 
-	/*
-	 * msghdr and cmsghdr are portable, but we only care about its layout
-	 * on OSes like Linux with stable syscall numbers
-	 */
-	STRUCT_BEGIN(struct msghdr);
-		PR_PTR(msg_name);
-		PR_NUM(msg_namelen);
-		PR_PTR(msg_iov);
-		PR_NUM(msg_iovlen);
-		PR_PTR(msg_control);
-		PR_NUM(msg_controllen);
-		PR_NUM(msg_flags);
-	STRUCT_END;
-
-	STRUCT_BEGIN(struct cmsghdr);
-		PR_NUM(cmsg_len);
-		PR_NUM(cmsg_level);
-		PR_NUM(cmsg_type);
-	STRUCT_END;
-
 	STRUCT_BEGIN(struct statfs);
 		PR_NUM(f_type);
 	STRUCT_END;
 #endif /* Linux, any other OSes with stable syscalls? */
+
 	D(SIGWINCH);
+	MAYBE D(SO_ACCEPTFILTER);
 	MAYBE D(_SC_NPROCESSORS_ONLN);
 	MAYBE D(_SC_AVPHYS_PAGES);
 	MAYBE D(_SC_PAGE_SIZE);
 	MAYBE D(_SC_PAGESIZE);
 
+	D(SYS_sendmsg);
+	D(SYS_recvmsg);
+
 	STRUCT_BEGIN(struct flock);
 		PR_NUM(l_start);
 		PR_NUM(l_len);
@@ -152,5 +135,21 @@ int main(void)
 		PR_NUM(l_whence);
 	STRUCT_END;
 
+	STRUCT_BEGIN(struct msghdr);
+		PR_PTR(msg_name);
+		PR_NUM(msg_namelen);
+		PR_PTR(msg_iov);
+		PR_NUM(msg_iovlen);
+		PR_PTR(msg_control);
+		PR_NUM(msg_controllen);
+		PR_NUM(msg_flags);
+	STRUCT_END;
+
+	STRUCT_BEGIN(struct cmsghdr);
+		PR_NUM(cmsg_len);
+		PR_NUM(cmsg_level);
+		PR_NUM(cmsg_type);
+	STRUCT_END;
+
 	return 0;
 }

^ permalink raw reply related	[relevance 7%]

* [PATCH 0/5] Dragonfly BSD support
@ 2023-10-06  9:45  6% Eric Wong
  2023-10-06  9:46  7% ` [PATCH 3/5] devel/sysdefs-list: show more info regardless of OS Eric Wong
  0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2023-10-06  9:45 UTC (permalink / raw)
  To: meta

Got one tmpfs + EVFILT_VNODE bug fixed in Dragonfly in the
process.  Dealing with hdestroy implementation differences
is really making me consider khash...

Also considering using sysdefs-list output via $Config{cc}
to support sendmsg/recvmsg without needing Inline::C. `cc'
seems pretty standard across all *BSDs.

Eric Wong (5):
  kqnotify: drop EV_CLEAR (edge triggering)
  xap_helper.h: strdup keys for DragonFlyBSD hdestroy(3)
  devel/sysdefs-list: show more info regardless of OS
  t/dir_idle: dump event list on failure
  finalize DragonFlyBSD support

 devel/sysdefs-list            | 45 +++++++++++++++++------------------
 install/os.perl               |  7 +++---
 lib/PublicInbox/Daemon.pm     |  4 ++--
 lib/PublicInbox/IPC.pm        |  1 +
 lib/PublicInbox/KQNotify.pm   |  2 +-
 lib/PublicInbox/MboxLock.pm   | 10 +++++---
 lib/PublicInbox/POP3D.pm      |  4 ++--
 lib/PublicInbox/TestCommon.pm | 19 +++++++++++++--
 lib/PublicInbox/xap_helper.h  | 13 ++++++++--
 t/dir_idle.t                  |  8 ++++---
 t/ds-kqxs.t                   |  5 ++--
 t/kqnotify.t                  | 28 +++++++++++++++++++++-
 t/pop3d-limit.t               |  4 +---
 t/pop3d.t                     |  6 ++---
 t/search.t                    |  2 +-
 xt/pop3d-mpop.t               |  5 ++--
 16 files changed, 108 insertions(+), 55 deletions(-)

^ permalink raw reply	[relevance 6%]

Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2023-10-06  9:45  6% [PATCH 0/5] Dragonfly BSD support Eric Wong
2023-10-06  9:46  7% ` [PATCH 3/5] devel/sysdefs-list: show more info regardless of OS Eric Wong

Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).