SSP(3) | Library Functions Manual | SSP(3) |
int
sprintf(char *str, const char *fmt, ...);
int
vsprintf(char *str, const char *fmt, va_list ap);
int
snprintf(char *str, size_t len, const char *fmt, ...);
int
vsnprintf(char *str, size_t len, const char *fmt, va_list ap);
char *
gets(char *str);
char *
fgets(char *str, int len, FILE *fp);
#include <ssp/string.h>
void *
memcpy(void *str, const void *ptr, size_t len);
void *
memmove(void *str, const void *ptr, size_t len);
void *
memset(void *str, int val, size_t len);
char *
strcpy(char *str, const char *ptr, size_t len);
char *
strcat(char *str, const char *ptr, size_t len);
char *
strncpy(char *str, const char *ptr, size_t len);
char *
strncat(char *str, const char *ptr, size_t len);
#include <ssp/strings.h>
void *
bcopy(const void *ptr, void *str, size_t len);
void *
bzero(void *str, size_t len);
#include <ssp/unistd.h>
ssize_t
read(int fd, void *str, size_t len);
int
readlink(const char * restrict path, char * restrict str, size_t len);
int
getcwd(char *str, size_t len);
To enable these function overrides the following should be added to the gcc(1) command line: “-I/usr/include/ssp” to override the standard include files and “-D_FORTIFY_SOURCE=1” or “-D_FORTIFY_SOURCE=2”.
If _FORTIFY_SOURCE is set to 1 the code will compute the maximum possible buffer size for str, and if set to 2 it will compute the minimum buffer size.
March 21, 2011 | NetBSD 6.1 |