From: Eric Wong <e@80x24.org>
To: meta@public-inbox.org
Subject: [PATCH 3/5] devel/sysdefs-list: show more info regardless of OS
Date: Fri, 6 Oct 2023 09:46:02 +0000 [thread overview]
Message-ID: <20231006094604.95809-4-e@80x24.org> (raw)
In-Reply-To: <20231006094604.95809-1-e@80x24.org>
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;
}
next prev parent reply other threads:[~2023-10-06 9:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-06 9:45 [PATCH 0/5] Dragonfly BSD support Eric Wong
2023-10-06 9:46 ` [PATCH 1/5] kqnotify: drop EV_CLEAR (edge triggering) Eric Wong
2023-10-06 9:46 ` [PATCH 2/5] xap_helper.h: strdup keys for DragonFlyBSD hdestroy(3) Eric Wong
2023-10-06 9:46 ` Eric Wong [this message]
2023-10-06 9:46 ` [PATCH 4/5] t/dir_idle: dump event list on failure Eric Wong
2023-10-06 9:46 ` [PATCH 5/5] finalize DragonFlyBSD support Eric Wong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://public-inbox.org/README
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231006094604.95809-4-e@80x24.org \
--to=e@80x24.org \
--cc=meta@public-inbox.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).