Added a configure script to emulate GNU autoconf and related changes.
Changes included in this set: * Added strlcat() and strlcpy() from OpenBSD, always use them if the system does not have them built in. * Changed an array of PATH_MAX size allocated in the stack, to a dynamically allocated buffer from heap. This should reduce memory usage a bit. * Simplify code that implemented a homegrown realpath(3) implementation, simply use realpath(3). * If compiler supports -fstack-protector, build all code with -D_FORTIFY_SOURCE=2 and --param ssp-buffer-size=1 so that all buffers are protected.
This commit is contained in:
+1
-1
@@ -1,4 +1,4 @@
|
||||
include ../vars.mk
|
||||
-include ../config.mk
|
||||
|
||||
INCS = xbps_api.h
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
#ifndef STRLCAT_H
|
||||
#define STRLCAT_H
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
size_t strlcat(char *, const char *, size_t);
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,8 @@
|
||||
#ifndef STRLCPY_H
|
||||
#define STRLCPY_H
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
size_t strlcpy(char *, const char *, size_t);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user