Gentoo Archives: gentoo-user

From: Jorge Almeida <jjalmeida@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] memset_s
Date: Fri, 10 Nov 2017 09:55:23
Message-Id: CAKpSnpJ=vs36FjA6qRpFCYTZKreFdqe=bMqa9+kbZCL0FL7fDQ@mail.gmail.com
1 I'm trying to use memset_s() but the system (glibc?) doesn't know
2 about it. I also tried to compile against musl, same result.
3
4 There's precious little info about memset_s in the net. Does it exist
5 at all? No man page.
6
7 (https://www.cs.helsinki.fi/group/boi2016/doc/cppreference/reference/en.cppreference.com/w/c/string/byte/memset.html)
8
9 What I tried:
10
11 #include <unistd.h>
12 #include <stdlib.h>
13 #include <stdint.h>
14 #define __STDC_WANT_LIB_EXT1__ 1
15 #include <string.h>
16 #include <stdio.h>
17
18 int main(int argc, char** argv){
19 #ifndef __STDC_LIB_EXT1__
20 printf("CRAP\n");
21 #else
22 printf("COOL\n");
23 #endif
24 }
25
26 Compiled with -std=c11
27
28 You can guess what the output is.
29
30 Someone using it?
31
32 Jorge Almeida

Replies

Subject Author
Re: [gentoo-user] memset_s Marc Joliet <marcec@×××.de>
[gentoo-user] Re: memset_s Nikos Chantziaras <realnc@×××××.com>