From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 813BEC432C0 for ; Tue, 3 Dec 2019 10:35:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 57E6520684 for ; Tue, 3 Dec 2019 10:35:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="a9Bbf3hs" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725997AbfLCKfc (ORCPT ); Tue, 3 Dec 2019 05:35:32 -0500 Received: from mail-lj1-f193.google.com ([209.85.208.193]:42782 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726057AbfLCKfc (ORCPT ); Tue, 3 Dec 2019 05:35:32 -0500 Received: by mail-lj1-f193.google.com with SMTP id e28so3151816ljo.9 for ; Tue, 03 Dec 2019 02:35:30 -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=xcPmnM5x0UQ4YKDSV2MogiGotivYJlB+VWUCe41AAqY=; b=a9Bbf3hsMiJUWAwE0nwQ2dzVlSoh39i+NrwcYGCt+k3iBQBYYqDoVl4fhPj74tMUoq b0C3vt9FC37s65kZ7LVIW3uMzPpt0U9gWl2Jf15/+b5T9mm//w6k1wMjQ8Cq5I6ZnqyJ XtyGrA2T6GJE9C3bA8x1txU9g4rN8XkvTOA7UNf7HhpAe8vudYYEkHRq8rHd2vvD8pUp EMYjfyVKB03zqcDUSxq40l0Zzs/ct066tflTj4K7wFqapiCYg3U9RA+zerutedT39FmR W+BoARFZiMup29C3B81+9rM77EM6ha9GxPy1xk3vKCa6gLaxXDUtShi1PvO+FawjrWsx FJBA== 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=xcPmnM5x0UQ4YKDSV2MogiGotivYJlB+VWUCe41AAqY=; b=FBvgOzldAJI/VpI+nOppGr+bMG6iAfPv0SFG4MU4BEdWRI8+zyifNgh4hJbmfUTz9P QnlFDhvDpgIuTAE8FQXxBC0ijpCBD1JAEafiyc3DnARjevTt9KvynUtr8/pmjo/p9xb2 tstKc75Lg26PZAGU2Yj3uGV5UahSu27+7ZcVTJb2uUcHY8HVti09v2vJa7cTWq/cWvjo BzqEpZaKsv6RXytOGYdAaJVGsV5nCFlCFDX8JbYzw6nrUkZS8Yi/ae4TbDvUmjm/zh9V /8vv23+MfVf43vh0QbUt/8+zfSlrz/1Xnl4Wf++XcnC5EkS7PnqNPTBVTw3pZgXR0AeV h3Ow== X-Gm-Message-State: APjAAAUK9nV3we7Gjd5fa5lUMRAepRKveVwVntdLqcJErImXJkx6tbIx 9REUzbqEVsCuHjwxUvTL13I= X-Google-Smtp-Source: APXvYqyFT25Tl2N+MCuYwIUPKEP2LhaUO+Xm5G6kjN2px694ycj1wI6PQcljD7Fg4kV4wilKM0FE0A== X-Received: by 2002:a05:651c:112c:: with SMTP id e12mr2158080ljo.169.1575369329821; Tue, 03 Dec 2019 02:35:29 -0800 (PST) Received: from oberon.eng.vmware.com ([146.247.46.5]) by smtp.gmail.com with ESMTPSA id t9sm1053023lfl.51.2019.12.03.02.35.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Dec 2019 02:35:29 -0800 (PST) From: "Tzvetomir Stoyanov (VMware)" To: rostedt@goodmis.org Cc: linux-trace-devel@vger.kernel.org Subject: [PATCH v17 03/18] trace-cmd: Add implementations of htonll() and ntohll() Date: Tue, 3 Dec 2019 12:35:07 +0200 Message-Id: <20191203103522.482684-4-tz.stoyanov@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191203103522.482684-1-tz.stoyanov@gmail.com> References: <20191203103522.482684-1-tz.stoyanov@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-trace-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-trace-devel@vger.kernel.org From: Tzvetomir Stoyanov Implementations of htonll() and ntohll() are added as macros, if they are not already defined. Signed-off-by: Tzvetomir Stoyanov --- include/trace-cmd/trace-msg.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/trace-cmd/trace-msg.h b/include/trace-cmd/trace-msg.h index aab8a69..654ca43 100644 --- a/include/trace-cmd/trace-msg.h +++ b/include/trace-cmd/trace-msg.h @@ -12,4 +12,14 @@ extern unsigned int page_size; +#ifndef htonll +# if __BYTE_ORDER == __LITTLE_ENDIAN +#define htonll(x) __bswap_64(x) +#define ntohll(x) __bswap_64(x) +#else +#define htonll(x) (x) +#define ntohll(x) (x) +#endif +#endif + #endif /* _TRACE_MSG_H_ */ -- 2.23.0