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

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


  • To: Vlad-Andrei BĂDOIU (78692) <vlad_andrei.badoiu@xxxxxxxxxxxxxxx>, "minios-devel@xxxxxxxxxxxxx" <minios-devel@xxxxxxxxxxxxx>
  • From: Costin Lupu <costin.lupu@xxxxxxxxx>
  • Date: Thu, 22 Aug 2019 22:40:42 +0300
  • Cc: "felipe.huici@xxxxxxxxx" <felipe.huici@xxxxxxxxx>
  • Delivery-date: Thu, 22 Aug 2019 19:40:54 +0000
  • Ironport-phdr: 9a23:AIcIrBEkDp3EbkGyO7qrlp1GYnF86YWxBRYc798ds5kLTJ76p8S/bnLW6fgltlLVR4KTs6sC17OM9fm8BydRvN6oizMrSNR0TRgLiMEbzUQLIfWuLgnFFsPsdDEwB89YVVVorDmROElRH9viNRWJ+iXhpTEdFQ/iOgVrO+/7BpDdj9it1+C15pbffxhEiCCybL9vMhm6txjdu8YXjIdtLqs8ygbCr2dVdehR2W5mP0+YkQzm5se38p5j8iBQtOwk+sVdT6j0fLk2QKJBAjg+PG87+MPktR/YTQuS/XQcSXkZkgBJAwfe8h73WIr6vzbguep83CmaOtD2TawxVD+/4apnVAPkhSEaPDMi7mrZltJ/g75aoBK5phxw3YjUYJ2ONPFjeq/RZM4WSXZdUspUUSFKH4GyYJYVD+cZIOhWsYf9qVsNoxWwCwajC+HgxSNHiHLtwa06yv4sHR3a0AEuHd8DtmnfotXvNKcVVOC41LfFzTLYb/NK2Df97pXDfBY8ofGUQLJ7bM3cxlUoFwPeklWQqIrlMymR1uQQq2ib8vFtWv60i2I9swFxvyOgyt02ionOn48YzE3P+yt+wIYwP9K4SUh7bMahEJtNrCGaM5J6QscjQ25zpCk20LoGuYS0fCUM1Z8pxAbfZuSaf4WH/x7vTuWcLDdiiH57Zr6yhQy+/Ea4xuD/SMW4ylRHoyhfntXRt30A1Qbf5tWDR/Z9+EqqxCyB2BrJ6u5eJEA5ja/bK5k8zbEujpcTqkHDHjPumEXxka+Wal0o+ui25OTjZbXrvoGcN4puhQH/NqQigNCwAf8iPggWQmiU4v6w1Kfk/UHhQbVKiOM5krXBvZzHKskXu7S1DgxV34o59RqzETWr3M4WkHUfKVJKYhOHj4znO1HUJ/D4CO+yjEirkDdw2/DGP7vhDo/JLnjeiLfhYK1w5FJHyAYp1dBf+olbBqsbIPL0QkPxrsDXDgclMwyoxObqENB91oIYWWKOBa+ZK7revkKW6eIxPeaMYJQYuDL8K/g++/7ulmU1mFADcqmvx5cXb2q4Hvt+KUWDfXXsmssBEXsNvgcmQuzlllmCUT9LZ3msRa485iw7CIO6AofCXY2thqKO0zu/HpJMfW9KEE6DEWrwfYWeR/gMcD6SItNmkjEcS7ihT5Uu2gy2uwDgzbpoM/DU9TMZtZ75z9d6/fDclRYz9TxpFMmdyH2NT3xpkW8SXTA5wLt/rVZgylebyqd0meZYFdsAr89OBzk+PJKZ5up2Ed3zbShqUvCodWHmHYX4UGtwBoYvx9YCVE97F8+vj1bJ1iatAqI9jKCWCNo9+bmawmD7Ydx6nTKOnqwgiVghWY5DOHOrgoZ79hPPHMjZnkPfkLylP+xI2S/L9WCYiGaDokxceApxSrneG2ASYA3Rt9uvtW3YSLr7IrM8LgpHgeqfMrYCPtbulklHQrHnJczDS2mq3X+tD1CSweXfP8LRZ2wB0XCFWwA/mAcJ8CPDbFBmCw==
  • Ironport-sdr: zKMUQXSqdHR6Nckj6Qv29vJlQJyxJ7gj58J3RYm4aJwhYYfi6T+nCJzmgQbfA37MU41TX6wh3c nvoIiYqNqEwA==
  • List-id: Mini-os development list <minios-devel.lists.xenproject.org>

Hi Vlad,

Files imported from musl should go to musl-imported/ subdirectory from
now on, in order to preserve the original hierarchy of musl and to
differentiate them from the other files.

Cheers,
Costin

On 8/22/19 10:09 PM, Vlad-Andrei BĂDOIU (78692) wrote:
> 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
> 

_______________________________________________
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®.