Am Freitag, 10. November 2017, 10:54:53 CET schrieb Jorge Almeida: > I'm trying to use memset_s() but the system (glibc?) doesn't know > about it. I also tried to compile against musl, same result. > > There's precious little info about memset_s in the net. Does it exist > at all? No man page. > > (https://www.cs.helsinki.fi/group/boi2016/doc/cppreference/reference/en.cppr > eference.com/w/c/string/byte/memset.html) > > What I tried: > > #include > #include > #include > #define __STDC_WANT_LIB_EXT1__ 1 > #include > #include > > int main(int argc, char** argv){ > #ifndef __STDC_LIB_EXT1__ > printf("CRAP\n"); > #else > printf("COOL\n"); > #endif > } > > Compiled with -std=c11 > > You can guess what the output is. > > Someone using it? > > Jorge Almeida It seems as though it is simply not implemented, I found a variety of links that all support this: https://stackoverflow.com/a/40162721 https://stackoverflow.com/questions/38322363/when-will-the-safe-string-functions-of-c11-be-part-of-glibc https://gcc.gnu.org/wiki/C11Status (which states that Annex K is not implemented) http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1967.htm HTH -- Marc Joliet -- "People who think they know everything really annoy those of us who know we don't" - Bjarne Stroustrup