summaryrefslogtreecommitdiff
path: root/file_io
Commit message (Collapse)AuthorAgeFilesLines
...
* With the removal of apr_poll(), the apr_wait_for_io_or_timeout() functiongstein2003-11-179-0/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Suggested by: Joe Ortonstriker2003-11-031-24/+13
| | | | | | | | | * file_io/unix/tempdir.c (apr_temp_dir_get): Axe caching. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64717 13f79535-47bb-0310-9956-ffa450edef68
* * file_io/unix/tempdir.cstriker2003-11-021-0/+4
| | | | | | | (apr_temp_dir_get): If we have a cache we might aswell use it. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64709 13f79535-47bb-0310-9956-ffa450edef68
* * file_io/unix/tempdir.cstriker2003-11-021-2/+3
| | | | | | | (apr_temp_dir_get): Don't cache the cwd as a temp dir. git-svn-id: http://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 youthommay2003-11-021-1/+1
| | | | | | | have in the mkstemp format. GNU libc does. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64706 13f79535-47bb-0310-9956-ffa450edef68
* Forward port from APR_0_9_BRANCH:striker2003-10-263-11/+56
| | | | | | | | | | 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: http://svn.apache.org/repos/asf/apr/apr/trunk@64695 13f79535-47bb-0310-9956-ffa450edef68
* fix apr_file_dup() and apr_file_dup2() to dup the ungetchar memberstas2003-09-191-0/+2
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64632 13f79535-47bb-0310-9956-ffa450edef68
* Preserve leading '../' segments as when merging to an empty andwrowe2003-09-171-12/+17
| | | | | | | | | unrooted path - fixes a bug observed in SVN with Win32/Netware/OS2. Submitted by: Mike Pilato <cmpilato@collab.net>, William Rowe git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64627 13f79535-47bb-0310-9956-ffa450edef68
* Add a needed header file when we're using utime.dreid2003-09-101-0/+4
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64616 13f79535-47bb-0310-9956-ffa450edef68
* remove these interfaces:trawick2003-09-036-33/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: http://svn.apache.org/repos/asf/apr/apr/trunk@64607 13f79535-47bb-0310-9956-ffa450edef68
* style policejwoolley2003-09-031-1/+2
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64603 13f79535-47bb-0310-9956-ffa450edef68
* Include apr_temp_dir_get() in OS/2 build.bjh2003-08-292-1/+3
| | | | | | | One of TMP or TEMP will normally be defined on OS/2 so the code's fine as it is. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64598 13f79535-47bb-0310-9956-ffa450edef68
* Add the path to the NetWare TMP directory to the list of test directories.bnicholes2003-08-251-0/+8
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64597 13f79535-47bb-0310-9956-ffa450edef68
* Add apr_temp_dir_get(), a function to get the most suitable directory to placethommay2003-08-232-1/+168
| | | | | | | | | | temp files based on environment variables and other factors. Obtained from: C Mike Pilato <cmpilato@collab.net> Reviewed by: Thom May git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64591 13f79535-47bb-0310-9956-ffa450edef68
* Implemented apr_file_mtime_set() for NetWarebnicholes2003-07-141-2/+41
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64570 13f79535-47bb-0310-9956-ffa450edef68
* Finish the new timestamp-setting API, thanks to helpful tips fromsussman2003-07-083-7/+43
| | | | | | | | | | | | | | | | Brane and Cliff. Hopefully this will go out in httpd-2.0.48, and then subversion can make use of it. * configure.in: use AC_CHECK_FUNCS to look for utimes() and utime(). * file_io/unix/filestat.c (apr_file_mtime_set): use the new constants. * file_io/netware/filestat.c (apr_file_mtime_set): add dummy placeholder. * file_io/os2/filestat.c (apr_file_mtime_set): add dummy placeholder. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64566 13f79535-47bb-0310-9956-ffa450edef68
* New apr_file_mtime_set() API, implemented in unix and win32.sussman2003-07-073-1/+64
| | | | | | | | | | | | | | | | | | | | Patches from Branko Cibej (brane) and Matt Kraai <kraai@alumni.cmu.edu>. * include/apr_file_io.h (apr_file_mtime_set): declare. * include/arch/win32/apr_arch_file_io.h: expand apr_file_open internal flags; add new APR_WRITEATTRS value. * file_io/win32/open.c (apr_file_open): honor APR_WRITEATTRS flag. * file_io/win32/filestat.c (apr_file_mtime_set): implement in win32. * file_io/unix/filestat.c (apr_file_mtime_set): implement in unix. * test/testfileinfo.c (test_mtime_set): new API test. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64563 13f79535-47bb-0310-9956-ffa450edef68
* Change a declaration that wouldn't compile under Borland C++brianp2003-06-251-1/+4
| | | | | | | Submitted by: Saxon Druce <saxon@blocksoftware.com> git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64552 13f79535-47bb-0310-9956-ffa450edef68
* When writing to pipes with a timeout set, handle the situationtrawick2003-06-051-2/+13
| | | | | | | | | | | | | | where the kernel says the pipe is writable but an attempt to write <= PIPE_BUF bytes gets EAGAIN. APR will now write whatever data will fit. APR applications that relied on the atomic nature of relatively small pipe write requests may be affected. PR: 20295 First patch and lots of testing from: Mark Street <mark@faime.demon.co.uk> git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64528 13f79535-47bb-0310-9956-ffa450edef68
* Added flag APR_FILE_ATTR_HIDDEN for manipulating the "hidden" filebrane2003-05-244-1/+39
| | | | | | | | | attribute on Windows and OS/2. Also changed the apr_file_attrs_set implementations to not make any syscalls if the requested attributes are not supported on the platform. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64510 13f79535-47bb-0310-9956-ffa450edef68
* Unless we are actively looking for a symlink, don't inform the apr_finfo_twrowe2003-05-191-1/+2
| | | | | | | | | | that the file is a Junction. PR: 8014 Submitted by: Kristofer Spinka <kspinka@style.net> git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64508 13f79535-47bb-0310-9956-ffa450edef68
* Make sure that the current directory that is represented by the context is ↵bnicholes2003-05-081-2/+18
| | | | | | | | | stat'ed if the resulting path is a single slash. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64502 13f79535-47bb-0310-9956-ffa450edef68
* apr_file_gets(): Return APR_SUCCESS if any characters aretrawick2003-05-013-1/+20
| | | | | | | | | | returned. Any I/O errors or EOF will be reported on the next call. Callers that are coded to expect returned data + APR_EOF when there is no final newline are affected by this change. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64498 13f79535-47bb-0310-9956-ffa450edef68
* Call apr_file_flush() on a buffered file before getting the file info.bnicholes2003-04-031-0/+6
| | | | | | | Submitted by: Blair Zajac <blair@orcaware.com> git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64469 13f79535-47bb-0310-9956-ffa450edef68
* OS/2: apr_stat() fixesbjh2003-03-311-5/+9
| | | | | | | | - When a character device is stat'ed, fill in finfo.name if it was asked for. - return APR_INCOMPLETE when appropriate. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64463 13f79535-47bb-0310-9956-ffa450edef68
* Revert my recent change that concerns both Jeff Trawick and myself,wrowe2003-03-221-12/+6
| | | | | | | | | | | | | we will make no presumtion that fd 0..2 are special cases from apr_file_dup(), and remain uninherited as in the previous release of APR. Although it's a common Unix construct to; close(2) fd = dup(2, x) it's certainly not portable and shouldn't be encouraged. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64442 13f79535-47bb-0310-9956-ffa450edef68
* Given two solutions to the current mpm inheritence bugs,wrowe2003-03-221-8/+10
| | | | | | | | | | | | | | | | | 1) track the target file's existing flags and register the proper sort of cleanup (a bug in the new design) or 2) revert to the previous behavior and retain the existing cleanup I've gone with option 2, since Joe Orton has expressed concern with introducing too many changes in the coming release. However, this implies that; apr_file_close(fd1); apr_file_dup2(fd1, fd2); is absolutely unsupported. Since it wouldn't work on Win32 in the first place, I'm not terribly concerned about this limitation. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64441 13f79535-47bb-0310-9956-ffa450edef68
* dup2() is supported on NetWarebnicholes2003-03-201-8/+0
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64440 13f79535-47bb-0310-9956-ffa450edef68
* Need to resolve the #define APR_INHERIT that is being used as a flagbnicholes2003-03-201-0/+1
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64439 13f79535-47bb-0310-9956-ffa450edef68
* Fix "unused variable" compiler warning in apr_file_dup2 and eliminatejorton2003-03-191-6/+1
| | | | | | | local variable in apr_file_dup. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64436 13f79535-47bb-0310-9956-ffa450edef68
* Same fixes for netware as unix in pipe.cwrowe2003-03-191-1/+3
| | | | | | | | BTW - that code *definately* violates the style guide; either repeat the assignments or indent the second line!!! git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64435 13f79535-47bb-0310-9956-ffa450edef68
* apr_os_pipe_put() (where is the _file in that symbol name?) registerswrowe2003-03-191-1/+1
| | | | | | | | no cleanup - so enforce APR_FILE_NOCLEANUP to force apr_file_inherit_[un]set to choke. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64434 13f79535-47bb-0310-9956-ffa450edef68
* Clean up a runover line, and reflect that apr_os_file_put() does notwrowe2003-03-191-2/+3
| | | | | | | register a cleanup whatsoever. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64429 13f79535-47bb-0310-9956-ffa450edef68
* A common sense logic change. If we are dup()ing or dup2()ingwrowe2003-03-191-4/+14
| | | | | | | | | | | | | | into one of the std[in|out|err] fd's - we should automatically toggle the inherit bit. If the user calls apr_file_inherit_set() again it will be a noop. This brings Unix into line with Win32's implementation of dup. If folks feel we should *only* apply this code to which_dup==2 cases, that's fine with me; although close(1); dup(n) would generally create a new fd 1 on unix, that code isn't portable to Win32 and should be strongly discouraged. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64428 13f79535-47bb-0310-9956-ffa450edef68
* Fix bug #5 of the evening; always register the proper child_cleanupwrowe2003-03-191-1/+3
| | | | | | | in apr_file_setaside(), based on the ->flags of the fd being set-aside. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64427 13f79535-47bb-0310-9956-ffa450edef68
* Fix bug #4 of the evening; it is altogether possible for the user to havewrowe2003-03-191-9/+13
| | | | | | | | | | | | | called apr_file_close() against the original handle, and then invoke apr_file_dup2(). However, in that case the apr_file_t has already been unregistered from the cleanups. Always register a cleanup within _file_dup(), yet kill any remaining cleanup for the existing apr_file_t in the apr_file_dup2() situation. This also prevents double-registration, but in a more robust manner. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64426 13f79535-47bb-0310-9956-ffa450edef68
* apr_p[c]alloc always succeeds, exit()s or calls the user defined callback.wrowe2003-03-191-3/+0
| | | | | | | APR_ENOMEM checks are noops. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64425 13f79535-47bb-0310-9956-ffa450edef68
* Break the initial *new_file NULL checkwrowe2003-03-191-12/+12
| | | | | | | | | | | | | | | | | apart to solve two major bugs. 1) APR attempts to defer creation of objects until the underlying atomic call actually succeeds - in this case, dup() for the apr_file_dup() flavor (which_dup == 1). 2) APR cannot trust the LHS point passed in via apr_file_dup(), nowhere else do we require the user to 'NULL' out the target variable. This patch always creates a new apr_pcalloc() for apr_file_dup() ignoring the old value of *new_file. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64424 13f79535-47bb-0310-9956-ffa450edef68
* Bug Fix #1 .. Move the special-case of Netware into _dup_file() wherewrowe2003-03-191-4/+8
| | | | | | | | | it belongs (this will be evident in bug #2). The patch fixes a fd leak on Netware where each call to apr_file_dup2 failed to close the original fd. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64423 13f79535-47bb-0310-9956-ffa450edef68
* Document an obvious problem lacking a simple solution - if we simplywrowe2003-03-181-0/+7
| | | | | | | | propogate flags as passed without enforcing their values - the rest of APR code will make invalid assumptions. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64421 13f79535-47bb-0310-9956-ffa450edef68
* Fix the 'test_buffered_write_size' test by ensuring that bufferedbrane2003-03-071-0/+6
| | | | | | | | | files are flushed before calling fstat. [Port of jorton's rev. 1.65 commit of apr/file_io/unix/filestat.c] git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64409 13f79535-47bb-0310-9956-ffa450edef68
* Eliminate a local variable in apr_unix_file_cleanup.jorton2003-03-061-3/+1
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64402 13f79535-47bb-0310-9956-ffa450edef68
* Fix the 'test_buffered_write_size' test by ensuring that bufferedjorton2003-03-061-0/+6
| | | | | | | files are flushed before calling fstat. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64401 13f79535-47bb-0310-9956-ffa450edef68
* Make apr_file_inherit_set/unset work for pipes created by Unixjorton2003-03-061-0/+4
| | | | | | | | | apr_file_pipe_create() implementation. Submitted by: Joe Orton, Bjoern A. Zeeb <bzeeb-lists@lists.zabbadoz.net> git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64400 13f79535-47bb-0310-9956-ffa450edef68
* Correct apr_file_gets() on OS2 and Win32 so that '\r's are no longerwrowe2003-03-042-6/+2
| | | | | | | | | | eaten, and apr_file_gets() -> apr_file_puts() moves the contents uncorrupted. Reviewed by bicholes and brane git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64396 13f79535-47bb-0310-9956-ffa450edef68
* Implemented the functionality for the APR_FILEPATH_NATIVE flag inbnicholes2003-03-041-0/+6
| | | | | | | apr_filepath_get() git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64394 13f79535-47bb-0310-9956-ffa450edef68
* OS/2: Don't return the apr_file_t if the open failed.bjh2003-03-021-1/+2
| | | | | | | This is consistent with the other platforms & is required to pass the file tests. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64390 13f79535-47bb-0310-9956-ffa450edef68
* Include filepath_util.c in OS/2 build.bjh2003-02-262-0/+2
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64384 13f79535-47bb-0310-9956-ffa450edef68
* Move the apr_filepath_list_split_impl and apr_filepath_list_merge_implbrane2003-02-163-10/+5
| | | | | | | | | | prototypes from include/arch/unix/apr_arch_file_io.h into a new private header, include/arch/apr_private_common.h, and include that from the various apr_private.h instances. Update the filepath.c and filepath_util.c files to reflect this change. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64361 13f79535-47bb-0310-9956-ffa450edef68
* get the prototypes for these functions in the right placetrawick2003-02-132-12/+2
| | | | | | | | | | | | so they actually do some good > filepath_util.c:70: warning: no previous prototype for \ `apr_filepath_list_split_impl' > filepath_util.c:107: warning: no previous prototype for \ `apr_filepath_list_merge_impl' git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64354 13f79535-47bb-0310-9956-ffa450edef68