Merge pull request #3824 from orestisfl/ac_replace_funcs

Use AC_REPLACE_FUNCS
This commit is contained in:
Michael Stapelberg
2019-12-25 12:27:21 +01:00
committed by GitHub
6 changed files with 6 additions and 57 deletions

View File

@ -12,12 +12,11 @@
#include <string.h>
#include <sys/stat.h>
#ifndef HAVE_mkdirp
/*
* Emulates mkdir -p (creates any missing folders)
*
*/
#if !defined(__sun)
int mkdirp(const char *path, mode_t mode) {
if (mkdir(path, mode) == 0)
return 0;

View File

@ -10,8 +10,7 @@
#include <sys/types.h>
#include <string.h>
#if defined(__APPLE__)
#ifndef HAVE_strndup
/*
* Taken from FreeBSD
* Returns a pointer to a new string which is a duplicate of the
@ -30,5 +29,4 @@ char *strndup(const char *str, size_t n) {
copy[len] = '\0';
return (copy);
}
#endif