From: | Marc Joliet <marcec@×××.de> | ||
---|---|---|---|
To: | gentoo-user@l.g.o | ||
Subject: | Re: [gentoo-user] memset_s | ||
Date: | Fri, 10 Nov 2017 10:53:00 | ||
Message-Id: | 26501197.ioODuGg76y@thetick | ||
In Reply to: | [gentoo-user] memset_s by Jorge Almeida |
1 | Am Freitag, 10. November 2017, 10:54:53 CET schrieb Jorge Almeida: |
2 | > I'm trying to use memset_s() but the system (glibc?) doesn't know |
3 | > about it. I also tried to compile against musl, same result. |
4 | > |
5 | > There's precious little info about memset_s in the net. Does it exist |
6 | > at all? No man page. |
7 | > |
8 | > (https://www.cs.helsinki.fi/group/boi2016/doc/cppreference/reference/en.cppr |
9 | > eference.com/w/c/string/byte/memset.html) |
10 | > |
11 | > What I tried: |
12 | > |
13 | > #include <unistd.h> |
14 | > #include <stdlib.h> |
15 | > #include <stdint.h> |
16 | > #define __STDC_WANT_LIB_EXT1__ 1 |
17 | > #include <string.h> |
18 | > #include <stdio.h> |
19 | > |
20 | > int main(int argc, char** argv){ |
21 | > #ifndef __STDC_LIB_EXT1__ |
22 | > printf("CRAP\n"); |
23 | > #else |
24 | > printf("COOL\n"); |
25 | > #endif |
26 | > } |
27 | > |
28 | > Compiled with -std=c11 |
29 | > |
30 | > You can guess what the output is. |
31 | > |
32 | > Someone using it? |
33 | > |
34 | > Jorge Almeida |
35 | |
36 | It seems as though it is simply not implemented, I found a variety of links |
37 | that all support this: |
38 | |
39 | https://stackoverflow.com/a/40162721 |
40 | |
41 | https://stackoverflow.com/questions/38322363/when-will-the-safe-string-functions-of-c11-be-part-of-glibc |
42 | |
43 | https://gcc.gnu.org/wiki/C11Status (which states that Annex K is not |
44 | implemented) |
45 | |
46 | http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1967.htm |
47 | |
48 | HTH |
49 | -- |
50 | Marc Joliet |
51 | -- |
52 | "People who think they know everything really annoy those of us who know we |
53 | don't" - Bjarne Stroustrup |
File name | MIME type |
---|---|
signature.asc | application/pgp-signature |
Subject | Author |
---|---|
Re: [gentoo-user] memset_s | Jorge Almeida <jjalmeida@×××××.com> |