diff options
Diffstat (limited to 'libc/include')
-rw-r--r-- | libc/include/CMakeLists.txt | 11 | ||||
-rw-r--r-- | libc/include/llvm-libc-macros/CMakeLists.txt | 6 | ||||
-rw-r--r-- | libc/include/llvm-libc-macros/netinet-in-macros.h | 19 | ||||
-rw-r--r-- | libc/include/netinet/in.h.def | 18 | ||||
-rw-r--r-- | libc/include/netinet/in.yaml | 7 |
5 files changed, 61 insertions, 0 deletions
diff --git a/libc/include/CMakeLists.txt b/libc/include/CMakeLists.txt index 8fd37b0..afa90e6 100644 --- a/libc/include/CMakeLists.txt +++ b/libc/include/CMakeLists.txt @@ -191,6 +191,17 @@ add_header_macro( .inttypes ) +file(MAKE_DIRECTORY ${LIBC_INCLUDE_DIR}/netinet) + +add_header_macro( + netinet_in + ../libc/include/netinet/in.yaml + netinet/in.h + DEPENDS + .llvm_libc_common_h + .llvm-libc-macros.netinet_in_macros +) + add_header_macro( assert ../libc/include/assert.yaml diff --git a/libc/include/llvm-libc-macros/CMakeLists.txt b/libc/include/llvm-libc-macros/CMakeLists.txt index f715403..76c03d9 100644 --- a/libc/include/llvm-libc-macros/CMakeLists.txt +++ b/libc/include/llvm-libc-macros/CMakeLists.txt @@ -153,6 +153,12 @@ add_macro_header( ) add_macro_header( + netinet_in_macros + HDR + netinet-in-macros.h +) + +add_macro_header( offsetof_macro HDR offsetof-macro.h diff --git a/libc/include/llvm-libc-macros/netinet-in-macros.h b/libc/include/llvm-libc-macros/netinet-in-macros.h new file mode 100644 index 0000000..c05e5e2 --- /dev/null +++ b/libc/include/llvm-libc-macros/netinet-in-macros.h @@ -0,0 +1,19 @@ +//===-- Definition of macros from netinet/in.h ----------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_LIBC_MACROS_NETINET_IN_MACROS_H +#define LLVM_LIBC_MACROS_NETINET_IN_MACROS_H + +#define IPPROTO_IP 0 +#define IPPROTO_ICMP 1 +#define IPPROTO_TCP 6 +#define IPPROTO_UDP 17 +#define IPPROTO_IPV6 41 +#define IPPROTO_RAW 255 + +#endif // LLVM_LIBC_MACROS_NETINET_IN_MACROS_H diff --git a/libc/include/netinet/in.h.def b/libc/include/netinet/in.h.def new file mode 100644 index 0000000..d9a6a6e --- /dev/null +++ b/libc/include/netinet/in.h.def @@ -0,0 +1,18 @@ +//===-- C standard library header in.h ------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_LIBC_NETINET_IN_H +#define LLVM_LIBC_NETINET_IN_H + +#include "__llvm-libc-common.h" + +#include "../llvm-libc-macros/netinet-in-macros.h" + +%%public_api() + +#endif // LLVM_LIBC_NETINET_IN_H diff --git a/libc/include/netinet/in.yaml b/libc/include/netinet/in.yaml new file mode 100644 index 0000000..fbd798d --- /dev/null +++ b/libc/include/netinet/in.yaml @@ -0,0 +1,7 @@ +header: netinet/in.h +header_template: in.h.def +macros: [] +types: [] +enums: [] +objects: [] +functions: [] |