Whamcloud - gitweb
LU-8854 llapi: remove lustre specific strlcpy & strlcat functions 98/29798/6
authorJames Simmons <uja.ornl@yahoo.com>
Sat, 10 Feb 2018 16:18:53 +0000 (11:18 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 27 Feb 2018 03:46:14 +0000 (03:46 +0000)
commit971b0393a6d0e45051c9875efa2c7179cbf7d4c5
treecbada986b4b45743122c9d80c7c28eb030f4f788
parent9dffcdd2fa07520aab89edd15f627518d3f6cff2
LU-8854 llapi: remove lustre specific strlcpy & strlcat functions

In the days when lustre supported many more platforms some of those
platforms natively support strl[cpy|cat] but Linux has always lack
these functions. So lustre ended up providing its own versions of
these functions to fill in this functionality. Today Lustre only
supports the Linux platforms which has a version of libc that will
most likely never support strl[cat|cpy]. Since this is the case we
can remove the AC_CHECK_FUNCS since they only test against libc.
We could support detecting strl[cpy|cat] in another library but
many libraries provide their own version so the chances of collision
are high. The best solution is remove strlcpy and strlcat by
replacing those functions with string functions that are always
provided by the standard c library.

Change-Id: I72df93c8f83ed1aad80653fe0d1c4d54d1d8e2f2
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/29798
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
20 files changed:
libcfs/autoconf/lustre-libcfs.m4
libcfs/include/libcfs/util/string.h
libcfs/libcfs/util/param.c
libcfs/libcfs/util/string.c
lustre/tests/ll_dirstripe_verify.c
lustre/utils/gss/gssd.c
lustre/utils/gss/gssd.h
lustre/utils/gss/lgss_keyring.c
lustre/utils/l_getidentity.c
lustre/utils/lfs.c
lustre/utils/lhsmtool_posix.c
lustre/utils/libiam.c
lustre/utils/liblustreapi.c
lustre/utils/liblustreapi.map
lustre/utils/liblustreapi_json.c
lustre/utils/liblustreapi_util.c
lustre/utils/lustre_rsync.c
lustre/utils/mount_lustre.c
lustre/utils/obd.c
lustre/utils/portals.c