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
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.cppreference.com/w/c/string/byte/memset.html)

What I tried:

#include <unistd.h>
#include <stdlib.h>
#include <stdint.h>
#define __STDC_WANT_LIB_EXT1__  1
#include <string.h>
#include <stdio.h>

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

Replies

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