From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 05A08A0547; Sat, 6 Mar 2021 01:05:37 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DF3A422A341; Sat, 6 Mar 2021 01:05:15 +0100 (CET) Received: from mail-lf1-f44.google.com (mail-lf1-f44.google.com [209.85.167.44]) by mails.dpdk.org (Postfix) with ESMTP id E6E5F22A30B for ; Sat, 6 Mar 2021 01:05:13 +0100 (CET) Received: by mail-lf1-f44.google.com with SMTP id n16so6840966lfb.4 for ; Fri, 05 Mar 2021 16:05:13 -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=R/C5W283E+pQ5ayzmEE8X/XhCW6z/7JmlAdhB2l9IXU=; b=UrBNpBr+lq4ogC6O9gtXJrsYFsnC0o5Cb3q+cOUL488RKGj36SzCh9bQ93Qt90Mfnb Kl1s4I52DtUfAQcyaaVKRe0ph2korlBj1EH2QQO6wy/5MRLcbvKA89SlqKjQjpd4EadV qKm1f0jey3RTK+uQX0YMghyX0mIRACH39LHIC6qhGhP953/2VQsHyQCInnmep5dGgNck 3YTr8dzBNfukeH9f5k02zlcy8bNo7FQWE98HdRFUaFphvjrl3bp20VDPvx8sfA3wyhAw lh451rZ00q6m5nhh+GIQvOajExF3tomAzVv6IDPNZ12r/rcuNBWOFsvrfbmWTNJMTf7a KFfg== 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=R/C5W283E+pQ5ayzmEE8X/XhCW6z/7JmlAdhB2l9IXU=; b=YFs1EESeIGxAI6QqDaW56rXQOcKKYt2Re8LmyEOVtYdMexBypw9gJaPgEHjRkaHfgF H5Vwx2lw/gG1EsfPyL0Zbbs/xi5uLyoN24n4fpphnzcioGOMdrWwZAdvmQlkk8w+H65F wip+Chfuiz16AasLdQnai5GePCYADAwu/WmwniYR4jrkXw7mZ4L8qdpe7Mt1IgVvpU0D t+6lNxr07vpoZb77x7M/f4Ag6Bqf7XKsCVPFXIuf7cW7ZcM1Bjk6QWxpwNf5MVGJ8Lki MUrcNo/bPrVHqwTwrCMeQRHo+YKYDBIqcIP746trEUkMvHGBClVHmlUn3RqSBifW9Uap oY9w== X-Gm-Message-State: AOAM530qcxaZc89Jqj+z9PX2c6fO3plzdZmFiOwvqlI0Euso1LzscHEx 9CLn90HFEppw8f8wEwroN2Ej/VpYDMAhdw== X-Google-Smtp-Source: ABdhPJxtJOHSTkLNNNjEwrhlmTR8EQZC5vfw/EuGNvk2092MP6oT3SN+i1EOcvWsyBTocJ65lDUA4g== X-Received: by 2002:a19:7ec5:: with SMTP id z188mr7140321lfc.439.1614989113340; Fri, 05 Mar 2021 16:05:13 -0800 (PST) Received: from localhost.localdomain (broadband-37-110-65-23.ip.moscow.rt.ru. [37.110.65.23]) by smtp.gmail.com with ESMTPSA id s22sm494645ljd.28.2021.03.05.16.05.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Mar 2021 16:05:12 -0800 (PST) From: Dmitry Kozlyuk To: dev@dpdk.org Cc: Nick Connolly , Khoa To , Dmitry Kozlyuk , Bruce Richardson Date: Sat, 6 Mar 2021 03:04:59 +0300 Message-Id: <20210306000500.8698-4-dmitry.kozliuk@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210306000500.8698-1-dmitry.kozliuk@gmail.com> References: <20210221142819.6769-1-dmitry.kozliuk@gmail.com> <20210306000500.8698-1-dmitry.kozliuk@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v4 3/4] build: indicate usage at build time for public headers X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" DPDK code often relies on functions that are not standard C, but are found on all platforms, even if by slightly different names. Some headers provide macros or inline difinitions for such symbols. However, when placed in public headers, these symbols are unnecessarily exposed to DPDK consumers. Define RTE_BUILD_INTERNAL at build time. In its presense public headers can provide additional definitions for internal code, but hide them from external consumers. Signed-off-by: Dmitry Kozlyuk --- config/meson.build | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config/meson.build b/config/meson.build index 3cf560b8a..51a49855c 100644 --- a/config/meson.build +++ b/config/meson.build @@ -287,6 +287,9 @@ dpdk_conf.set('RTE_EAL_VFIO', is_linux) # specify -D_GNU_SOURCE unconditionally add_project_arguments('-D_GNU_SOURCE', language: 'c') +# specify that sources are building as part of DPDK +add_project_arguments('-DRTE_BUILD_INTERNAL', language: 'c') + # specify -D__BSD_VISIBLE for FreeBSD if is_freebsd add_project_arguments('-D__BSD_VISIBLE', language: 'c') -- 2.29.2