numam-dpdk/lib
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
..
librte_acl build: replace license text with SPDX tag 2018-01-30 21:58:59 +01:00
librte_bbdev bbdev: fix exported dynamic log type 2018-02-06 18:51:44 +01:00
librte_bitratestats bitratestats: fix library version in meson build 2018-03-28 00:07:35 +02:00
librte_cfgfile build: replace license text with SPDX tag 2018-01-30 21:58:59 +01:00
librte_cmdline cmdline: use SPDX tags 2018-02-01 02:27:22 +01:00
librte_compat compat: relicense some files 2018-02-06 23:13:47 +01:00
librte_cryptodev cryptodev: fix library version in meson build 2018-03-28 00:07:35 +02:00
librte_distributor build: set compat lib as universal dependency 2018-01-30 21:59:00 +01:00
librte_eal eal: support strlcpy function 2018-04-04 17:33:08 +02:00
librte_efd build: replace license text with SPDX tag 2018-01-30 21:58:59 +01:00
librte_ether ethdev: fix port accessing after release 2018-03-30 14:08:44 +02:00
librte_eventdev eventdev: fix library version in meson build 2018-03-28 00:07:35 +02:00
librte_flow_classify flow_classify: remove void pointer cast 2018-03-30 14:08:43 +02:00
librte_gro build: replace license text with SPDX tag 2018-01-30 21:58:59 +01:00
librte_gso build: replace license text with SPDX tag 2018-01-30 21:58:59 +01:00
librte_hash build: set compat lib as universal dependency 2018-01-30 21:59:00 +01:00
librte_ip_frag build: replace license text with SPDX tag 2018-01-30 21:58:59 +01:00
librte_jobstats build: replace license text with SPDX tag 2018-01-30 21:58:59 +01:00
librte_kni kni: set initial value for MTU 2018-02-01 01:03:26 +01:00
librte_kvargs kvargs: fix syntax in comments 2018-03-28 00:43:22 +02:00
librte_latencystats ethdev: return named opaque type instead of void pointer 2018-03-30 14:08:44 +02:00
librte_lpm lpm: fix allocation of an existing object 2018-02-01 00:35:06 +01:00
librte_mbuf mbuf: fix logic of user mempool ops API 2018-02-06 01:02:12 +01:00
librte_member build: replace license text with SPDX tag 2018-01-30 21:58:59 +01:00
librte_mempool mempool: fix library version in meson build 2018-03-28 00:07:35 +02:00
librte_meter meter: fix library version in meson build 2018-03-28 00:07:35 +02:00
librte_metrics build: replace license text with SPDX tag 2018-01-30 21:58:59 +01:00
librte_net net: use SPDX tags 2018-02-01 02:27:22 +01:00
librte_pci pci: use z specifier to format size_t 2018-04-04 13:43:33 +02:00
librte_pdump ethdev: return named opaque type instead of void pointer 2018-03-30 14:08:44 +02:00
librte_pipeline build: replace license text with SPDX tag 2018-01-30 21:58:59 +01:00
librte_port build: replace license text with SPDX tag 2018-01-30 21:58:59 +01:00
librte_power build: replace license text with SPDX tag 2018-01-30 21:58:59 +01:00
librte_rawdev rawdev: add self test 2018-01-31 15:35:56 +01:00
librte_reorder build: replace license text with SPDX tag 2018-01-30 21:58:59 +01:00
librte_ring lib: remove unused map symbols 2018-02-13 14:55:01 +01:00
librte_sched build: replace license text with SPDX tag 2018-01-30 21:58:59 +01:00
librte_security build: replace license text with SPDX tag 2018-01-30 21:58:59 +01:00
librte_table table: fix library version in meson build 2018-03-28 00:07:35 +02:00
librte_timer build: replace license text with SPDX tag 2018-01-30 21:58:59 +01:00
librte_vhost vhost: avoid populate guest memory 2018-03-30 17:25:45 +02:00
Makefile rawdev: introduce raw device library 2018-01-31 15:35:01 +01:00
meson.build build: detect micro-arch on ARM 2018-01-30 21:59:00 +01:00