From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oo1-xc2c.google.com (mail-oo1-xc2c.google.com [IPv6:2607:f8b0:4864:20::c2c]) by sourceware.org (Postfix) with ESMTPS id 17E043839DF6 for ; Mon, 13 Feb 2023 13:56:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 17E043839DF6 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-oo1-xc2c.google.com with SMTP id r192-20020a4a37c9000000b00517677496d0so1181576oor.13 for ; Mon, 13 Feb 2023 05:56:11 -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=LnQHGuJRuPK6Q02vGLi8c7TjYocWOm+hPY7zU1wnad4=; b=TbHs7kM1HympBIAAvTHMG/v95v6q2S3MwBCMj9sz8Tn3kuCxgA+wuJXkt9aTwJG2No XZJ1z02oOuJhOMLIvNhJlS9tIRxupf/NbIIoWOMqiDALtRd8pGzKg5fYcMtsOl4oLb/L lrda0zTkkjkQ2Jj4TBPCavSLydQfguMF565/8vGcpbdQYyGgooE5IfB4qKWK7qLocPGQ yC/8QqrKD9Ve+EfMn5kw/k9w7tsR39SZVJRNbRhQ3UNtxsZHRXAYXxA/f/6IeoE5rbiT RAqHg04ITWTJx9yqosA72wJ/1s7e0ehCK2RYbJEqh0UY90JA23Db2A8tmQRuXo4qngS2 nwcg== 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=LnQHGuJRuPK6Q02vGLi8c7TjYocWOm+hPY7zU1wnad4=; b=32K3M45rvb1h1ifZ7iOTa2s65s2i/AwQ2X4vqYTYlG+B8UlqVtof8S0CLElFZxkCY9 +vTm8Z7lr1pZHROt0Wqn736/IUELZsrllrK+RxUCChJa/KbD8z27HTg1g6tdthJKnvb+ YMCj0lKOWkvsd7llg4rLlulbyL/c92SJeV97Wfut/Ykd2Eq3+/gkKF+XMuQz5LviXBPA nbTanaCccH6GeB0aX/syJWD8Y8NvnfkbeOo8bnykI8dxDwzdFZRchdi3x+nr6Ei6BAUn /Vyl9z15+gKTuCWcTEM0PP5WNBfbvcNfPKqw+Ry7lnujMO5ewD0qN3A7RDKE2sFJg3cx 9YJg== X-Gm-Message-State: AO0yUKVrngdFCc7KiRGKsPnuvqAf8c/0SphbFqJkxfe/wGUGFAndOaV8 FRt2oL36T4Bli1jHzaY628FR7pq9G+STPeLARws= X-Google-Smtp-Source: AK7set+bqFnv1jvGxBiV/6+PbwCGPiY9rzptU7n/fk0BMWEjfBbDCrvVJ1jI6Yv4jmaQE4vPb2XFBg== X-Received: by 2002:a4a:e2c6:0:b0:51a:a3fd:69d3 with SMTP id l6-20020a4ae2c6000000b0051aa3fd69d3mr12087095oot.2.1676296569772; Mon, 13 Feb 2023 05:56:09 -0800 (PST) Received: from mandiga.. ([2804:1b3:a7c2:f662:138b:cd0c:7b7a:8860]) by smtp.gmail.com with ESMTPSA id y11-20020a4ade0b000000b0051762a73553sm4797168oot.18.2023.02.13.05.56.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Feb 2023 05:56:09 -0800 (PST) From: Adhemerval Zanella To: libc-alpha@sourceware.org, Wilco Dijkstra Subject: [PATCH 4/7] resolv: Remove _STRING_ARCH_unaligned usage Date: Mon, 13 Feb 2023 10:55:55 -0300 Message-Id: <20230213135558.3328727-5-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230213135558.3328727-1-adhemerval.zanella@linaro.org> References: <20230213135558.3328727-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.6 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: GCC with default implementation already generates optimized code. Checked on x86_64-linux-gnu and i686-linux-gnu. --- include/arpa/nameser.h | 36 ------------------------------------ 1 file changed, 36 deletions(-) diff --git a/include/arpa/nameser.h b/include/arpa/nameser.h index c27e7886b7..0ef5ab409f 100644 --- a/include/arpa/nameser.h +++ b/include/arpa/nameser.h @@ -13,42 +13,6 @@ extern const struct _ns_flagdata _ns_flagdata[] attribute_hidden; -#if _STRING_ARCH_unaligned - -# undef NS_GET16 -# define NS_GET16(s, cp) \ - do { \ - const uint16_t *t_cp = (const uint16_t *) (cp); \ - (s) = ntohs (*t_cp); \ - (cp) += NS_INT16SZ; \ - } while (0) - -# undef NS_GET32 -# define NS_GET32(l, cp) \ - do { \ - const uint32_t *t_cp = (const uint32_t *) (cp); \ - (l) = ntohl (*t_cp); \ - (cp) += NS_INT32SZ; \ - } while (0) - -# undef NS_PUT16 -# define NS_PUT16(s, cp) \ - do { \ - uint16_t *t_cp = (uint16_t *) (cp); \ - *t_cp = htons (s); \ - (cp) += NS_INT16SZ; \ - } while (0) - -# undef NS_PUT32 -# define NS_PUT32(l, cp) \ - do { \ - uint32_t *t_cp = (uint32_t *) (cp); \ - *t_cp = htonl (l); \ - (cp) += NS_INT32SZ; \ - } while (0) - -#endif - extern unsigned int __ns_get16 (const unsigned char *) __THROW; extern unsigned long __ns_get32 (const unsigned char *) __THROW; int __ns_name_ntop (const unsigned char *, char *, size_t) __THROW; -- 2.34.1