summaryrefslogtreecommitdiff
path: root/file_io/os2
Commit message (Collapse)AuthorAgeFilesLines
* Remove trailing whitespaces in *.c.Ivan Zhakov2022-11-2010-56/+56
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1905414 13f79535-47bb-0310-9956-ffa450edef68
* Follow up to r1893204: restore apr_file_setaside() semantics, fix ↵Yann Ylavic2021-09-191-0/+1
| | | | | | | | | | | | | | | file_bucket_setaside(). apr_file_setasidea() needs to invalidate the old file descriptor per semantics: * @remark After calling this function, old_file may not be used So to avoid the setaside issue with splitted file buckets, file_bucket_setaside() will now apr_file_dup() instead of apr_file_setaside() when the bucket is shared (i.e. refcount > 1). git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1893445 13f79535-47bb-0310-9956-ffa450edef68
* apr_file_setaside: don't blindly kill the old cleanup and file descriptor.Yann Ylavic2021-09-101-4/+2
| | | | | | | | | | | There is no cleanup with APR_FOPEN_NOCLEANUP, so apr_pool_cleanup_kill() can go in the !(old_file->flags & APR_FOPEN_NOCLEANUP) block. The file descriptor can't be invalidated either, the file may be split in multiple buckets and setting aside one shouldn't invalidate the others. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1893204 13f79535-47bb-0310-9956-ffa450edef68
* Revert r1862435, r1862071 per veto from ivanJoe Orton2019-08-281-9/+5
| | | | | | | msgid: <CABw-3YcK0qbeYWDOwE684XtBj3rCT2CuVOBWWqda4gMtRyRJEw@mail.gmail.com> git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1866019 13f79535-47bb-0310-9956-ffa450edef68
* * include/apr_file_info.h: Clarify pool handling for apr_dir_read andJoe Orton2019-07-021-1/+1
| | | | | | | | | | | | | | apr_dir_pread. * file_io/win32/dir.c, file_io/os2/dir.c (apr_dir_read): Duplicate the returned filename so the call has no side-effects on apr_finfo_t structures passed to previous invocations of the function. * test/testdir.c (test_read_side_effects): Add test case for side-effects of apr_dir_read. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1862435 13f79535-47bb-0310-9956-ffa450edef68
* Add apr_dir_pread(), a variant of apr_dir_read() which allows callersJoe Orton2019-06-251-4/+8
| | | | | | | | | | | | | | | | | to read a directory with constant memory consumption: * include/apr_file_info.h: Add warning on memory consumption for apr_dir_read; declare apr_dir_pread. * file_io/unix/dir.c (apr_dir_pread): Rename from apr_dir_read and take pool argument. (apr_dir_read): Reimplement using it. * file_io/win32/dir.c, file_io/os2/dir.c: Likewise, but untested. * test/testdir.c (test_pread) [APR_POOL_DEBUG]: Add test case. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1862071 13f79535-47bb-0310-9956-ffa450edef68
* pipe: factorize apr_file_pipe_create*() in terms of static helperYann Ylavic2017-09-261-23/+5
| | | | | | | | file_pipe_create(), to avoid duplicated code. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1809757 13f79535-47bb-0310-9956-ffa450edef68
* apr_file_io: Add apr_file_pipe_create_pools() allowing a pair ofGraham Leggett2016-03-131-23/+53
| | | | | | | pipes to be created, each in a different pool. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1734816 13f79535-47bb-0310-9956-ffa450edef68
* APR_FOPEN_NONBLOCK is expected to be critical for an appJeff Trawick2013-11-021-0/+4
| | | | | | | | that uses it; return APR_ENOTIMPL instead of ignoring it if not supported. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1538171 13f79535-47bb-0310-9956-ffa450edef68
* Fix race condition that could lead to EEXIST being returnedStefan Fritsch2011-10-151-4/+8
| | | | | | | | | PR: 51254 Submitted by: William Lee <william lee rainstor com>, Wim Lewis <wiml omnigroup com> git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1183688 13f79535-47bb-0310-9956-ffa450edef68
* change apr_palloc+memcpy to apr_pmemdupJeff Trawick2011-04-061-2/+1
| | | | | | | | PR: 47776 Submitted by: Boya Sun <boya.sun case.edu> git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1089438 13f79535-47bb-0310-9956-ffa450edef68
* Axed C++ comments.Guenter Knauf2011-02-091-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1068870 13f79535-47bb-0310-9956-ffa450edef68
* Fix various issues found by cppcheckStefan Fritsch2010-07-271-1/+1
| | | | | | | | | | | | - error handling issues - use of uninitialized data - null pointer dereference - unused variables - memory/fd leaks - broken code in threadproc/beos/proc.c git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@979891 13f79535-47bb-0310-9956-ffa450edef68
* OS/2: Fix incorrect value in nbytes parameter to apr_file_read() after use ofBrian Havard2010-06-221-2/+2
| | | | | | | apr_file_ungetc(). git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@956849 13f79535-47bb-0310-9956-ffa450edef68
* Hide apr_wait_for_io_or_timeout() from public view and add insteadBrian Havard2010-04-122-2/+27
| | | | | | | apr_socket_wait() and apr_file_pipe_wait(). git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@933338 13f79535-47bb-0310-9956-ffa450edef68
* OS/2: Add support for writing to a non-blocking pipe with time out.Brian Havard2010-04-062-0/+38
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@931271 13f79535-47bb-0310-9956-ffa450edef68
* OS/2: Fix return value from apr_file_pipe_timeout_set() when the pipe doesn'tBrian Havard2010-04-061-1/+7
| | | | | | | need its blocking status changed. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@931269 13f79535-47bb-0310-9956-ffa450edef68
* OS/2: Fix invalid parameter error in apr_file_inherit_set/unset().Brian Havard2010-04-061-1/+3
| | | | | | | | DosSetFHState() only accepts a subset of flags returned by DosQueryFHState() and all others must be zero so mask out the unsupported flags. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@931265 13f79535-47bb-0310-9956-ffa450edef68
* OS/2: Remove comment warnings about apr_file_flush() not being mutex protectedBrian Havard2010-04-042-2/+0
| | | | | | | as apr_file_flush() now does its own locking. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@930717 13f79535-47bb-0310-9956-ffa450edef68
* OS/2: Add missing locking in apr_file_seek() for buffered files.Brian Havard2010-04-041-1/+9
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@930716 13f79535-47bb-0310-9956-ffa450edef68
* OS/2: Fix incorrect error code conversion in apr_file_write() for bufferedBrian Havard2010-04-041-5/+7
| | | | | | | files. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@930715 13f79535-47bb-0310-9956-ffa450edef68
* OS/2: Change implementation of apr_file_writev() to just call apr_file_write()Brian Havard2010-04-041-20/+12
| | | | | | | | | | in a loop. OS/2 doesn't have a system call equivalent to writev() so the C library was just emulating it, providing no performance benefit. This also fixes a problem with the old implementation failing to handle buffered files correctly which resulted in a testfile failure. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@930694 13f79535-47bb-0310-9956-ffa450edef68
* OS/2: Do a proper implementation of apr_file_ungetc().Brian Havard2010-04-044-2/+15
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@930686 13f79535-47bb-0310-9956-ffa450edef68
* OS/2: Share the unix implementation of apr_file_printf() which passes theBrian Havard2010-04-042-22/+1
| | | | | | | >HUGE_STRING_LEN test in testfile. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@930676 13f79535-47bb-0310-9956-ffa450edef68
* OS/2: Fix incorrect returning of APR_EOF when a 0 length read is requested.Brian Havard2010-04-041-1/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@930671 13f79535-47bb-0310-9956-ffa450edef68
* OS/2: In apr_file_close(), only try to destroy the mutex if there is one.Brian Havard2010-04-031-1/+3
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@930503 13f79535-47bb-0310-9956-ffa450edef68
* OS/2: Add ENOTIMPL stubs for apr_file_rotating_*(). Can't reasonably implementBrian Havard2010-03-301-0/+14
| | | | | | | as OS/2 file systems don't allow renaming open files. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@929093 13f79535-47bb-0310-9956-ffa450edef68
* OS/2: Implement apr_file_sync().Brian Havard2010-03-301-2/+12
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@929082 13f79535-47bb-0310-9956-ffa450edef68
* OS/2: fix apr_file_putc() to use the buffer if there is one.Brian Havard2010-03-301-13/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@929081 13f79535-47bb-0310-9956-ffa450edef68
* OS/2: Fix a possible uninitialised error status in apr_file_buffer_set().Brian Havard2010-03-301-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@929080 13f79535-47bb-0310-9956-ffa450edef68
* OS/2: Only mutex protect buffer access if APR_FOPEN_XTHREAD is specified.Brian Havard2010-03-303-21/+57
| | | | | | | Also add missing mutex locking in apr_file_flush(). git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@929070 13f79535-47bb-0310-9956-ffa450edef68
* OS/2: Clean up some comment questions.Brian Havard2010-03-301-3/+1
| | | | | | | | | | | | | | For the record: /* XXX: No other possible types from FS3? */ No, FILESTATUS3 info can't specify any types besides regular file and directory which is why we go on to test the file handle if possible. From DosQueryHType(), values in the low byte of filetype greater than 2 are described as "reserved" by the API documentation so should never happen. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@929069 13f79535-47bb-0310-9956-ffa450edef68
* OS/2: In apr_dir_open(), check that the supplied directory name is actuallyBrian Havard2010-03-161-0/+13
| | | | | | | valid before returning APR_SUCCESS. This fixes a failure in testdir. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@923810 13f79535-47bb-0310-9956-ffa450edef68
* Use the APR_FOPEN_* constants instead of the deprecated APR_* constantsGraham Leggett2010-03-013-17/+17
| | | | | | | within the file_io code. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@917675 13f79535-47bb-0310-9956-ffa450edef68
* OS/2: Add "not implemented" stub for apr_file_link() as OS/2 doesn't supportBrian Havard2009-09-091-0/+23
| | | | | | | links. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@813056 13f79535-47bb-0310-9956-ffa450edef68
* Right now OS/2 file sync functions are not implemented.Bojan Smojver2009-06-151-2/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@784773 13f79535-47bb-0310-9956-ffa450edef68
* Add apr_file_sync() and apr_file_datasync() calls.Bojan Smojver2009-06-141-0/+9
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@784633 13f79535-47bb-0310-9956-ffa450edef68
* OS/2: Make opened files non-inheritable.Brian Havard2007-10-301-3/+30
| | | | | | | | Implement apr_file_inherit_set & apr_file_inherit_unset directly instead of via macros. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@590491 13f79535-47bb-0310-9956-ffa450edef68
* * Return APR_SUCCESS by default.Ruediger Pluem2007-10-141-0/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@584543 13f79535-47bb-0310-9956-ffa450edef68
* Small cut and paste 'feature'. (Ok, can't be a feature if it doesn't even ↵William A. Rowe Jr2007-10-141-3/+1
| | | | | | compile). git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@584497 13f79535-47bb-0310-9956-ffa450edef68
* Had inverted read/write.William A. Rowe Jr2007-10-141-3/+3
| | | | | | | | This is why you don't do things like this, in/out is ambiguous. (you write things in-to a pipe and read things out-of a pipe, well except in APR ;-) git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@584489 13f79535-47bb-0310-9956-ffa450edef68
* Enhance our file_io in APR 1.3 with apr_file_pipe_create_ex(),William A. Rowe Jr2007-10-141-0/+29
| | | | | | | | | | | | | | | which should replace apr_file_pipe_create() in apr 2.0. Trivial, this sets up blocking and nonblocking flavors of either pipe end. Obviously this code shrinks up threadproc/*/proc.c quite nicely. This eliminates a major class of portability concerns. On Win32, I take this one step further and fix the pipe creation logic so that nonblock pipes are always set to timeout of 0, per Eric's earlier proc.c patch. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@584487 13f79535-47bb-0310-9956-ffa450edef68
* Only try to flush when the file is in buffered mode, inside apr_file_writev.Paul Querna2007-03-011-4/+6
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@513205 13f79535-47bb-0310-9956-ffa450edef68
* Fix apr_file_writev when buffering is enabled by forcing a flush, rather ↵Paul Querna2007-02-281-0/+6
| | | | | | | | | | than writing underneath the write buffer. PR: 41197 Submitted By: Davi Arnaut git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@512882 13f79535-47bb-0310-9956-ffa450edef68
* Fix the typo.Joe Orton2006-08-0314-14/+14
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@428317 13f79535-47bb-0310-9956-ffa450edef68
* Update license header.Joe Orton2006-08-0314-84/+84
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@428313 13f79535-47bb-0310-9956-ffa450edef68
* Identify - one 2Xtransformed error result, several missing mutex sectionsWilliam A. Rowe Jr2006-03-104-2/+8
| | | | | | | | and fix one last apr_file_flush result ignored (close the file, but return the failure to flush error.) git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@384941 13f79535-47bb-0310-9956-ffa450edef68
* OS/2: Add proper error handling when internal calls to apr_file_flush() failBrian Havard2006-02-222-2/+17
| | | | | | | within apr_file_read(), apr_file_gets() and apr_file_seek(). git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@379754 13f79535-47bb-0310-9956-ffa450edef68
* Initial implementation of the variable file-io buffer sizes functions on theColm MacCarthaigh2005-10-184-6/+68
| | | | | | | OS2 platform; entirely guesswork base, untested. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@326120 13f79535-47bb-0310-9956-ffa450edef68
* Add apr_file_open_flags_std[err|out|in]() functions, to allow the opening ofColm MacCarthaigh2005-10-151-7/+30
| | | | | | | | | the standard file descriptors with specific flags set. As a consequence we now also set APR_WRITE and APR_READ as appropriate when using the plain old apr_file_open_std[err|out|in]() functions. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@321314 13f79535-47bb-0310-9956-ffa450edef68