[libc-commits] [libc] [libc] Provide sys/queue.h (PR #78081)

Petr Hosek via libc-commits libc-commits at lists.llvm.org
Wed Jan 17 22:32:41 PST 2024


================
@@ -0,0 +1,259 @@
+//===-- Macros defined in sys/queue.h header file -------------------------===//
+//
+// 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_SYS_QUEUE_MACROS_H
+#define __LLVM_LIBC_MACROS_SYS_QUEUE_MACROS_H
+
+#include <llvm-libc-macros/null-macro.h>
+#include <llvm-libc-macros/offsetof-macro.h>
+
+#ifdef __cplusplus
+#define QUEUE_TYPEOF(type) type
+#else
+#define QUEUE_TYPEOF(type) struct type
+#endif
+
+// Singly-linked list definitions.
----------------
petrhosek wrote:

Done.

https://github.com/llvm/llvm-project/pull/78081


More information about the libc-commits mailing list