2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-24 13:13:57 +08:00
linux-next/tools/include/linux
Arnaldo Carvalho de Melo c8b5f2c96d tools: Introduce str_error_r()
The tools so far have been using the strerror_r() GNU variant, that
returns a string, be it the buffer passed or something else.

But that, besides being tricky in cases where we expect that the
function using strerror_r() returns the error formatted in a provided
buffer (we have to check if it returned something else and copy that
instead), breaks the build on systems not using glibc, like Alpine
Linux, where musl libc is used.

So, introduce yet another wrapper, str_error_r(), that has the GNU
interface, but uses the portable XSI variant of strerror_r(), so that
users rest asured that the provided buffer is used and it is what is
returned.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-d4t42fnf48ytlk8rjxs822tf@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2016-07-12 15:19:47 -03:00
..
atomic.h tools include: Add basic atomic.h implementation from the kernel sources 2015-05-08 16:11:05 -03:00
bitmap.h tools lib: Move bitmap.[ch] from tools/perf/ to tools/{lib,include}/ 2016-01-08 12:35:46 -03:00
bitops.h tools: Remove bitops/hweight usage of bits in tools/perf 2015-01-16 17:49:29 -03:00
compiler.h tools include: Fix strict-aliasing rules breakage 2015-10-13 11:43:16 -03:00
err.h tools: Fix shadowed declaration in err.h 2015-09-30 18:34:22 -03:00
export.h tools: Restore export.h 2015-08-25 09:44:22 +02:00
filter.h perf tools: Copy linux/filter.h to tools/include 2015-09-02 16:30:46 -03:00
hash.h perf tools: Move hash.h header 2014-02-18 09:34:49 -03:00
hashtable.h tools: Copy hashtable.h into tools directory 2016-03-09 10:48:09 +01:00
kernel.h perf tools: Move linux/kernel.h to tools/include 2015-06-02 15:27:04 -03:00
list.h tools: Make list.h self-sufficient 2016-01-12 12:42:07 -03:00
log2.h tools: Adopt roundup_pow_of_two 2014-12-17 11:58:15 -03:00
poison.h tools: Move tools/perf/util/include/linux/{list.h,poison.h} to tools/include 2015-06-02 19:07:29 -03:00
rbtree_augmented.h tools: Copy rbtree_augmented.h from the kernel 2015-07-05 22:59:05 -03:00
rbtree.h tools: Move rbtree.h from tools/perf/ 2015-07-05 22:54:01 -03:00
string.h tools: Introduce str_error_r() 2016-07-12 15:19:47 -03:00
stringify.h tools include: Copy linux/stringify.h from the kernel 2016-03-23 15:14:27 -03:00
types.h tools include: add __aligned_u64 to types.h. 2015-05-18 10:17:32 -03:00