Message ID | 20221217165213.152-14-luoyonggang@gmail.com |
---|---|
State | Dropped |
Headers |
Return-Path: <elfutils-devel-bounces+patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 42A273AA9805 for <patchwork@sourceware.org>; Sat, 17 Dec 2022 16:54:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 42A273AA9805 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1671296042; bh=66jzVvq3ZN+7lbp8CwAHNGRtXnz45vh1DN2S11XRPdU=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Help:List-Subscribe:From: Reply-To:From; b=n46JNe26piuGsilCcNC1ntoZHiFYbGulWxq8IIfZkvgcRi3mYGSPZyUCInsiZqjM+ LZSxRwi1KHxC3pk64Szi+2KgFnbnAyn1IJ1RjmEbnGUcWYzFRyuYLQ2wSTR4clXrcs Ds5mvE5j/LK2LzJUdFH0gmmimDF1HUlvXMyZLxjs= X-Original-To: elfutils-devel@sourceware.org Delivered-To: elfutils-devel@sourceware.org Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) by sourceware.org (Postfix) with ESMTPS id B07533AA941F for <elfutils-devel@sourceware.org>; Sat, 17 Dec 2022 16:52:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B07533AA941F Received: by mail-pj1-x102d.google.com with SMTP id n65-20020a17090a2cc700b0021bc5ef7a14so5297070pjd.0 for <elfutils-devel@sourceware.org>; Sat, 17 Dec 2022 08:52:58 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=66jzVvq3ZN+7lbp8CwAHNGRtXnz45vh1DN2S11XRPdU=; b=4rItZ8JX7y5WLrn2562LWrRkmRcuL3dLdEVml1WyzasaYiCn07BI/+yZznWI5H79ax vTAXLd1OBiMgYbcARl4YNFIEZNHDSDIMpi9QCPfZXW/fax/YZYewoxNEJSLvF0/E2PvH RypHqzlvsktoSZkdijKdGbkwQfJREtX7DRa4vKpC2SZ0Rz7HWitLypfN/5TFGHa7oxDY RJw6g7XChaT5yHlc9pIdS4NDpMx07Csz25Cy+Le7sOkiV7MPZrBenTPslGB3JALDNOPb ZxbXT6mNCOGu5BHOiSxBWg/KSfAyCrJxtBqQSvM37/XwYKWj6bhvX2zUVb2LU3eGDZUY uQcA== X-Gm-Message-State: ANoB5pkHWFhlCby+r6FbEgX27ahrh7WqfhqaM9fbKa8q/Q+g1aVZgR4L qUQTiDEmK7rg+TqN8SPoByEHkABiUag= X-Google-Smtp-Source: AA0mqf5gffIZwGKBUSNq9hZBJymC08AKvPY2dES+3FIEOn5yYYQYeh2Jq+iBaq0TI23lNTfXTgJKKA== X-Received: by 2002:a17:90a:6c21:b0:223:1e7d:67e8 with SMTP id x30-20020a17090a6c2100b002231e7d67e8mr19266901pjj.16.1671295977449; Sat, 17 Dec 2022 08:52:57 -0800 (PST) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id s92-20020a17090a2f6500b002191873187dsm6643229pjd.33.2022.12.17.08.52.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Dec 2022 08:52:57 -0800 (PST) To: elfutils-devel@sourceware.org Cc: Yonggang Luo <luoyonggang@gmail.com> Subject: [PATCH v2 13/16] lib: isatty is not available on windows Date: Sun, 18 Dec 2022 00:52:10 +0800 Message-Id: <20221217165213.152-14-luoyonggang@gmail.com> X-Mailer: git-send-email 2.36.1.windows.1 In-Reply-To: <20221217165213.152-1-luoyonggang@gmail.com> References: <20221217165213.152-1-luoyonggang@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: elfutils-devel@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Elfutils-devel mailing list <elfutils-devel.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/elfutils-devel>, <mailto:elfutils-devel-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/elfutils-devel/> List-Help: <mailto:elfutils-devel-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/elfutils-devel>, <mailto:elfutils-devel-request@sourceware.org?subject=subscribe> From: Yonggang Luo via Elfutils-devel <elfutils-devel@sourceware.org> Reply-To: Yonggang Luo <luoyonggang@gmail.com> Errors-To: elfutils-devel-bounces+patchwork=sourceware.org@sourceware.org Sender: "Elfutils-devel" <elfutils-devel-bounces+patchwork=sourceware.org@sourceware.org> |
Series |
Patches for building with mingw/gcc msvc/clang-cl
|
|
Commit Message
Yonggang Luo
Dec. 17, 2022, 4:52 p.m. UTC
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
---
lib/color.c | 5 +++++
1 file changed, 5 insertions(+)
Comments
It's because lack STDOUT_FILENO, so this patch can be dropped On Sun, Dec 18, 2022 at 12:52 AM Yonggang Luo <luoyonggang@gmail.com> wrote: > > Signed-off-by: Yonggang Luo <luoyonggang@gmail.com> > --- > lib/color.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/lib/color.c b/lib/color.c > index 8063dc26..963a2ec2 100644 > --- a/lib/color.c > +++ b/lib/color.c > @@ -117,9 +117,14 @@ parse_opt (int key, char *arg, > if (strcmp (arg, values[i].str) == 0) > { > color_mode = values[i].mode; > +#ifdef _WIN32 > + if (color_mode == color_auto) > + color_mode = color_never; > +#else > if (color_mode == color_auto) > color_mode > = isatty (STDOUT_FILENO) ? color_always : color_never; > +#endif > break; > } > if (i == nvalues) > -- > 2.36.1.windows.1 > -- 此致 礼 罗勇刚 Yours sincerely, Yonggang Luo
diff --git a/lib/color.c b/lib/color.c index 8063dc26..963a2ec2 100644 --- a/lib/color.c +++ b/lib/color.c @@ -117,9 +117,14 @@ parse_opt (int key, char *arg, if (strcmp (arg, values[i].str) == 0) { color_mode = values[i].mode; +#ifdef _WIN32 + if (color_mode == color_auto) + color_mode = color_never; +#else if (color_mode == color_auto) color_mode = isatty (STDOUT_FILENO) ? color_always : color_never; +#endif break; } if (i == nvalues)