[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Minios-devel] [UNIKRAFT/NEWLIB PATCH 1/1] sys/sysmacros.h: Import from musl


  • To: "minios-devel@xxxxxxxxxxxxx" <minios-devel@xxxxxxxxxxxxx>
  • From: Vlad-Andrei BĂDOIU (78692) <vlad_andrei.badoiu@xxxxxxxxxxxxxxx>
  • Date: Thu, 22 Aug 2019 19:09:23 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=stud.acs.upb.ro; dmarc=pass action=none header.from=stud.acs.upb.ro; dkim=pass header.d=stud.acs.upb.ro; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GEs3XmKHB6cKKEYiGS88vrbkrLc3lu7ca/8IIG+G6W0=; b=gChLiDXA0isI8yiBWzTG11s0ikQgTDAvOJGALX172e+52sV4Pmo48ioOGCO0Q2Ch2z1lNatlpp7o0Tg/bhhQtYQWgRXVbuj1uZojJuUvZN/VSF/4W0RQr3R8F4pbC3+M87uxXXUWCgtwW8kMqB4SLkgkwER8cI0IVW2b+bnPz1+i2sWiQIiqu2dGqUs8ns8Ku6pNLR5lTVnStWFW6fFuT6VIptj/oswZAPOUkRAHxlDAAXbuaOV95C6hOIjIrKvPaJE+W5xuoCWHjQG25N78tyXzSLBAyp3/07Cad94PrcyDgCYKuNxZ8GtWBrKpg9RsYOdBLjWkU79j4AimwT2OqQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jbY5LtDFZoyYtCXQuaOoQFfCY0qNQ4glje/1/qpkxzbhTVKTG6/MaMC2Cwxr/2XibfuT07EfmUwmb7XTF5NXj/HOgPcr8XI0zkv4K+/3mtRWed8T7NnQtLXTBnCR/zzDrbNQC51ZEuUXushr97DG9tGlTiDUGt5Mp8AQ11bIt0+kUX2SLL7+CCgsp3aqsE4vmC6r+qD/obWSbGPfNHsI1aDm/LpeD+nAvTUurrlQOVc4TNoaoyq2tlkS/7vqtpU4A9AUBdys9yEXduh7TuK18XJFPp4t5X6ywW5+gdNXawQgbYUZCswqFlpU6+CghSFtKOqrmO0w7DCYVX4yvE6sjw==
  • Authentication-results: spf=none (sender IP is ) smtp.mailfrom=vlad_andrei.badoiu@xxxxxxxxxxxxxxx;
  • Cc: "felipe.huici@xxxxxxxxx" <felipe.huici@xxxxxxxxx>, Vlad-Andrei BĂDOIU (78692) <vlad_andrei.badoiu@xxxxxxxxxxxxxxx>, "costin.lupu@xxxxxxxxx" <costin.lupu@xxxxxxxxx>
  • Delivery-date: Thu, 22 Aug 2019 19:09:31 +0000
  • List-id: Mini-os development list <minios-devel.lists.xenproject.org>
  • Thread-index: AQHVWR0b6rhzXeQMUUe0F05jRa8LMA==
  • Thread-topic: [UNIKRAFT/NEWLIB PATCH 1/1] sys/sysmacros.h: Import from musl

Copied as is from the official musl git mirror
git://git.musl-libc.org/musl, commit 6fcb440d.

Signed-off-by: Vlad-Andrei Badoiu <vlad_andrei.badoiu@xxxxxxxxxxxxxxx>
---
 include/sys/sysmacros.h | 41 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)
 create mode 100644 include/sys/sysmacros.h

diff --git a/include/sys/sysmacros.h b/include/sys/sysmacros.h
new file mode 100644
index 0000000..0efdc6b
--- /dev/null
+++ b/include/sys/sysmacros.h
@@ -0,0 +1,41 @@
+/* SPDX-License-Identifier: MIT */
+/* ----------------------------------------------------------------------
+ * Copyright © 2005-2014 Rich Felker, et al.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * ----------------------------------------------------------------------
+ */
+/* Taken from musl */
+
+#ifndef _SYS_SYSMACROS_H
+#define _SYS_SYSMACROS_H
+
+#define major(x) \
+       ((unsigned)( (((x)>>31>>1) & 0xfffff000) | (((x)>>8) & 0x00000fff) ))
+#define minor(x) \
+       ((unsigned)( (((x)>>12) & 0xffffff00) | ((x) & 0x000000ff) ))
+
+#define makedev(x,y) ( \
+        (((x)&0xfffff000ULL) << 32) | \
+       (((x)&0x00000fffULL) << 8) | \
+        (((y)&0xffffff00ULL) << 12) | \
+       (((y)&0x000000ffULL)) )
+
+#endif
-- 
2.20.1

_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.