From patchwork Thu Apr 2 16:29:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 38711 Return-Path: X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from esa4.hgst.iphmx.com (esa4.hgst.iphmx.com [216.71.154.42]) by sourceware.org (Postfix) with ESMTPS id 11B32388A031 for ; Thu, 2 Apr 2020 16:37:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 11B32388A031 IronPort-SDR: wOwF3rrE208OZrTfOihNTHvwBYkPlVOEpuqSEFPUiGeybf8fmYP4bi/Schn0aUzp+96an1ijxs spOcJOtLEGyGaHYNxbJT9UMG3fyTX0XDxOdjSS1FOIGtif8dJ8vFYC9TMfoDyq+yuKrNVMFdum faswPcFFOV3bNmzMj6JiL3XjR/SsyIcDwGAx8Yp9yBZUoBACvlLkYmyEn9tPzuAeVTPD0Mo3o/ DKfUpaYluFwPaJJJ3+7TWyWjKGO7s6Ez6b9cJmm5equxeUIbLDQGwSDCz1AuGcZ0xJZqAY6r6y WnM= X-IronPort-AV: E=Sophos;i="5.72,336,1580745600"; d="scan'208";a="134426327" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 03 Apr 2020 00:37:26 +0800 IronPort-SDR: j7/xI3TFSEMXO/O8laOHUv585bSvP1SIDMe68wUUj4hd+3GsUF+lJpiAm/jFyjmbk55lvtMtkt vgalKW3OTJC0xoaFXi8nEiGqJXMMGeaFK+i/c/6vR2RQvTsQKFON/63I2ymFcLOrSSq5zmLFM+ DxH4DP81aZjs5qiqWa2NBz+B3asSd7fkanwa/PcxKcN2l177LAWz5rxjd1+pZn8plhlzwQDEM6 Zoe3cc41D9qYBjlk82wXFkTfwPLxK6WM7n6H1W6fQ1SrtL45rVj1mg3112dcFBIOF+nRPxh8V3 qg3O533vNddOQbXTJ4ijd2LC Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Apr 2020 09:28:17 -0700 IronPort-SDR: XE5h0IaCPm/qM1Sv/BYDv7i9XNibXAtAsukKexeJR0GOqFuRG0ORe8f2wot73GBv5of1txgDEA 0xPkCcvRtQUXbrDv6YZQv2+rRciVVVXecplokHX/LfcN94cxACJmZDrlwRvvvxYLvijhVcrr27 Q16/6VzGE7t8xQy27lv6eqyxblkVLFKfsQOL4Qavrkz1xA8RCsAMWgizj2+EgEp3p6MDFLRhOt vYE71L4WvAKHgYLdmmA5R0Y9DxTn+so8CHNeRbW0X69EAT7i5X9N0zux+Bhea1MgmrofIDWWnR /LU= WDCIronportException: Internal Received: from phd004806.ad.shared (HELO risc6-mainframe.hgst.com) ([10.86.55.43]) by uls-op-cesaip02.wdc.com with ESMTP; 02 Apr 2020 09:37:26 -0700 From: Alistair Francis To: libc-alpha@sourceware.org Cc: alistair23@gmail.com, Alistair Francis Subject: [PATCH 04/18] RISC-V: Add socket-constants.h for RV32 Date: Thu, 2 Apr 2020 09:29:34 -0700 Message-Id: <20200402162939.358617-5-alistair.francis@wdc.com> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200402162939.358617-1-alistair.francis@wdc.com> References: <20200402162939.358617-1-alistair.francis@wdc.com> MIME-Version: 1.0 X-Spam-Status: No, score=-25.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_NUMSUBJECT, KAM_SHORT, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Apr 2020 16:37:33 -0000 Add the latest versionf of the socket-constants.h based on new Linux --- .../sysv/linux/riscv/bits/socket-constants.h | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/riscv/bits/socket-constants.h diff --git a/sysdeps/unix/sysv/linux/riscv/bits/socket-constants.h b/sysdeps/unix/sysv/linux/riscv/bits/socket-constants.h new file mode 100644 index 0000000000..7ecdfcbb61 --- /dev/null +++ b/sysdeps/unix/sysv/linux/riscv/bits/socket-constants.h @@ -0,0 +1,46 @@ +/* Socket constants which vary among Linux architectures. Version for RV32. + Copyright (C) 2020 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _SYS_SOCKET_H +# error "Never include directly; use instead." +#endif + +#define SOL_SOCKET 1 +#define SO_ACCEPTCONN 30 +#define SO_BROADCAST 6 +#define SO_DONTROUTE 5 +#define SO_ERROR 4 +#define SO_KEEPALIVE 9 +#define SO_LINGER 13 +#define SO_OOBINLINE 10 +#define SO_RCVBUF 8 +#define SO_RCVLOWAT 18 +#if __riscv_xlen == 32 +# define SO_RCVTIMEO 66 +#else +# define SO_RCVTIMEO 20 +#endif +#define SO_REUSEADDR 2 +#define SO_SNDBUF 7 +#define SO_SNDLOWAT 19 +#if __riscv_xlen == 32 +# define SO_SNDTIMEO 67 +#else +# define SO_SNDTIMEO 21 +#endif +#define SO_TYPE 3