From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) by sourceware.org (Postfix) with ESMTPS id 377E8385840D for ; Wed, 27 Oct 2021 12:43:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 377E8385840D Received: by mail-pf1-x436.google.com with SMTP id t184so2675749pfd.0 for ; Wed, 27 Oct 2021 05:43:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=//sxJfyYchOWmrRpVuJ9xFnzg+hNUFfUctVp3fAMKSQ=; b=Xw48M5OwCyc5xrUu3BGU7kdnB/nkBnB3Hwyoo4NN3FQgoYuyyPmDI5Teq60fLax+gS +JX8LHHoNvNcV3g10JI+OpqO7QuBNbRMjUOBzXuJ0oVSMFNcZ/6Equgzj5Mcc6zhbjyq rcKt0tMI39+oUk/UhA8f/aSYIaoGo33eeNNUHcHqfH8T0jeLIHfIz9DxE9JJk8riEXwn GshxCFWXjy15++E0inFxGN5F6JvhjgzdCHUYbfJnthB21f6xOitp1BcQKcMS329TAXVM pnMsS4JrUD9pToL5FG49LGG8bGXtDvhgYjST5f838mW6S6ac9u5xu22D4SsSRo29dWPw S/xw== X-Gm-Message-State: AOAM532V83eFilIpKc8Jtk1Qn7rmrBPpODMt3jbMAIXQnuOsRx6Dmp41 TpBNkEPkB9gdtZb0IF7iElZ1ayq8GwJR2mCnIC/fF67TpHY= X-Google-Smtp-Source: ABdhPJxCrN/WGQvDZLipx0cALUpU+hRRf3RVn1+gnwLRZL6/8IZ/i6GLs1pACjzei7ExWU01x0JQAVgwSLWq6ZCrxvs= X-Received: by 2002:a62:7858:0:b0:47c:1cf3:d95 with SMTP id t85-20020a627858000000b0047c1cf30d95mr8024896pfc.60.1635338583332; Wed, 27 Oct 2021 05:43:03 -0700 (PDT) MIME-Version: 1.0 References: <20211027024323.1199441-1-goldstein.w.n@gmail.com> In-Reply-To: <20211027024323.1199441-1-goldstein.w.n@gmail.com> From: "H.J. Lu" Date: Wed, 27 Oct 2021 05:42:26 -0700 Message-ID: Subject: Re: [PATCH v1 1/6] String: Add __memcmpeq as build target To: Noah Goldstein Cc: GNU C Library , "Carlos O'Donell" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3030.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Oct 2021 12:43:06 -0000 On Tue, Oct 26, 2021 at 7:43 PM Noah Goldstein wrote: > > No bug. This commit just adds __memcmpeq as a build target so that > implementations for __memcmpeq that are not just aliases to memcmp can > be supported. > --- > string/Makefile | 2 +- > string/memcmpeq.c | 24 ++++++++++++++++++++++++ > 2 files changed, 25 insertions(+), 1 deletion(-) > create mode 100644 string/memcmpeq.c > > diff --git a/string/Makefile b/string/Makefile > index 40d6fac133..2199dd30b7 100644 > --- a/string/Makefile > +++ b/string/Makefile > @@ -34,7 +34,7 @@ routines := strcat strchr strcmp strcoll strcpy strcspn \ > strerror _strerror strlen strnlen \ > strncat strncmp strncpy \ > strrchr strpbrk strsignal strspn strstr strtok \ > - strtok_r strxfrm memchr memcmp memmove memset \ > + strtok_r strxfrm memchr memcmp memcmpeq memmove memset \ > mempcpy bcopy bzero ffs ffsll stpcpy stpncpy \ > strcasecmp strncase strcasecmp_l strncase_l \ > memccpy memcpy wordcopy strsep strcasestr \ > diff --git a/string/memcmpeq.c b/string/memcmpeq.c > new file mode 100644 > index 0000000000..08726325a8 > --- /dev/null > +++ b/string/memcmpeq.c > @@ -0,0 +1,24 @@ > +/* Copyright (C) 1991-2021 Free Software Foundation, Inc. > + This file is part of the GNU C Library. > + > + The GNU C Library is free software; you can redistribute it and/or > + modify it under the terms of the GNU Lesser General Public > + License as published by the Free Software Foundation; either > + version 2.1 of the License, or (at your option) any later version. > + > + The GNU C Library is distributed in the hope that it will be useful, > + but WITHOUT ANY WARRANTY; without even the implied warranty of > + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > + Lesser General Public License for more details. > + > + You should have received a copy of the GNU Lesser General Public > + License along with the GNU C Library; if not, see > + . */ > + > +/* This file is intentionally left empty. It exists so that both > + architectures which implement __memcmpeq seperately from memcmp and > + architectures which implement __memcmpeq by having it alias memcmp will > + build. > + > + The alias for __memcmpeq to memcmp for the C implementation is in > + memcmp.c. */ > -- > 2.25.1 > LGTM. Reviewed-by: H.J. Lu Thanks. H.J.