aboutsummaryrefslogtreecommitdiff
path: root/file_io/unix
Commit message (Collapse)AuthorAge
...
* * file_io/unix/dir.c (apr_dir_make_recursive): Fix infinite recursionJoe Orton2005-09-24
| | | | | | | | | if mkdir fails for all path components. * test/testdir.c (test_rmkdir_nocwd): Add test case. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@291339 13f79535-47bb-0310-9956-ffa450edef68
* * file_io/unix/dir.c (apr_dir_read): Avoid an unnecessaryJoe Orton2005-09-08
| | | | | | | | strlen(dirname) each time a stat call is required by using the apr_cpystrn return value. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@279565 13f79535-47bb-0310-9956-ffa450edef68
* * file_io/unix/dir.c (apr_dir_read): Clarify handling ofJoe Orton2005-09-05
| | | | | | | | end-of-directory; the "Linux problem" being the behaviour required by POSIX. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@278711 13f79535-47bb-0310-9956-ffa450edef68
* * file_io/unix/dir.c (apr_dir_open): Fix error handling; don't assumeJoe Orton2005-09-01
| | | | | | | | that apr_pcalloc can't change errno. Remove a redundant cast to void *. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@265684 13f79535-47bb-0310-9956-ffa450edef68
* * file_io/unix/dir.c (apr_dir_read): Fix non-readdir64_r build.Joe Orton2005-09-01
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@265681 13f79535-47bb-0310-9956-ffa450edef68
* Add some workarounds for cases where readdir_r fails due to largeJoe Orton2005-08-31
| | | | | | | | | | | | | | | | | | | | 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: https://svn.apache.org/repos/asf/apr/apr/trunk@265032 13f79535-47bb-0310-9956-ffa450edef68
* * file_io/unix/readwrite.c (apr_file_read, apr_file_gets): Handle theJoe Orton2005-08-22
| | | | | | | | | apr_file_flush() return value when flushing buffered writes. * test/testfile.c (test_fail_read_flush): Add test case. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@239221 13f79535-47bb-0310-9956-ffa450edef68
* * file_io/unix/readwrite.c (apr_file_flush): Use apr_ssize_t to storeJoe Orton2005-08-20
| | | | | | | the write() return value, remove casts. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@234014 13f79535-47bb-0310-9956-ffa450edef68
* * file_io/unix/readwrite.c (apr_file_write): Catch apr_file_flush()Joe Orton2005-08-20
| | | | | | | | | | | failure for buffered files. * test/testfile.c (test_fail_write_flush): Add test case. Submitted by: Erik Huelsmann <ehuels gmail.com> git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@234013 13f79535-47bb-0310-9956-ffa450edef68
* * file_io/unix/fullrw.c (apr_file_writev_full): Fix signed-vs-unsignedJoe Orton2005-08-18
| | | | | | | comparison. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@233376 13f79535-47bb-0310-9956-ffa450edef68
* fixed a type mismatchBrian Pane2005-07-20
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@219842 13f79535-47bb-0310-9956-ffa450edef68
* Added lazy evaluation of the pollset that's used within apr_file_tBrian Pane2005-07-09
| | | | | | | | | | | | on platforms where apr_wait_for_io_or_timeout does not use poll(2). This is a performance fix for httpd-2.x running on OS X, where the creation of an unused, kqueue-based apr_pollset_t on every file open and every file setaside was consuming a noticeable amount of CPU time. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@209931 13f79535-47bb-0310-9956-ffa450edef68
* rewrite apr_file_writev_full.Paul Querna2005-03-12
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@157231 13f79535-47bb-0310-9956-ffa450edef68
* Update copyright year to 2005 and standardize on current copyright owner line.Justin Erenkrantz2005-02-04
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@151412 13f79535-47bb-0310-9956-ffa450edef68
* Clean up a compiler emit.William A. Rowe Jr2005-01-05
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@124255 13f79535-47bb-0310-9956-ffa450edef68
* typo in commentRoy T. Fielding2004-12-11
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@111574 13f79535-47bb-0310-9956-ffa450edef68
* * file_io/unix/readwrite.c: Revert to the original code for apr_file ↵Paul Querna2004-12-11
| | | | | | | | | writev() in the !HAVE_WRITEV case, and a large comment explaining why we cannot use a better method without breaking writev()'s semantics. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@111571 13f79535-47bb-0310-9956-ffa450edef68
* Fix a check.David Reid2004-12-10
| | | | | | | | Contributed by: Ingo Weinhold <bonefish at cs dot tu-berlin dot de> Reviewed by: David Reid git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@111508 13f79535-47bb-0310-9956-ffa450edef68
* Fix style nits. No fucntional changes.Paul Querna2004-12-05
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@109912 13f79535-47bb-0310-9956-ffa450edef68
* * file_io/unix/readwrite.c: Revert back to using apr_file_write, but also leavePaul Querna2004-12-05
| | | | | | | | the function if tbytes < vec[i].iov_len, as Jeff Trawick suggested on dev@apr. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@109892 13f79535-47bb-0310-9956-ffa450edef68
* * file_io/unix/readwrite.c: use apr_file_write_full() to write all of the ↵Paul Querna2004-12-05
| | | | | | | | | data to a file. On an exceptional error (See apr_file_write_full), we will add the bytes that did get written, and then exit. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@109865 13f79535-47bb-0310-9956-ffa450edef68
* * file_io/unix/fullrw.c: Add apr_file_writev_full to ensure an iovec is Paul Querna2004-12-05
| | | | | | | | | | | | | | | completely written to the file. * include/apr_file_io.h: Define APR_MAX_IOVEC_SIZE Add public def for apr_file_writev_full. * file_io/unix/readwrite.c: For systems without writev, ensure that they get the correct number of bytes written. * test/*: Add a new test for apr_file_writev_full. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@109843 13f79535-47bb-0310-9956-ffa450edef68
* * test/testfile.c: Add a test for apr_file_writev().Paul Querna2004-12-04
| | | | | | | * file_io/unix/readwrite.c: Try to write all iovecs out on platforms without writev. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@109832 13f79535-47bb-0310-9956-ffa450edef68
* * file_io/unix/readwrite.c (file_printf_flush): NewJoe Orton2004-11-18
| | | | | | | | | | | | | | | function. (apr_file_printf): Rewrite to handle arbitrary length strings. * test/testfile.c (test_bigfprintf): New function. PR: 28029 Submitted by: Chris Knight <Christopher.D.Knight nasa.gov>, Garrett Rooney <rooneg electricjellyfish.net> git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@76283 13f79535-47bb-0310-9956-ffa450edef68
* Remove .cvsignore files.Joe Orton2004-11-18
| | | | | | | Tipped-of-by: Uwe Zeisberger git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@76269 13f79535-47bb-0310-9956-ffa450edef68
* Avoid casting away "const". No functional change.Joe Orton2004-11-17
| | | | | | | | | | * apr/file_io/unix/tempdir.c (test_tempdir): Remove "const" to avoid casting it away. Submitted by: Julian Foad <julianfoad btopenworld.com> git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@76118 13f79535-47bb-0310-9956-ffa450edef68
* * file_io/unix/readwrite.c (apr_file_puts): Use apr_file_write_full.Joe Orton2004-11-17
| | | | | | | | * test/testfile.c (test_puts, file_contents_equal): Test apr_file_puts. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@76115 13f79535-47bb-0310-9956-ffa450edef68
* Improve apr_file_gets() performance on buffered files by not callingJustin Erenkrantz2004-08-02
| | | | | | | | | | apr_file_read() on each byte if we don't have to. (mod_negotiation requests call apr_file_gets() for each line in the map file, which can get to be quite expensive to have repeated memcpy()'s for one byte!) git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@65294 13f79535-47bb-0310-9956-ffa450edef68
* Eliminate APR_STATUS_IS_SUCCESS macro.Justin Erenkrantz2004-07-31
| | | | | | | Reviewed by (conceptually): Ryan, Greg, Fitz git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@65292 13f79535-47bb-0310-9956-ffa450edef68
* * file_io/unix/copy.c (apr_file_transfer_contents): Remove redundantJoe Orton2004-05-24
| | | | | | | NULL-initializers. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@65121 13f79535-47bb-0310-9956-ffa450edef68
* Fix sign error in apr_file_seek().Jeff Trawick2004-05-04
| | | | | | | | Submitted by: Greg Hudson <ghudson MIT.EDU> Reviewed by: Jeff Trawick git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@65086 13f79535-47bb-0310-9956-ffa450edef68
* * include/apr_file_info.h, file_io/unix/fileacc.c (apr_unix_mode2perms,Joe Orton2004-04-21
| | | | | | | | | apr_unix_perms2mode): Support setuid, setgid and sticky bits. Submitted by: Andr�� Malo <nd@perlig.de> git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@65074 13f79535-47bb-0310-9956-ffa450edef68
* * include/apr_file_io.h: Add APR_LARGEFILE flag, with warning.Joe Orton2004-03-30
| | | | | | | | * file_io/unix/open.c (apr_file_open): Map APR_LARGEFILE onto O_LARGEFILE for non-LFS builds. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@65032 13f79535-47bb-0310-9956-ffa450edef68
* Add LFS support:Joe Orton2004-03-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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: https://svn.apache.org/repos/asf/apr/apr/trunk@65027 13f79535-47bb-0310-9956-ffa450edef68
* Relicense APR under Apache License, Version 2.0Justin Erenkrantz2004-02-13
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64904 13f79535-47bb-0310-9956-ffa450edef68
* First whack at switching to a single top-level make. This adds a dependencyGreg Stein2004-02-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | upon Python at packaging time, but not at end-user config/build time. As far as I can tell, the build continues to function properly. (out-of-dir config/make not tested, and apr-iconv prolly needs some work) The buildconf scripts now generate a build-outputs.mk file which is included by the root's Makefile (via the build/gen-build.py script). bulid-outputs.mk specifies all of the various files present in the distribution. The top-level Makefiles were simplified to use an $(OBJECTS) symbol rather than 'find'ing them. Similarly, a $(HEADERS) symbol is used for the exports. The corresponding delete-* targets were eliminated since we have a precise set of inputs. The subdirs' Makefiles were removed since they are no longer called/used. The apr-util/uri Makefile was responsible for compiling a C program to generate the uri_delims.h file. That process was replaced by a Python script to generate the header (called by buildconf). The .c and .dsp were left for the Windows build to continue, but that should be revamped. build/apr_rules.mk was revamped somewhat to avoid recursion, but a lot of cleanup is still needed. Much of the recursive/local/x- logic is no longer needed and can be elimianated. rules.mk was created for inclusion by N makefiles, but that isn't really true any more, so it could probably be tossed (caveat: test/Makefile). Saved for a phase 2. Some additional work was added to properly clean up files in */build/, rather than relying on a makefile in there. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64891 13f79535-47bb-0310-9956-ffa450edef68
* Clean up some 32 bit/64 bit type incompatibilities that cause problems when ↵Bradley Nicholes2003-12-15
| | | | | | large file support is enabled. Also turn large file support back on for NetWare git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64838 13f79535-47bb-0310-9956-ffa450edef68
* * file_io/unix/open.c (apr_os_file_put): Create the pollset.Joe Orton2003-11-25
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64798 13f79535-47bb-0310-9956-ffa450edef68
* on Unix-ish platforms, apr_wait_for_io_or_timeout() can just use poll(2)Jeff Trawick2003-11-24
| | | | | | | | | | | | | | | | | 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: https://svn.apache.org/repos/asf/apr/apr/trunk@64794 13f79535-47bb-0310-9956-ffa450edef68
* * file_io/unix/filedup.c (file_dup): Renamed from _file_dup - the CJoe Orton2003-11-17
| | | | | | | | library reserves identifiers beginning with an undercore. Callers changed. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64763 13f79535-47bb-0310-9956-ffa450edef68
* With the removal of apr_poll(), the apr_wait_for_io_or_timeout() functionGreg Stein2003-11-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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: https://svn.apache.org/repos/asf/apr/apr/trunk@64759 13f79535-47bb-0310-9956-ffa450edef68
* Suggested by: Joe OrtonSander Striker2003-11-03
| | | | | | | | | * file_io/unix/tempdir.c (apr_temp_dir_get): Axe caching. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64717 13f79535-47bb-0310-9956-ffa450edef68
* * file_io/unix/tempdir.cSander Striker2003-11-02
| | | | | | | (apr_temp_dir_get): If we have a cache we might aswell use it. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64709 13f79535-47bb-0310-9956-ffa450edef68
* * file_io/unix/tempdir.cSander Striker2003-11-02
| | | | | | | (apr_temp_dir_get): Don't cache the cwd as a temp dir. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64708 13f79535-47bb-0310-9956-ffa450edef68
* Bah. *BSD's mkstemp doesn't check how many (or whether you have any) Xs youThom May2003-11-02
| | | | | | | have in the mkstemp format. GNU libc does. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64706 13f79535-47bb-0310-9956-ffa450edef68
* Forward port from APR_0_9_BRANCH:Sander Striker2003-10-26
| | | | | | | | | | Add apr_os_pipe_put_ex(), which allows the caller to tell APR to establish a cleanup on the pipe. Submitted by: Jeff Trawick, Brad Nicholes git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64695 13f79535-47bb-0310-9956-ffa450edef68
* Add a needed header file when we're using utime.David Reid2003-09-10
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64616 13f79535-47bb-0310-9956-ffa450edef68
* remove these interfaces:Jeff Trawick2003-09-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | apr_compare_groups apr_compare_users apr_current_userid apr_explode_localtime apr_explode_time apr_filename_of_pathname apr_get_groupid apr_get_groupname apr_get_home_directory apr_get_userid apr_get_username apr_group_name_get apr_implode_gmt apr_lstat FNM_NOMATCH FNM_NOESCAPE FNM_PATHNAME FNM_PERIOD FNM_CASE_BLIND change the function args to this interface: apr_mmap_dup this function's args changed in a previous commit, so mention that in CHANGES apr_socket_create git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64607 13f79535-47bb-0310-9956-ffa450edef68
* style policeCliff Woolley2003-09-03
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64603 13f79535-47bb-0310-9956-ffa450edef68
* Add the path to the NetWare TMP directory to the list of test directories.Bradley Nicholes2003-08-25
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64597 13f79535-47bb-0310-9956-ffa450edef68