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:
@@ -41,6 +41,10 @@
|
||||
|
||||
#include <zlib.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
/*
|
||||
* _prop_object_init --
|
||||
* Initialize an object. Called when sub-classes create
|
||||
@@ -812,7 +816,10 @@ _prop_object_externalize_write_file(const char *fname, const char *xml,
|
||||
size_t len, bool do_compress)
|
||||
{
|
||||
gzFile *gzf = NULL;
|
||||
char tname[PATH_MAX], *otname;
|
||||
char tname[PATH_MAX];
|
||||
#ifndef HAVE_STRLCAT
|
||||
char *otname;
|
||||
#endif
|
||||
int fd;
|
||||
int save_errno;
|
||||
mode_t myumask;
|
||||
|
Reference in New Issue
Block a user