diff options
author | peter <peter@FreeBSD.org> | 2014-08-12 01:40:11 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2014-08-12 01:40:11 +0000 |
commit | 72d63a715ab3bb85109696154deb9b90d0495852 (patch) | |
tree | ce225c894795f3e26aadf9170baf8fd0556c18d2 /contrib/apr/file_io/unix | |
parent | d307c6d3b7fc94a241aab28f56b9e92a10d98bee (diff) | |
download | FreeBSD-src-72d63a715ab3bb85109696154deb9b90d0495852.zip FreeBSD-src-72d63a715ab3bb85109696154deb9b90d0495852.tar.gz |
MFC r266728,266731,266735,266736,268135,268960,269833
Update apr 1.4.8 -> 1.5.1
Update apr-util 1.5.2 -> 1.5.3
Update serf 1.3.4 -> 1.3.7
Update svnlite 1.8.8 -> 1.8.10
Deal with svnlite.1 manpage.
Diffstat (limited to 'contrib/apr/file_io/unix')
-rw-r--r-- | contrib/apr/file_io/unix/filedup.c | 3 | ||||
-rw-r--r-- | contrib/apr/file_io/unix/filestat.c | 4 | ||||
-rw-r--r-- | contrib/apr/file_io/unix/mktemp.c | 2 | ||||
-rw-r--r-- | contrib/apr/file_io/unix/open.c | 8 | ||||
-rw-r--r-- | contrib/apr/file_io/unix/pipe.c | 8 | ||||
-rw-r--r-- | contrib/apr/file_io/unix/readwrite.c | 2 |
6 files changed, 17 insertions, 10 deletions
diff --git a/contrib/apr/file_io/unix/filedup.c b/contrib/apr/file_io/unix/filedup.c index eb4fbdc..41cfec5 100644 --- a/contrib/apr/file_io/unix/filedup.c +++ b/contrib/apr/file_io/unix/filedup.c @@ -141,8 +141,7 @@ APR_DECLARE(apr_status_t) apr_file_setaside(apr_file_t **new_file, apr_file_t *old_file, apr_pool_t *p) { - *new_file = (apr_file_t *)apr_palloc(p, sizeof(apr_file_t)); - memcpy(*new_file, old_file, sizeof(apr_file_t)); + *new_file = (apr_file_t *)apr_pmemdup(p, old_file, sizeof(apr_file_t)); (*new_file)->pool = p; if (old_file->buffered) { (*new_file)->buffer = apr_palloc(p, old_file->bufsize); diff --git a/contrib/apr/file_io/unix/filestat.c b/contrib/apr/file_io/unix/filestat.c index 9bee651..220efd0 100644 --- a/contrib/apr/file_io/unix/filestat.c +++ b/contrib/apr/file_io/unix/filestat.c @@ -95,7 +95,7 @@ static void fill_out_finfo(apr_finfo_t *finfo, struct_stat *info, #elif defined(HAVE_STRUCT_STAT_ST_ATIMENSEC) finfo->atime += info->st_atimensec / APR_TIME_C(1000); #elif defined(HAVE_STRUCT_STAT_ST_ATIME_N) - finfo->ctime += info->st_atime_n / APR_TIME_C(1000); + finfo->atime += info->st_atime_n / APR_TIME_C(1000); #endif apr_time_ansi_put(&finfo->mtime, info->st_mtime); @@ -104,7 +104,7 @@ static void fill_out_finfo(apr_finfo_t *finfo, struct_stat *info, #elif defined(HAVE_STRUCT_STAT_ST_MTIMENSEC) finfo->mtime += info->st_mtimensec / APR_TIME_C(1000); #elif defined(HAVE_STRUCT_STAT_ST_MTIME_N) - finfo->ctime += info->st_mtime_n / APR_TIME_C(1000); + finfo->mtime += info->st_mtime_n / APR_TIME_C(1000); #endif apr_time_ansi_put(&finfo->ctime, info->st_ctime); diff --git a/contrib/apr/file_io/unix/mktemp.c b/contrib/apr/file_io/unix/mktemp.c index 28aaf90..7530a25 100644 --- a/contrib/apr/file_io/unix/mktemp.c +++ b/contrib/apr/file_io/unix/mktemp.c @@ -74,7 +74,7 @@ #if APR_HAVE_SYS_TYPES_H #include <sys/types.h> #endif -#if APR_HAVE_SYS_STAT_H +#ifdef HAVE_SYS_STAT_H #include <sys/stat.h> #endif #if APR_HAVE_FCNTL_H diff --git a/contrib/apr/file_io/unix/open.c b/contrib/apr/file_io/unix/open.c index 6373ee5..49eb727 100644 --- a/contrib/apr/file_io/unix/open.c +++ b/contrib/apr/file_io/unix/open.c @@ -135,6 +135,14 @@ APR_DECLARE(apr_status_t) apr_file_open(apr_file_t **new, } #endif + if (flag & APR_FOPEN_NONBLOCK) { +#ifdef O_NONBLOCK + oflags |= O_NONBLOCK; +#else + return APR_ENOTIMPL; +#endif + } + #ifdef O_CLOEXEC /* Introduced in Linux 2.6.23. Silently ignored on earlier Linux kernels. */ diff --git a/contrib/apr/file_io/unix/pipe.c b/contrib/apr/file_io/unix/pipe.c index 7b8f01f..571d9bc 100644 --- a/contrib/apr/file_io/unix/pipe.c +++ b/contrib/apr/file_io/unix/pipe.c @@ -25,8 +25,8 @@ * but now fcntl does, hence we need to do this extra checking. * The joys of beta programs. :-) */ -#if BEOS -#if !BONE7 +#if defined(BEOS) +#if !defined(BONE7) # define BEOS_BLOCKING 1 #else # define BEOS_BLOCKING 0 @@ -35,7 +35,7 @@ static apr_status_t pipeblock(apr_file_t *thepipe) { -#if !BEOS_BLOCKING +#if !defined(BEOS) || !BEOS_BLOCKING int fd_flags; fd_flags = fcntl(thepipe->filedes, F_GETFL, 0); @@ -71,7 +71,7 @@ static apr_status_t pipeblock(apr_file_t *thepipe) static apr_status_t pipenonblock(apr_file_t *thepipe) { -#if !BEOS_BLOCKING +#if !defined(BEOS) || !BEOS_BLOCKING int fd_flags = fcntl(thepipe->filedes, F_GETFL, 0); # if defined(O_NONBLOCK) diff --git a/contrib/apr/file_io/unix/readwrite.c b/contrib/apr/file_io/unix/readwrite.c index 4b3e736..7044300 100644 --- a/contrib/apr/file_io/unix/readwrite.c +++ b/contrib/apr/file_io/unix/readwrite.c @@ -21,7 +21,7 @@ /* The only case where we don't use wait_for_io_or_timeout is on * pre-BONE BeOS, so this check should be sufficient and simpler */ -#if !BEOS_R5 +#if !defined(BEOS_R5) #define USE_WAIT_FOR_IO #endif |