roken: do not require use of rk_mkdir on all platforms

Although rk_mkdir can be provided on all platforms there is no
reason to require that it be used by unconditionally mapping

  mkdir -> rk_mkdir

Change-Id: Ic149500037abf446434332bf6ba67dfb3906cd72
This commit is contained in:
Jeffrey Altman
2013-07-12 17:33:06 -04:00
parent 1826106ff4
commit 5b223c2caa
5 changed files with 11 additions and 3 deletions

View File

@@ -94,8 +94,8 @@ libroken_la_SOURCES = \
issuid.c \
k_getpwnam.c \
k_getpwuid.c \
mkdir.c \
mini_inetd.c \
mkdir.c \
net_read.c \
net_write.c \
parse_bytes.c \

View File

@@ -43,7 +43,7 @@
int ROKEN_LIB_FUNCTION
rk_mkdir(const char *pathname, mode_t mode)
{
#ifndef _WIN32
#ifndef MKDIR_DOES_NOT_HAVE_MODE
return mkdir(pathname, mode);
#else
/* Windows does not provide the ability to set access permissions */

View File

@@ -505,7 +505,6 @@ ct_memcmp(const void *, const void *, size_t);
void ROKEN_LIB_FUNCTION
rk_random_init(void);
#define mkdir rk_mkdir
ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
rk_mkdir(const char *, mode_t);

View File

@@ -688,6 +688,12 @@ ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL rk_rename(const char *, const char *);
#define rk_rename(__rk_rn_from,__rk_rn_to) rename(__rk_rn_from,__rk_rn_to)
#endif
#ifdef MKDIR_DOES_NOT_HAVE_MODE
#define mkdir rk_mkdir
#else
#define rk_mkdir(__rk_rn_name, __rk_rn_mode) mkdir(__rk_rn_name,__rk_rn_mode)
#endif
#if !defined(HAVE_DAEMON) || defined(NEED_DAEMON_PROTO)
#ifndef HAVE_DAEMON
#define daemon rk_daemon

View File

@@ -90,6 +90,9 @@ NO_LOCALNAME=1
# No entropy-gathering daemon on Windows
NO_RAND_EGD_METHOD=1
# Windows CRT mkdir does not have the mode parameter
MKDIR_DOES_NOT_HAVE_MODE=1
# Disable build of installers
!ifndef NO_INSTALLERS
BUILD_INSTALLERS=1