From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ot1-x329.google.com (mail-ot1-x329.google.com [IPv6:2607:f8b0:4864:20::329]) by sourceware.org (Postfix) with ESMTPS id B97653858412 for ; Wed, 1 Feb 2023 17:05:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B97653858412 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-ot1-x329.google.com with SMTP id 14-20020a9d010e000000b0068bdddfa263so2006347otu.2 for ; Wed, 01 Feb 2023 09:05:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=Sq2bS6OKH9OGVMzwrmwLBiFn09QfLa9qFmIoj/BIje4=; b=dV3ODN70Qb0UiwchNoekopPOKd/1oAeiXMt8I8pUxOPOo+MT2Y2kScQd4fwk+dPtDA S039pzAi1gjIq/l+LZjoCWKZBqK8ug98AAca0BfYDShTkS5AyaGtN/IWr0lFMqJmv65q 4jtH1IX8bXPDxk5XL8xZJaNNJ0RIoMWxP9v1xl/s7Q0iEaxmlLJbI/gGANWehAwsJjPm yLdq4PwXz1lkZFJBqj9E/WGg0tjA2/WB2h380oUrONUliPFyYcCgsiOqcqcFLSOnNy9M 4rQ4Xi/0B1CzGGskR2Onit7M0BtJnGq7hRrcknkdN6be6/EILXeyLQ5IOnh2SL/pRZiF XjVg== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Sq2bS6OKH9OGVMzwrmwLBiFn09QfLa9qFmIoj/BIje4=; b=IDq+o1ud3eFji/mtUJViXz0LrcW7cEs/B+afY2dCU5okRq0CDN9IXIDtxzlsPzLwvL apPYWvbr/SCvEos6QJrC5vOa2lQMXWKY1MmsLUqx7zFzJMyALREcs+Z4gZJcrGyy9ufT vKvqTi9nobnqcoB1nzfTHWpRxQmRy/da+6PI4VsaEspbPt/8aoSbNgaEnrNw6MmiRVM5 1QCAcoBP3JG0EmYiKrQUUPxzxlwQGNzJ5Pvjrv2R+zNGaaNPNpTfRbvgsA53RiXg71lX OIXPItaaI7zqr5S6I7n+II38BSfjC0YKJBaREPBUy9LHHbM/MWX/HBNzZma0uhHSUYCG UOhA== X-Gm-Message-State: AO0yUKVLKpl9jp72+oQQpMFsyienp32xYZuy4f/i7VW0SuVXdhVS+K7y Sm0eEZTYzGUbdzt2o1PKV+5009+9VTPk5RG3Rhg= X-Google-Smtp-Source: AK7set+AojViNtcByshiEsalowO0Xp8ZgxmgHAv98Uod1t9QwDKNXNpcD3ine8evgQ4yF+PWU5YAxQ== X-Received: by 2002:a9d:7b49:0:b0:68c:f7f5:f53d with SMTP id f9-20020a9d7b49000000b0068cf7f5f53dmr1677715oto.0.1675271118390; Wed, 01 Feb 2023 09:05:18 -0800 (PST) Received: from mandiga.. ([2804:1b3:a7c2:1887:d2ed:98c2:d2cc:bf06]) by smtp.gmail.com with ESMTPSA id b17-20020a056830311100b006863ccbf067sm8077090ots.74.2023.02.01.09.05.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Feb 2023 09:05:17 -0800 (PST) From: Adhemerval Zanella To: libc-alpha@sourceware.org, Richard Henderson , Noah Goldstein , Jeff Law , Xi Ruoyao Subject: [PATCH v11 26/29] string: Hook up the default implementation on test-stpcpy Date: Wed, 1 Feb 2023 14:04:03 -0300 Message-Id: <20230201170406.303978-27-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230201170406.303978-1-adhemerval.zanella@linaro.org> References: <20230201170406.303978-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 List-Id: --- string/test-stpcpy.c | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/string/test-stpcpy.c b/string/test-stpcpy.c index c7a416f93a..5d344b6a23 100644 --- a/string/test-stpcpy.c +++ b/string/test-stpcpy.c @@ -26,26 +26,36 @@ #include "test-string.h" #ifndef WIDE # define CHAR char -# define SIMPLE_STPCPY simple_stpcpy # define STPCPY stpcpy #else # include # define CHAR wchar_t -# define SIMPLE_STPCPY simple_wcpcpy # define STPCPY wcpcpy #endif /* !WIDE */ -CHAR *SIMPLE_STPCPY (CHAR *, const CHAR *); - -IMPL (SIMPLE_STPCPY, 0) IMPL (STPCPY, 1) -CHAR * -SIMPLE_STPCPY (CHAR *dst, const CHAR *src) -{ - while ((*dst++ = *src++) != '\0'); - return dst - 1; -} +/* Also check the generic implementation. */ +#undef STPCPY +#undef weak_alias +#define weak_alias(a, b) +#undef libc_hidden_def +#define libc_hidden_def(a) +#undef libc_hidden_builtin_def +#define libc_hidden_builtin_def(a) +#undef attribute_hidden +#define attribute_hidden +#ifndef WIDE +# define STPCPY __stpcpy_default +# include "string/stpcpy.c" +IMPL (__stpcpy_default, 1) +#else +# define __wcslen wcslen +# define __wmemcpy wmemcpy +# define WCPCPY __wcpcpy_default +# include "wcsmbs/wcpcpy.c" +IMPL (__wcpcpy_default, 1) +#endif #undef CHAR #include "test-strcpy.c" -- 2.34.1