From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.1 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, T_SCC_BODY_TEXT_LINE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 782201F54E for ; Thu, 11 Aug 2022 20:33:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1660250019; bh=RgJ4hk7XMRptoyn2+527RClGkOahxcCxx6weIAKpPQI=; h=From:To:Subject:Date:From; b=wLcObPHZwe5+sVtXKxVNdfqA4tppPey+EFVIsojk2vqON6rllXnVSSY3E633GywSM lGmcKKxufAVHMsOaQIi406SlMqtfV7ITwKxA+rYosHeva7o0kipdd2bruLjLExglOl u5ylhxEtqpOu4EQt+CiQq9QBlebL0Xz0yUgNAdrw= From: Eric Wong To: meta@public-inbox.org Subject: [PATCH] devel/syscall-list: support non-Linux, show sizeof(pid_t) Date: Thu, 11 Aug 2022 20:33:39 +0000 Message-Id: <20220811203339.1208-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: While I have no intention of using syscall numbers for non-Linux, sizeof(pid_t) was useful for OpenBSD. And maybe Linux can have real competition from other OSes with stable syscall numbers someday. --- devel/syscall-list | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/devel/syscall-list b/devel/syscall-list index d33a8a78..adb450da 100755 --- a/devel/syscall-list +++ b/devel/syscall-list @@ -28,7 +28,10 @@ __DATA__ #define _GNU_SOURCE #include #include +#ifdef __linux__ #include +#endif +#include #include #include @@ -60,6 +63,7 @@ int main(void) D(SYS_renameat2); #endif #endif /* Linux, any other OSes with stable syscalls? */ - printf("size_t=%zu off_t=%zu\n", sizeof(size_t), sizeof(off_t)); + printf("size_t=%zu off_t=%zu pid_t=%zu\n", + sizeof(size_t), sizeof(off_t), sizeof(pid_t)); return 0; }