| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
from the trunk.
Set CLOEXEC flags where appropriate. Either use new O_CLOEXEC flag and
associated functions, such as dup3(), accept4(), epoll_create1() etc., or
simply set CLOEXEC flag using fcntl().
Patch by Stefan Fritsch <sf sfritsch.de> and
Arkadiusz Miskiewicz <arekm pld-linux.org>.
PR 46425.
fix unused variable warning for builds without HAVE_DUP3
Unroll APR_SET_FD_CLOEXEC macro.
* One missing unroll of APR_SET_FD_CLOEXEC.
Document CLOEXEC patch.
Only set CLOEXEC on dup() if both NOCLEANUP and INHERIT flags are clear.
Retain the INHERIT/NOCLEANUP flags of new_file in apr_file_dup2().
Patch by Stefan Fritsch <sf sfritsch.de>.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.3.x@787448 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
| |
If the named resource was removed by apr_shm_remove(), it may not be there.
Ignore EINVAL from shmctl in shm_cleanup_owner
This fixes the testcase, but doesn't feel like the end of the story:
both this and r661146 feel like sticking plaster over something deeper.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.3.x@662604 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
And refine the file times down to apr_time_t resolution if supported
by a st_atimensec or st_atim.tv_nsec value by the OS. Additional
msec implementations are possible if exposed through autoconf.
PR: 41678
Authored by: William Rowe, Nicklas Edmundsson <nikke acc.umu.se>
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@585343 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@562764 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
Tested on: RHEL AS 4 (Nahant Update 4), IBM/S390, running under VM (64 bit mode), gcc 3.4.6
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@554095 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
PR: 42806
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@553293 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
PR: 42806
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@553292 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
| |
operations,
plus apr_atomic_casptr.
PR: 42806
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@553291 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
platforms (alpha, ia32, ia64, powerpc, etc).
Tested on:
2x Pentium D, Ubuntu 7.04, gcc 4.1.2
16x Itanium II, RHEL 5, gcc 4.1.1
PR: 42806
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@553290 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
| |
the various backends. The generic implementation is used when no specialized
implementation fits the defined criterias, or when the user forces the choice.
PR: 42806
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@553289 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
PR 41119.
Original patches by Davi Arnaut.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@538045 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@538009 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@537405 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
| |
Patches by Davi Arnaut.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@537393 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
| |
This line, and those below, will be ignored--
M include/arch/unix/apr_arch_poll_private.h
M poll/unix/epoll.c
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@501085 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
| |
in use
epoll/Linux only for now. ./buildconf on FreeBSD (minotaur) spewed tons of
errors; hints appreciated
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@500321 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@428317 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@428313 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Submitted by: Keisuke Nishida <keisuke.nishida gmail.com>
Reviewed by: rooneg, Henry Jen <henryjen ztune.net>
* configure.in: Look for pthread_yield and sched_yield.
* include/arch/unix/apr_arch_threadproc.h: Include sched.h if it's present.
* threadproc/unix/thread.c
(apr_thread_yield): Actually do something in here...
* CHANGES: Note change.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@418351 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
| |
the offset into the file when working with files over 2 gigabytes in size.
* include/arch/unix/apr_arch_file_io.h
(apr_file_t::filePtr): Make this an apr_off_t, since we really need the
full 64 bits in many cases.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@375869 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
| |
apr_file_buffer_size_get() functions, to support variable buffer sizes for
file handles.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@326116 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
| |
avoid cases where readdir() is used in place of readdir_r even if
readdir64_r is available.
* file_io/unix/dir.c (apr_dir_read): Use APR_USE_READDIR64_R.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@291973 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
integers in struct dirent's d_ino or d_off fields in LFS builds (seen
in some peculiar NFS environments):
* configure.in: Check for readdir64_r for LFS builds.
* include/arch/unix/apr_arch_file_io.h (struct apr_dir_t): Use struct
dirent64 for entry field if readdir64_r is present.
* file_io/unix/dir.c (apr_dir_open): Use size of the entry field.
(apr_dir_read): Use readdir64_r if available; check for d_ino
overflow.
* file_io/unix/filestat.c (fill_out_finfo): Check for inode number
overflow.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@265032 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
| |
There is no functional change except changing stuct
mamber from cntxt to pool to be able to use the
ACCESSOR macros.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@190305 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@151412 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
| |
PR: #29858
Submitted By: Jeroen Ruigrok <asmodai tendra.org>
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@125880 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
| |
uid/gid for newly created processes using apr_proc_create.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@125349 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* include/arch/unix/apr_arch_poll_private.h
(pollset_lock_rings, pollset_unlock_rings): add a space after the if.
* poll/unix/port.c
(apr_pollset_remove): add a space after an if.
(apr_pollset_poll): wrap a long line, add a space after an if, remove some
extraneous parentheses that caused a long line to go past 80 columns.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@109938 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
| |
a backend to APR Pollset.
Best Docs: http://developers.sun.com/solaris/articles/event_completion.html
I have only been able to test this on Solaris 10 on x86 with gcc.
If anyone could test on Sparc with other compilers that would be great.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@106156 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added the APR_POLLSET_THREADSAFE flag for apr_pollset_create().
The flag is only supported by the KQueue or EPoll backends at this time.
All others should return ENOTIMPL.
Split poll/unix/poll.c into one file for each backend to better maintain them.
Tested On: FreeBSD 5.2.1, Linux 2.6 and OS X 10.3.6.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@105905 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
Tipped-of-by: Uwe Zeisberger
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@76269 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* configure.in: Don't disable POSIX semaphore support on LP64
platforms.
* include/arch/unix/apr_arch_proc_mutex.h (struct apr_proc_mutex_t):
Add a sem_t pointer field.
* locks/unix/proc_mutex.c (proc_mutex_posix_create,
proc_mutex_posix_cleanup, proc_mutex_posix_acquire,
prox_mutex_posix_release): Use the sem_t pointer not the fd for the
semaphore.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@65185 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
Don't define global symbols for the _methods structures.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@65165 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
| |
include/apr.h.in: Remove unimplemented "rwlock" serialization
definitions.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@65164 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
recursive mutex support if available:
* build/apr_threads.m4 (APR_CHECK_PTHREAD_RECURSIVE_MUTEX): New macro.
* configure.in: Use it.
* include/arch/unix/apr_arch_thread_mutex.h (struct
apr_thread_mutex_t): Drop nested mutex tracking fields.
* locks/unix/thread_mutex.c (apr_thread_mutex_create): Return ENOTIMPL
if lacking recursive mutex support, else create a recursive mutex.
(apr_thread_mutex_lock, apr_thread_mutex_unlock,
apr_thread_mutex_trylock): Remove nested mutex tracking.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@65157 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* configure.in: Check for off64_t and necessary LFS functions, define
apr_off_t as off64_t where available. Add --disable-lfs flag.
Forward-port changes from 0.9.5 to define apr_off_t as long on systems
systems with a 32-bit off_t which don't have LFS enabled.
* include/apr.h.in: Let configure define APR_HAS_LARGE_FILES.
* include/arch/netware/apr_arch_file_io.h: Redefine lseek and
ftruncate.
* include/arch/unix/apr_arch_file_io.h: Redefine stat, lstat, fstat,
lseek, ftruncate here; define struct_stat.
* file_io/unix/filestat.c: Use struct_stat.
* file_io/unix/mktemp.c: Use mkstemp64 where available.
* file_io/unix/open.c (apr_file_open): Use O_LARGEFILE by default when
LFS is enabled.
* file_io/unix/readwrite.c, file_io/unix/seek.c: Don't redefine lseek
and ftruncate here.
* mmap/unix/mmap.c (apr_mmap_create): Use mmap64 if available;
otherwise check for overflow when LFS is enabled.
* network_io/unix/sendrecv.c (apr_socket_sendfile) [Linux/HPUX]: Use
sendfile64 if available; otherwise check for overflow when LFS is
enabled. [solaris]: Use sendfilev64/sendfilevec64_t.
* test/Makefile.in, test/test_apr.h, test/testlfs.c: Add tests.
Reviewed by: Jeff Trawick
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@65027 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64904 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
pthread_rwlock_t can't be used; print and cache results of tests
carried out; define HAVE_PTHREAD_RWLOCKS when rwlocks can be used.
* locks/unix/thread_rwlock.c, include/arch/unix/apr_arch_thread_rwlock.h:
Use new HAVE_PTHREAD_RWLOCKS define.
PR: 22990
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64882 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
| |
pthread_rwlock_init check correctly.
(Possible fix for PR 22990)
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64876 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
| |
object in struct apr_thread_cond_t rather than a pointer to one.
* locks/unix/thread_cond.c (apr_thread_cond_create): Adjust use of
->cond, remove ENOMEM handling. (apr_thread_cond_wait,
apr_thread_cond_timedwait, apr_thread_cond_signal,
apr_thread_cond_broadcast): Adjust use of ->cond.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64847 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
| |
in order to
. aid in keeping the different flavors consistent
. prevent bug fixes from requiring that apps be rebuilt
Reviewed and/or fixed by: Brad Nicholes, Greg Marr
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64803 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
it is a perfect match for the feature set needed and avoids the setup
code at object creation time currently required to use apr_pollset_poll()
instead of poll(2)
future:
select()-based function is trivial too
is any platform then left needing the support in
apr/(network_io|file_io)/unix for allocating a pollset any time we
create a file or socket just in case apr_wait_for_io_or_timeout()
will be called?
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64794 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
needed to be rebuilt. Specifically, it needs a pollset, but we don't want
to allocate that all the time. Thus, we need to create it once at socket
or file creation time, and then reuse that pollset.
NOTE: this makes the library compile, but some of the test programs may
not. I have also not verified this work yet (in favor of just getting it
to at least compile...)
For the apr_arch_*.h files, I added a pollset member to the file and
socket structures.
For the various open/dup/etc functions, I added the creation of that
pollset whenever a file or socket is created.
(I may have missed some and will verify further)
For the socket create and sendrecv function, I added the creation of the
pollset.
(again, may have missed some, but if everybody uses alloc_socket, then we
should be okay)
* support/unix/waitio.c: rebuild in terms of the pollset
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64759 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
an entirely different meaning in a networking context. Rename the socket
field to "options".
Also simplified the test/set macros to just take a socket.
* include/arch/os2/apr_arch_networkio.h:
* include/arch/unix/apr_arch_networkio.h:
* include/arch/win32/apr_arch_networkio.h:
- perform adjustments as above. change all uses.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64710 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64685 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
portable, and 2) the return value is passed by a boolean (int) ref,
with errors returned as an apr_status_t.
The question is, how portable? sys/sockio.h seems sufficent for me
on hp/ux, solaris, linux, osx, and this works on Win32. The Netware
and OS2 implementations are best guesses.
Submitted by: Jim Jagielski and William Rowe
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64684 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
object in struct apr_thread_rwlock_t rather than a pointer to one.
* locks/unix/thread_rwlock.c (apr_thread_rwlock_create): Adjust use of
->rwlock, simplify to a single palloc call, and remove ENOMEM handling.
(apr_thread_rwlock_rdlock, apr_thread_rwlock_tryrdlock,
apr_thread_rwlock_wrlock, apr_thread_rwlock_trywrlock,
apr_thread_rwlock_unlock): Adjust use of ->rwlock appropriately.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64681 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
| |
structure in apr_threadattr_t, rather than a pointer to one.
* threadproc/unix/thread.c (apr_threadattr_create): Use a single
palloc call, omit ENOMEM handling. (apr_threadattr_detach_set,
apr_threadattr_detach_get, apr_thread_create): Adjust use of ->attr
appropriately.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64663 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
| |
apr_getsocketopt, apr_recv, apr_recvfrom, apr_send,
apr_sendfile, apr_sendto, apr_sendv, apr_setsocketopt,
apr_socket_set_inherit, apr_socket_unset_inherit
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64605 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
as reentrant as possible. Switched to atomics to preserve the
incr/decr integrity.
Although we previously reset the thread_id to zero, it's been
pointed out on list that this is less than desireable. However,
negative one isn't necessarily a good choice because several
platforms have unsigned thread_t's.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64579 13f79535-47bb-0310-9956-ffa450edef68
|