numam-dpdk/config
Bruce Richardson 5364de644a eal: support strlcpy function
The strncpy function is error prone for doing "safe" string copies, so
we generally try to use "snprintf" instead in the code. The function
"strlcpy" is a better alternative, since it better conveys the
intention of the programmer, and doesn't suffer from the non-null
terminating behaviour of it's n'ed brethern.

The downside of this function is that it is not available by default
on linux, though standard in the BSD's. It is available on most
distros by installing "libbsd" package.

This patch therefore provides the following in rte_string_fns.h to ensure
that strlcpy is available there:
* for BSD, include string.h as normal
* if RTE_USE_LIBBSD is set, include <bsd/string.h>
* if not set, fallback to snprintf for strlcpy

Using make build system, the RTE_USE_LIBBSD is a hard-coded value to "n",
but when using meson, it's automatically set based on what is available
on the platform.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
2018-04-04 17:33:08 +02:00
..
arm build: add meson cross-compilation config for dpaaX 2018-03-15 18:01:01 +01:00
x86 build: replace license text with SPDX tag 2018-01-30 21:58:59 +01:00
common_armv8a_linuxapp config: add dpaaX build for all Linux platforms 2018-03-15 17:44:16 +01:00
common_base eal: support strlcpy function 2018-04-04 17:33:08 +02:00
common_bsdapp config: replace Intel license headers with SPDX tags 2018-02-01 02:39:40 +01:00
common_linuxapp config: add dpaaX build for all Linux platforms 2018-03-15 17:44:16 +01:00
defconfig_arm64-armv8a-linuxapp-clang config: use SPDX tag for Cavium copyright files 2018-01-09 16:19:01 +01:00
defconfig_arm64-armv8a-linuxapp-gcc config: use SPDX tag for Cavium copyright files 2018-01-09 16:19:01 +01:00
defconfig_arm64-dpaa2-linuxapp-gcc config: remove useless lines for DPAA2 2018-04-04 00:03:25 +02:00
defconfig_arm64-dpaa-linuxapp-gcc config: enable dpaaX drivers for generic ARMv8 2018-01-30 16:54:50 +01:00
defconfig_arm64-thunderx-linuxapp-gcc config/thunderx: disable C11 memory model ring 2018-01-29 16:40:01 +01:00
defconfig_arm64-xgene1-linuxapp-gcc config: use SPDX tag for Cavium copyright files 2018-01-09 16:19:01 +01:00
defconfig_arm-armv7a-linuxapp-gcc config: fix bnx2x option for armv7a 2017-11-06 21:54:45 +01:00
defconfig_i686-native-linuxapp-gcc config: replace Intel license headers with SPDX tags 2018-02-01 02:39:40 +01:00
defconfig_i686-native-linuxapp-icc config: replace Intel license headers with SPDX tags 2018-02-01 02:39:40 +01:00
defconfig_ppc_64-power8-linuxapp-gcc net/bonding: enable in ppc64le 2017-07-31 19:58:41 +02:00
defconfig_x86_64-native-bsdapp-clang config: replace Intel license headers with SPDX tags 2018-02-01 02:39:40 +01:00
defconfig_x86_64-native-bsdapp-gcc config: replace Intel license headers with SPDX tags 2018-02-01 02:39:40 +01:00
defconfig_x86_64-native-linuxapp-clang config: replace Intel license headers with SPDX tags 2018-02-01 02:39:40 +01:00
defconfig_x86_64-native-linuxapp-gcc config: replace Intel license headers with SPDX tags 2018-02-01 02:39:40 +01:00
defconfig_x86_64-native-linuxapp-icc config: replace Intel license headers with SPDX tags 2018-02-01 02:39:40 +01:00
defconfig_x86_x32-native-linuxapp-gcc config: replace Intel license headers with SPDX tags 2018-02-01 02:39:40 +01:00
meson.build eal: support strlcpy function 2018-04-04 17:33:08 +02:00
rte_config.h config: remove old log level option 2018-04-04 13:43:33 +02:00