Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

memset_s function signature conflicts with C11 standard library memset_s #14

Open
martijnthe opened this issue Feb 2, 2018 · 2 comments

Comments

@martijnthe
Copy link

safestringlib:

errno_t
memset_s (void *dest, rsize_t len, uint8_t value);

c11 standard library:

errno_t
memset_s (void *dest, rsize_t destsz, int ch, rsize_t count);

It would be nicer if the signatures would not conflict.
My proposal would be to rename safestringlib's memset_s to memset8_s (in line with the other memsetXX_s variants) and perhaps also add the C11 function.

@pgiffuni
Copy link

pgiffuni commented Aug 6, 2019

This actually causes breakage on FreeBSD:

...
In file included from unittests/test_strcmp_s.c:9:
In file included from include/safe_str_lib.h:35:
In file included from include/safe_lib.h:62:
include/safe_mem_lib.h:100:16: error: conflicting types for 'memset_s'
extern errno_t memset_s(void *dest, rsize_t dmax, uint8_t value);
               ^
/usr/include/string.h:160:9: note: previous declaration is here
errno_t memset_s(void *, rsize_t, int, rsize_t);
        ^
1 error generated.
gmake: *** [makefile:47: objtest/test_strcmp_s.o] Error 1

@JelteF
Copy link

JelteF commented Feb 26, 2020

The same error that @pgiffuni describes also happens on OSX.

mbargull added a commit to bioconda/bioconda-recipes that referenced this issue Jul 10, 2020
BiocondaBot pushed a commit to bioconda/bioconda-recipes that referenced this issue Jul 11, 2020
Merge PR #23102, commits were: 
 * bwa-mem2: skip osx due to intel/safestringlib#14
 * bwa-mem2: fix source,patch,make,multi,license,doi
 * try as libs
 * try/use makefile patch
 * allow zlib
 * use cpp compiler
 * more lint
 * some lint
 * try building from source
 * ignore some lint
 * add libgcc
 * rename to bwa-mem2
 * rename bwamem2 to bwa-mem2
 * move all related files
 * noarch generic
 * Merge branch 'master' into bwamem2
 * add bwa-mem2
adRn-s added a commit to adRn-s/bioconda-recipes that referenced this issue Sep 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants