From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <adrien.mazarguil@6wind.com>
Received: from mail-wm0-f52.google.com (mail-wm0-f52.google.com [74.125.82.52])
 by dpdk.org (Postfix) with ESMTP id 6FC683230
 for <dev@dpdk.org>; Thu,  7 Jul 2016 17:49:41 +0200 (CEST)
Received: by mail-wm0-f52.google.com with SMTP id n127so21661098wme.1
 for <dev@dpdk.org>; Thu, 07 Jul 2016 08:49:41 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=6wind-com.20150623.gappssmtp.com; s=20150623;
 h=from:to:subject:date:message-id:in-reply-to:references;
 bh=3bsb13osrNMZIJquS28YIGxqp5MQa3+HKBIA20qRuYU=;
 b=hbOVP+zGHbEEnOD/jCwzSHtyAcxgSLjtqyGz1dmLpJWzk9CRGFkFZ67+whR+8HOPr8
 2dCZ2u1uqmQ9RF3hQplDvIZaEbAiV4mULRH28EFNaBwvwBxm0t/tZCjPC/mr8YOHKXcW
 C6xdfZtICr94Yxj2Ga+2qYT0vmlQlOpTu5qhF2vxdLyBZyQ8QwOSTHGbmE++qiYwkMG1
 ZiJRykrxmvogLq27O4RCHlggMHJ/wS5qA9LZ3Kk4iIj133ktx+YZR78T5URrNFqWqV7o
 NOLAqahjMQwqExKmvVaCZhftF+vM5/vYf6CzgYjTqSgs7ZFS72TJ/rlou7gA2r11+7Fn
 kLDw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to
 :references;
 bh=3bsb13osrNMZIJquS28YIGxqp5MQa3+HKBIA20qRuYU=;
 b=QpAAy6+dkAIRf6B4XGTDh4k89qI0xS1phzlesfaHDKEvsCfseKoP3frGsTq4HnkRep
 eV+Gm03denO2sFJPdkg5Z92r4Nyjl6c45HYRZQE4GsHc+33oc0RSrKD2UbnosscfhJOB
 1ZsJ4LDIWwd+DzNmL7r4BYGxs7PIuLgU09s+9xfE7vQ36V9szty1va1cqVMl/nFIXKQq
 20zuP0KLb1SHNy6vuSAN3UwtsYwe1HqyfRkbmLORwAEhYgdinTfqdULeBwLs1WnvHPXB
 M6EodcO/jF7aFOPmmw4yUJRSVNKTOKZMpwA8mfm/znXwLyQpYyMxQ+AzyNI5mv2aTwj/
 JBUw==
X-Gm-Message-State: ALyK8tLmuEyCsVxTzlt+9T2VFEZOvxAZawiEEugbG4iInW/mUGlCiJuJSjaHUiDjWfDWUNTZ
X-Received: by 10.28.152.202 with SMTP id a193mr27737025wme.98.1467906580697; 
 Thu, 07 Jul 2016 08:49:40 -0700 (PDT)
Received: from 6wind.com (guy78-3-82-239-227-177.fbx.proxad.net.
 [82.239.227.177])
 by smtp.gmail.com with ESMTPSA id b4sm3686440wjd.16.2016.07.07.08.49.39
 for <dev@dpdk.org> (version=TLS1_2 cipher=AES128-SHA bits=128/128);
 Thu, 07 Jul 2016 08:49:40 -0700 (PDT)
From: Adrien Mazarguil <adrien.mazarguil@6wind.com>
To: dev@dpdk.org
Date: Thu,  7 Jul 2016 17:49:22 +0200
Message-Id: <cover.1467905466.git.adrien.mazarguil@6wind.com>
X-Mailer: git-send-email 2.1.4
In-Reply-To: <cover.1467715254.git.adrien.mazarguil@6wind.com>
References: <cover.1467715254.git.adrien.mazarguil@6wind.com>
Subject: [dpdk-dev] [PATCH v3 00/11] Fix build errors related to exported
	headers
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: patches and discussions about DPDK <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Thu, 07 Jul 2016 15:49:41 -0000

DPDK uses GNU C language extensions in most of its code base. This is fine
for internal source files whose compilation flags are controlled by DPDK,
however user applications that use exported "public" headers may experience
compilation failures when enabling strict error/standard checks (-std and
-pedantic for instance).

Exported headers are installed system-wide and must be as clean as possible
so applications do not have to resort to workarounds.

This patchset affects exported headers only, compilation problems are
addressed as follows:

- Adding the __extension__ keyword to nonstandard constructs (same method
  as existing libraries when there is no other choice).
- Adding the __extension__ keyword to C11 constructs to remain compatible
  with pure C99.
- Adding missing includes so exported files can be included out of order
  and on their own.
- Fixing GNU printf-like variadic macros as there is no magic keyword for
  these.

Changes in v3:

- Fixed compilation issue on ARM and POWER8 due to missing parenthesis.
- Added bit-field fix for rte_kni.h.

Changes in v2:

- Rebased on top of the current HEAD.
- Added script to check headers automatically (check-includes.sh), for both
  C and C++ compilation.
- Updated test-build.sh to use it.
- Fixed consistency of new #include directives, now inside extern "C"
  blocks for files that already do that (Jan, fixing these was too much
  work for this patchset so I settled on this solution in the meantime).
- Updated headlines to address check-git-log.sh complaints.

Adrien Mazarguil (11):
  lib: work around braced-groups within expressions
  lib: work around large enum values
  lib: use C99 syntax for zero-size arrays
  lib: work around nonstandard bit-fields
  lib: work around structs with no members
  lib: work around unnamed structs/unions
  lib: add missing include dependencies
  lib: work around forward reference to enum types
  lib: remove named variadic macros in exported headers
  lib: hide static functions never defined
  scripts: check compilation of exported header files

 MAINTAINERS                                     |   1 +
 lib/librte_acl/rte_acl.h                        |   2 +-
 lib/librte_cfgfile/rte_cfgfile.h                |   2 +
 lib/librte_cmdline/cmdline.h                    |   1 +
 lib/librte_cmdline/cmdline_parse_portlist.h     |   1 +
 lib/librte_cmdline/cmdline_socket.h             |   3 +
 lib/librte_cryptodev/rte_crypto.h               |   2 +
 lib/librte_cryptodev/rte_crypto_sym.h           |   3 +
 lib/librte_cryptodev/rte_cryptodev.h            |  40 ++-
 lib/librte_cryptodev/rte_cryptodev_pmd.h        |   6 +-
 .../common/include/arch/arm/rte_byteorder.h     |   2 +
 .../common/include/arch/arm/rte_memcpy_32.h     |   3 +-
 .../common/include/arch/arm/rte_prefetch_32.h   |   1 +
 .../common/include/arch/arm/rte_prefetch_64.h   |   1 +
 .../common/include/arch/arm/rte_vect.h          |   1 +
 .../common/include/arch/ppc_64/rte_atomic.h     |   1 +
 .../common/include/arch/ppc_64/rte_byteorder.h  |   1 +
 .../common/include/arch/ppc_64/rte_cycles.h     |   2 +
 .../common/include/arch/ppc_64/rte_memcpy.h     |   3 +-
 .../common/include/arch/ppc_64/rte_prefetch.h   |   1 +
 .../common/include/arch/x86/rte_atomic.h        |   2 +
 .../common/include/arch/x86/rte_atomic_32.h     |   9 +
 .../common/include/arch/x86/rte_atomic_64.h     |   8 +
 .../common/include/arch/x86/rte_byteorder.h     |   2 +
 .../common/include/arch/x86/rte_byteorder_32.h  |   7 +
 .../common/include/arch/x86/rte_byteorder_64.h  |   7 +
 .../common/include/arch/x86/rte_cycles.h        |   2 +
 .../common/include/arch/x86/rte_memcpy.h        |   4 +-
 .../common/include/arch/x86/rte_prefetch.h      |   1 +
 .../common/include/arch/x86/rte_rtm.h           |   1 +
 .../common/include/arch/x86/rte_vect.h          |   8 +-
 .../common/include/generic/rte_atomic.h         |   1 +
 .../common/include/generic/rte_byteorder.h      |   2 +
 .../common/include/generic/rte_cpuflags.h       |   3 +
 .../common/include/generic/rte_memcpy.h         |   4 +
 lib/librte_eal/common/include/rte_common.h      |  22 +-
 lib/librte_eal/common/include/rte_devargs.h     |   1 +
 lib/librte_eal/common/include/rte_eal.h         |   1 +
 lib/librte_eal/common/include/rte_interrupts.h  |   2 +
 lib/librte_eal/common/include/rte_memory.h      |   4 +
 lib/librte_eal/common/include/rte_memzone.h     |   2 +
 lib/librte_eal/common/include/rte_time.h        |   8 +
 lib/librte_eal/common/include/rte_version.h     |   1 +
 .../eal/include/exec-env/rte_interrupts.h       |   1 +
 .../eal/include/exec-env/rte_kni_common.h       |   7 +-
 lib/librte_ether/rte_dev_info.h                 |   2 +
 lib/librte_ether/rte_eth_ctrl.h                 |   4 +
 lib/librte_ether/rte_ethdev.h                   |   4 +
 lib/librte_hash/rte_fbk_hash.h                  |   2 +-
 lib/librte_hash/rte_thash.h                     |   3 +
 lib/librte_ip_frag/rte_ip_frag.h                |   2 +-
 lib/librte_kni/rte_kni.h                        |   1 +
 lib/librte_lpm/rte_lpm.h                        |   7 +-
 lib/librte_lpm/rte_lpm_neon.h                   |   1 +
 lib/librte_lpm/rte_lpm_sse.h                    |   1 +
 lib/librte_mbuf/rte_mbuf.h                      |   9 +
 lib/librte_mempool/rte_mempool.h                |   3 +
 lib/librte_pdump/rte_pdump.h                    |   4 +
 lib/librte_pipeline/rte_pipeline.h              |   4 +-
 lib/librte_reorder/rte_reorder.h                |   2 +
 lib/librte_ring/rte_ring.h                      |   2 +-
 lib/librte_sched/rte_bitmap.h                   |   3 +-
 lib/librte_sched/rte_reciprocal.h               |   2 +
 lib/librte_sched/rte_sched_common.h             |   1 +
 lib/librte_timer/rte_timer.h                    |   2 +
 scripts/check-includes.sh                       | 286 +++++++++++++++++++
 scripts/test-build.sh                           |  14 +
 67 files changed, 513 insertions(+), 33 deletions(-)
 create mode 100755 scripts/check-includes.sh

-- 
2.1.4