From patchwork Wed Dec 12 16:45:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luc Van Oostenryck X-Patchwork-Id: 10726715 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D0E1291E for ; Wed, 12 Dec 2018 16:46:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C1DD02B82B for ; Wed, 12 Dec 2018 16:46:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B66C02B835; Wed, 12 Dec 2018 16:46:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 667E52B82B for ; Wed, 12 Dec 2018 16:46:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727902AbeLLQqK (ORCPT ); Wed, 12 Dec 2018 11:46:10 -0500 Received: from mail-ed1-f65.google.com ([209.85.208.65]:32885 "EHLO mail-ed1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727880AbeLLQqK (ORCPT ); Wed, 12 Dec 2018 11:46:10 -0500 Received: by mail-ed1-f65.google.com with SMTP id p6so16148554eds.0 for ; Wed, 12 Dec 2018 08:46:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ZrScmu/IVF6RLJLAxyjCwym/JJT4dcb6lkrPxXu5n9Y=; b=iszjjV7XSVgtHY2lYxjxRXFBE2WpMB+P3yvpndxkCuI58TbR7Jh0oU9yXWAGNrW7UO gq+OXs4ogf4ky948WJreKlRcV3CepkabNZaY9o454+1yufupmQhDm1vVlgCEAc7yM2zi Jx+7Nym3j64JfXzdIObThW6iTtYafTeNQTLiZshbnV7B8DCCbdVSFkUSEOSHQ/0loSu1 +FtfDlUvcy5p5wBU40Eu8O7BHowL064l/BsNJvL4Yi8fh5/TAjo2mrlDavjcbl/094gP 0qe/lx6mLOjJ2R5SI+jzKvyC5s2aQV6G2dzpb6GWp5QvA5s4yFf4S+STX4+3rvl49aWZ HTUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ZrScmu/IVF6RLJLAxyjCwym/JJT4dcb6lkrPxXu5n9Y=; b=nVBCxzC5iV4RVr9WB17bcMAsPYBaC0WfsajqDgRAwys/HrULNGYrG6nAhwKt7sY/fp K7KKRBc/Vgh5sjbusrdZmQWez6NG/N96OJAitFeYDJBDLZHlkWkRoHfJSZYxAjMZ2+EZ SYWY09k2F7JoHHQls6Wf1QyuRhT/zFIFJ32HYrtlkS0yZ/DNYVt78wK1O6IL3i74tVY1 nwXV0iIHXzWflN2rO32jWd4c40RKGtHYxAfpIuVrAvWbp0QKdsAC/Yuy5qgJy4LIbMRV C5WPnugRIXk1zLEHThkmT6/rdF1qnW0VGyWwh9mWykBuZgFbhF6wO6yjL3YvIia9gwAh RFww== X-Gm-Message-State: AA+aEWaHqcTaBYMBNZZ1msLFEiH5bQ/qhOnmjmeJQA3v6MIb+OrOI6nD q79oyEMwU22lrp3ayyPjPPvldAgQ X-Google-Smtp-Source: AFSGD/W2aC3jCXvGN/zWEISfMDzz/AuqG8tupGEhzL2Csm3bznP/7gQh9tUsAOg1j/rX4y1StvrOxw== X-Received: by 2002:a17:906:314a:: with SMTP id e10-v6mr15706298eje.227.1544633167986; Wed, 12 Dec 2018 08:46:07 -0800 (PST) Received: from localhost.localdomain ([2a02:a03f:4011:9300:57c:c634:5c6d:4b28]) by smtp.gmail.com with ESMTPSA id v11sm5161716edy.49.2018.12.12.08.46.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Dec 2018 08:46:06 -0800 (PST) From: Luc Van Oostenryck To: linux-sparse@vger.kernel.org Cc: Ramsay Jones , Luc Van Oostenryck Subject: [PATCH v2 08/14] add predefined macros for wint_t Date: Wed, 12 Dec 2018 17:45:48 +0100 Message-Id: <20181212164554.43133-9-luc.vanoostenryck@gmail.com> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181212164554.43133-1-luc.vanoostenryck@gmail.com> References: <20181212164554.43133-1-luc.vanoostenryck@gmail.com> MIME-Version: 1.0 Sender: linux-sparse-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sparse@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This type seems to use 'unsigned int' on all archs but for Darwin & FreeBSD. Signed-off-by: Luc Van Oostenryck --- lib.c | 5 +++++ target.c | 1 + target.h | 1 + 3 files changed, 7 insertions(+) diff --git a/lib.c b/lib.c index 0abefa083..605f9edd5 100644 --- a/lib.c +++ b/lib.c @@ -520,6 +520,10 @@ static void handle_arch_m64_finalize(void) #endif break; } + +#if defined(__FreeBSD__) || defined(__APPLE__) + wint_ctype = &int_ctype; +#endif } static void handle_arch_msize_long_finalize(void) @@ -1250,6 +1254,7 @@ static void predefined_macros(void) predefined_ctype("SHRT", &short_ctype, PTYPE_MAX|PTYPE_WIDTH); predefined_ctype("SCHAR", &char_ctype, PTYPE_MAX|PTYPE_WIDTH); predefined_ctype("WCHAR", wchar_ctype, PTYPE_ALL_T|PTYPE_TYPE); + predefined_ctype("WINT", wint_ctype, PTYPE_ALL_T|PTYPE_TYPE); predefined_ctype("INT", &int_ctype, PTYPE_ALL); predefined_ctype("LONG", &long_ctype, PTYPE_ALL); diff --git a/target.c b/target.c index e09eff865..57866c337 100644 --- a/target.c +++ b/target.c @@ -6,6 +6,7 @@ struct symbol *size_t_ctype = &uint_ctype; struct symbol *ssize_t_ctype = &int_ctype; struct symbol *wchar_ctype = &int_ctype; +struct symbol *wint_ctype = &uint_ctype; /* * For "__attribute__((aligned))" diff --git a/target.h b/target.h index 74f51ffeb..998d25af5 100644 --- a/target.h +++ b/target.h @@ -4,6 +4,7 @@ extern struct symbol *size_t_ctype; extern struct symbol *ssize_t_ctype; extern struct symbol *wchar_ctype; +extern struct symbol *wint_ctype; /* * For "__attribute__((aligned))"