You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by iv...@apache.org on 2022/11/20 07:14:40 UTC
svn commit: r1905414 [3/8] - in /apr/apr/trunk: atomic/netware/ atomic/os390/ buckets/ build/ crypto/ dbd/ dbd/unsupported/ dbm/ dbm/sdbm/ dso/aix/ dso/beos/ dso/netware/ dso/os2/ dso/os390/ dso/unix/ dso/win32/ encoding/ file_io/netware/ file_io/os2/ ...
Modified: apr/apr/trunk/file_io/win32/filestat.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/file_io/win32/filestat.c?rev=1905414&r1=1905413&r2=1905414&view=diff
==============================================================================
--- apr/apr/trunk/file_io/win32/filestat.c (original)
+++ apr/apr/trunk/file_io/win32/filestat.c Sun Nov 20 07:14:38 2022
@@ -95,7 +95,7 @@ static void resolve_prot(apr_finfo_t *fi
TRUSTEE_W ident = {NULL, NO_MULTIPLE_TRUSTEE, TRUSTEE_IS_SID};
ACCESS_MASK acc;
/*
- * This function is only invoked for WinNT,
+ * This function is only invoked for WinNT,
* there is no reason for os_level testing here.
*/
if ((wanted & APR_FINFO_WPROT) && !worldid) {
@@ -120,7 +120,7 @@ static void resolve_prot(apr_finfo_t *fi
}
/* Windows NT: did not return group rights.
* Windows 2000 returns group rights information.
- * Since WinNT kernels don't follow the unix model of
+ * Since WinNT kernels don't follow the unix model of
* group associations, this all all pretty mute.
*/
if ((wanted & APR_FINFO_GPROT) && (finfo->valid & APR_FINFO_GROUP)) {
@@ -146,7 +146,7 @@ static apr_status_t resolve_ident(apr_fi
{
apr_file_t *thefile = NULL;
apr_status_t rv;
- /*
+ /*
* NT5 (W2K) only supports symlinks in the same manner as mount points.
* This code should eventually take that into account, for now treat
* every reparse point as a symlink...
@@ -154,7 +154,7 @@ static apr_status_t resolve_ident(apr_fi
* We must open the file with READ_CONTROL if we plan to retrieve the
* user, group or permissions.
*/
-
+
if ((rv = apr_file_open(&thefile, fname, APR_OPENINFO
| ((wanted & APR_FINFO_LINK) ? APR_OPENLINK : 0)
| ((wanted & (APR_FINFO_PROT | APR_FINFO_OWNER))
@@ -164,7 +164,7 @@ static apr_status_t resolve_ident(apr_fi
finfo->filehand = NULL;
apr_file_close(thefile);
}
- else if (APR_STATUS_IS_EACCES(rv) && (wanted & (APR_FINFO_PROT
+ else if (APR_STATUS_IS_EACCES(rv) && (wanted & (APR_FINFO_PROT
| APR_FINFO_OWNER))) {
/* We have a backup plan. Perhaps we couldn't grab READ_CONTROL?
* proceed without asking for that permission...
@@ -172,7 +172,7 @@ static apr_status_t resolve_ident(apr_fi
if ((rv = apr_file_open(&thefile, fname, APR_OPENINFO
| ((wanted & APR_FINFO_LINK) ? APR_OPENLINK : 0),
APR_FPROT_OS_DEFAULT, pool)) == APR_SUCCESS) {
- rv = apr_file_info_get(finfo, wanted & ~(APR_FINFO_PROT
+ rv = apr_file_info_get(finfo, wanted & ~(APR_FINFO_PROT
| APR_FINFO_OWNER),
thefile);
finfo->filehand = NULL;
@@ -256,7 +256,7 @@ static int reparse_point_is_link(WIN32_F
return IsReparseTagNameSurrogate(tag);
}
-apr_status_t more_finfo(apr_finfo_t *finfo, const void *ufile,
+apr_status_t more_finfo(apr_finfo_t *finfo, const void *ufile,
apr_int32_t wanted, int whatfile)
{
PSID user = NULL, grp = NULL;
@@ -290,7 +290,7 @@ apr_status_t more_finfo(apr_finfo_t *fin
if (wcsncmp(wfile + fix, L"UNC\\", 4) == 0)
wfile[6] = L'\\', fix = 6;
}
- rv = GetNamedSecurityInfoW(wfile + fix,
+ rv = GetNamedSecurityInfoW(wfile + fix,
SE_FILE_OBJECT, sinf,
((wanted & (APR_FINFO_USER | APR_FINFO_UPROT)) ? &user : NULL),
((wanted & (APR_FINFO_GROUP | APR_FINFO_GPROT)) ? &grp : NULL),
@@ -300,7 +300,7 @@ apr_status_t more_finfo(apr_finfo_t *fin
wfile[6] = L'C';
}
else if (whatfile == MORE_OF_HANDLE)
- rv = GetSecurityInfo((HANDLE)ufile,
+ rv = GetSecurityInfo((HANDLE)ufile,
SE_FILE_OBJECT, sinf,
((wanted & (APR_FINFO_USER | APR_FINFO_UPROT)) ? &user : NULL),
((wanted & (APR_FINFO_GROUP | APR_FINFO_GPROT)) ? &grp : NULL),
@@ -309,7 +309,7 @@ apr_status_t more_finfo(apr_finfo_t *fin
else
return APR_INCOMPLETE; /* should not occur */
if (rv == ERROR_SUCCESS)
- apr_pool_cleanup_register(finfo->pool, pdesc, free_localheap,
+ apr_pool_cleanup_register(finfo->pool, pdesc, free_localheap,
apr_pool_cleanup_null);
else
user = grp = dacl = NULL;
@@ -349,7 +349,7 @@ apr_status_t more_finfo(apr_finfo_t *fin
sizelo = GetCompressedFileSizeW((apr_wchar_t*)ufile, &sizehi);
else
return APR_EGENERAL; /* should not occur */
-
+
if (sizelo != INVALID_FILE_SIZE || GetLastError() == NO_ERROR) {
#if APR_HAS_LARGE_FILES
finfo->csize = (apr_off_t)sizelo
@@ -377,8 +377,8 @@ apr_status_t more_finfo(apr_finfo_t *fin
* if this is a CHR filetype. If it's reasonably certain it can't be,
* then the function returns 0.
*/
-int fillin_fileinfo(apr_finfo_t *finfo,
- WIN32_FILE_ATTRIBUTE_DATA *wininfo,
+int fillin_fileinfo(apr_finfo_t *finfo,
+ WIN32_FILE_ATTRIBUTE_DATA *wininfo,
int byhandle,
int finddata,
const char *fname,
@@ -420,8 +420,8 @@ int fillin_fileinfo(apr_finfo_t *finfo,
* appears to be unknowable (in any trustworthy or consistent sense)
* on WinNT/2K as far as PIPE, CHR, etc are concerned.
*/
- if (!wininfo->ftLastWriteTime.dwLowDateTime
- && !wininfo->ftLastWriteTime.dwHighDateTime
+ if (!wininfo->ftLastWriteTime.dwLowDateTime
+ && !wininfo->ftLastWriteTime.dwHighDateTime
&& !finfo->size)
warn = 1;
finfo->filetype = APR_REG;
@@ -432,7 +432,7 @@ int fillin_fileinfo(apr_finfo_t *finfo,
*/
if (wininfo->dwFileAttributes & FILE_ATTRIBUTE_READONLY)
finfo->protection = APR_FREADONLY;
-
+
finfo->valid = APR_FINFO_ATIME | APR_FINFO_CTIME | APR_FINFO_MTIME
| APR_FINFO_SIZE | APR_FINFO_TYPE; /* == APR_FINFO_MIN */
@@ -547,7 +547,7 @@ APR_DECLARE(apr_status_t) apr_file_info_
else if (FileType == FILE_TYPE_PIPE) {
finfo->filetype = APR_PIPE;
}
- /* Otherwise leave the original conclusion alone
+ /* Otherwise leave the original conclusion alone
*/
}
}
@@ -559,7 +559,7 @@ APR_DECLARE(apr_status_t) apr_file_info_
* we pstrdup the fname into???
*/
finfo->fname = thefile->fname;
-
+
/* Extra goodies known only by GetFileInformationByHandle() */
finfo->inode = (apr_ino_t)FileInfo.nFileIndexLow
| ((apr_ino_t)FileInfo.nFileIndexHigh << 32);
@@ -568,7 +568,7 @@ APR_DECLARE(apr_status_t) apr_file_info_
finfo->valid |= APR_FINFO_IDENT | APR_FINFO_NLINK;
- /* If we still want something more (besides the name) go get it!
+ /* If we still want something more (besides the name) go get it!
*/
if ((wanted &= ~finfo->valid) & ~APR_FINFO_NAME) {
return more_finfo(finfo, thefile->filehand, wanted, MORE_OF_HANDLE);
@@ -598,20 +598,20 @@ APR_DECLARE(apr_status_t) apr_stat(apr_f
WIN32_FILE_ATTRIBUTE_DATA i;
} FileInfo;
int finddata = 0;
-
- /* Catch fname length == MAX_PATH since GetFileAttributesEx fails
- * with PATH_NOT_FOUND. We would rather indicate length error than
+
+ /* Catch fname length == MAX_PATH since GetFileAttributesEx fails
+ * with PATH_NOT_FOUND. We would rather indicate length error than
* 'not found'
- */
+ */
if (strlen(fname) >= APR_PATH_MAX) {
return APR_ENAMETOOLONG;
}
- if ((wanted & (APR_FINFO_IDENT | APR_FINFO_NLINK))
+ if ((wanted & (APR_FINFO_IDENT | APR_FINFO_NLINK))
|| (~wanted & APR_FINFO_LINK)) {
/* FindFirstFile and GetFileAttributesEx can't figure the inode,
- * device or number of links, so we need to resolve with an open
- * file handle. If the user has asked for these fields, fall over
+ * device or number of links, so we need to resolve with an open
+ * file handle. If the user has asked for these fields, fall over
* to the get file info by handle method. If we fail, or the user
* also asks for the file name, continue by our usual means.
*
@@ -620,18 +620,18 @@ APR_DECLARE(apr_status_t) apr_stat(apr_f
* on a Junction always returns the junction, opening the target
* is the only way to resolve the target's attributes.
*/
- if ((ident_rv = resolve_ident(finfo, fname, wanted, pool))
+ if ((ident_rv = resolve_ident(finfo, fname, wanted, pool))
== APR_SUCCESS)
return ident_rv;
else if (ident_rv == APR_INCOMPLETE)
wanted &= ~finfo->valid;
}
- if ((rv = utf8_to_unicode_path(wfname, sizeof(wfname)
+ if ((rv = utf8_to_unicode_path(wfname, sizeof(wfname)
/ sizeof(apr_wchar_t), fname)))
return rv;
if (!(wanted & APR_FINFO_NAME)) {
- if (!GetFileAttributesExW(wfname, GetFileExInfoStandard,
+ if (!GetFileAttributesExW(wfname, GetFileExInfoStandard,
&FileInfo.i))
return apr_get_os_error();
}
@@ -659,7 +659,7 @@ APR_DECLARE(apr_status_t) apr_stat(apr_f
}
if (ident_rv != APR_INCOMPLETE) {
- if (fillin_fileinfo(finfo, (WIN32_FILE_ATTRIBUTE_DATA *) &FileInfo,
+ if (fillin_fileinfo(finfo, (WIN32_FILE_ATTRIBUTE_DATA *) &FileInfo,
0, finddata, fname, wanted))
{
/* Go the extra mile to assure we have a file. WinNT/2000 seems
@@ -675,9 +675,9 @@ APR_DECLARE(apr_status_t) apr_stat(apr_f
if (tmpoff == tmpname + 4) {
finfo->filetype = APR_CHR;
}
- /* For WHATEVER reason, CHR devices such as \\.\con
+ /* For WHATEVER reason, CHR devices such as \\.\con
* or \\.\lpt1 *may*not* update tmpoff; in fact the
- * resulting tmpoff is set to NULL. Guard against
+ * resulting tmpoff is set to NULL. Guard against
* either case.
*
* This code is identical for wide and narrow chars...
Modified: apr/apr/trunk/file_io/win32/filesys.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/file_io/win32/filesys.c?rev=1905414&r1=1905413&r2=1905414&view=diff
==============================================================================
--- apr/apr/trunk/file_io/win32/filesys.c (original)
+++ apr/apr/trunk/file_io/win32/filesys.c Sun Nov 20 07:14:38 2022
@@ -22,19 +22,19 @@
*
* Note that trailing spaces and trailing periods are never recorded
* in the file system, except by a very obscure bug where any file
- * that is created with a trailing space or period, followed by the
+ * that is created with a trailing space or period, followed by the
* ':' stream designator on an NTFS volume can never be accessed again.
* In other words, don't ever accept them when designating a stream!
*
- * An interesting side effect is that two or three periods are both
+ * An interesting side effect is that two or three periods are both
* treated as the parent directory, although the fourth and on are
* not [strongly suggest all trailing periods are trimmed off, or
* down to two if there are no other characters.]
*
* Leading spaces and periods are accepted, however.
* The * ? < > codes all have wildcard side effects
- * The " / \ : are exclusively component separator tokens
- * The system doesn't accept | for any (known) purpose
+ * The " / \ : are exclusively component separator tokens
+ * The system doesn't accept | for any (known) purpose
* Oddly, \x7f _is_ acceptable ;)
*/
@@ -68,7 +68,7 @@ apr_status_t filepath_root_test(char *pa
apr_status_t rv;
apr_wchar_t wpath[APR_PATH_MAX];
- if ((rv = utf8_to_unicode_path(wpath, sizeof(wpath)
+ if ((rv = utf8_to_unicode_path(wpath, sizeof(wpath)
/ sizeof(apr_wchar_t), path)))
return rv;
rv = GetDriveTypeW(wpath);
@@ -79,7 +79,7 @@ apr_status_t filepath_root_test(char *pa
}
-apr_status_t filepath_drive_get(char **rootpath, char drive,
+apr_status_t filepath_drive_get(char **rootpath, char drive,
apr_int32_t flags, apr_pool_t *p)
{
char path[APR_PATH_MAX];
@@ -87,7 +87,7 @@ apr_status_t filepath_drive_get(char **r
apr_wchar_t wdrive[8];
apr_wchar_t wpath[APR_PATH_MAX];
apr_status_t rv;
- /* ???: This needs review, apparently "\\?\d:." returns "\\?\d:"
+ /* ???: This needs review, apparently "\\?\d:." returns "\\?\d:"
* as if that is useful for anything.
*/
wcscpy(wdrive, L"D:.");
@@ -113,16 +113,16 @@ apr_status_t filepath_root_case(char **r
apr_wchar_t wpath[APR_PATH_MAX];
apr_status_t rv;
apr_wchar_t wroot[APR_PATH_MAX];
- /* ???: This needs review, apparently "\\?\d:." returns "\\?\d:"
+ /* ???: This needs review, apparently "\\?\d:." returns "\\?\d:"
* as if that is useful for anything.
*/
- if ((rv = utf8_to_unicode_path(wroot, sizeof(wroot)
+ if ((rv = utf8_to_unicode_path(wroot, sizeof(wroot)
/ sizeof(apr_wchar_t), root)))
return rv;
if (!GetFullPathNameW(wroot, sizeof(wpath) / sizeof(apr_wchar_t), wpath, &ignored))
return apr_get_os_error();
- /* Borrow wroot as a char buffer (twice as big as necessary)
+ /* Borrow wroot as a char buffer (twice as big as necessary)
*/
if ((rv = unicode_to_utf8_path((char*)wroot, sizeof(wroot), wpath)))
return rv;
@@ -159,7 +159,7 @@ APR_DECLARE(apr_status_t) apr_filepath_s
apr_wchar_t wpath[APR_PATH_MAX];
apr_status_t rv;
- if ((rv = utf8_to_unicode_path(wpath, sizeof(wpath)
+ if ((rv = utf8_to_unicode_path(wpath, sizeof(wpath)
/ sizeof(apr_wchar_t), rootpath)))
return rv;
if (!SetCurrentDirectoryW(wpath))
Modified: apr/apr/trunk/file_io/win32/flock.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/file_io/win32/flock.c?rev=1905414&r1=1905413&r2=1905414&view=diff
==============================================================================
--- apr/apr/trunk/file_io/win32/flock.c (original)
+++ apr/apr/trunk/file_io/win32/flock.c Sun Nov 20 07:14:38 2022
@@ -19,10 +19,10 @@
APR_DECLARE(apr_status_t) apr_file_lock(apr_file_t *thefile, int type)
{
const DWORD len = 0xffffffff;
- DWORD flags;
+ DWORD flags;
flags = ((type & APR_FLOCK_NONBLOCK) ? LOCKFILE_FAIL_IMMEDIATELY : 0)
- + (((type & APR_FLOCK_TYPEMASK) == APR_FLOCK_SHARED)
+ + (((type & APR_FLOCK_TYPEMASK) == APR_FLOCK_SHARED)
? 0 : LOCKFILE_EXCLUSIVE_LOCK);
/* Syntax is correct, len is passed for LengthLow and LengthHigh*/
OVERLAPPED offset;
Modified: apr/apr/trunk/file_io/win32/open.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/file_io/win32/open.c?rev=1905414&r1=1905413&r2=1905414&view=diff
==============================================================================
--- apr/apr/trunk/file_io/win32/open.c (original)
+++ apr/apr/trunk/file_io/win32/open.c Sun Nov 20 07:14:38 2022
@@ -34,15 +34,15 @@
#include <io.h>
#include <winioctl.h>
-apr_status_t utf8_to_unicode_path(apr_wchar_t* retstr, apr_size_t retlen,
+apr_status_t utf8_to_unicode_path(apr_wchar_t* retstr, apr_size_t retlen,
const char* srcstr)
{
/* TODO: The computations could preconvert the string to determine
* the true size of the retstr, but that's a memory over speed
* tradeoff that isn't appropriate this early in development.
*
- * Allocate the maximum string length based on leading 4
- * characters of \\?\ (allowing nearly unlimited path lengths)
+ * Allocate the maximum string length based on leading 4
+ * characters of \\?\ (allowing nearly unlimited path lengths)
* plus the trailing null, then transform /'s into \\'s since
* the \\?\ form doesn't allow '/' path seperators.
*
@@ -54,15 +54,15 @@ apr_status_t utf8_to_unicode_path(apr_wc
apr_status_t rv;
/* This is correct, we don't twist the filename if it is will
- * definitely be shorter than 248 characters. It merits some
+ * definitely be shorter than 248 characters. It merits some
* performance testing to see if this has any effect, but there
* seem to be applications that get confused by the resulting
* Unicode \\?\ style file names, especially if they use argv[0]
* or call the Win32 API functions such as GetModuleName, etc.
* Not every application is prepared to handle such names.
- *
- * Note also this is shorter than MAX_PATH, as directory paths
- * are actually limited to 248 characters.
+ *
+ * Note also this is shorter than MAX_PATH, as directory paths
+ * are actually limited to 248 characters.
*
* Note that a utf-8 name can never result in more wide chars
* than the original number of utf-8 narrow chars.
@@ -109,9 +109,9 @@ apr_status_t unicode_to_utf8_path(char*
apr_size_t srcremains = wcslen(srcstr) + 1;
apr_status_t rv;
char *t = retstr;
- if (srcstr[0] == L'\\' && srcstr[1] == L'\\' &&
+ if (srcstr[0] == L'\\' && srcstr[1] == L'\\' &&
srcstr[2] == L'?' && srcstr[3] == L'\\') {
- if (srcstr[4] == L'U' && srcstr[5] == L'N' &&
+ if (srcstr[4] == L'U' && srcstr[5] == L'N' &&
srcstr[6] == L'C' && srcstr[7] == L'\\') {
srcremains -= 8;
srcstr += 8;
@@ -125,7 +125,7 @@ apr_status_t unicode_to_utf8_path(char*
srcstr += 4;
}
}
-
+
if ((rv = apr_conv_utf16_to_utf8(srcstr, &srcremains, t, &retlen))) {
return rv;
}
@@ -191,7 +191,7 @@ static apr_status_t make_sparse_file(apr
&bytesread, file->pOverlapped)) {
rv = APR_SUCCESS;
}
- else
+ else
{
rv = apr_get_os_error();
@@ -206,7 +206,7 @@ static apr_status_t make_sparse_file(apr
CancelIoEx(file->filehand, file->pOverlapped);
}
- if (GetOverlappedResult(file->filehand, file->pOverlapped,
+ if (GetOverlappedResult(file->filehand, file->pOverlapped,
&bytesread, TRUE))
rv = APR_SUCCESS;
else
@@ -230,7 +230,7 @@ apr_status_t file_cleanup(void *thefile)
/* In order to avoid later segfaults with handle 'reuse',
* we must protect against the case that a dup2'ed handle
- * is being closed, and invalidate the corresponding StdHandle
+ * is being closed, and invalidate the corresponding StdHandle
* We also tell msvcrt when stdhandles are closed.
*/
if (file->flags & APR_STD_FLAGS)
@@ -307,8 +307,8 @@ APR_DECLARE(apr_status_t) apr_file_open(
if ((flag & APR_FOPEN_EXCL) && !(flag & APR_FOPEN_CREATE)) {
return APR_EACCES;
- }
-
+ }
+
if (flag & APR_FOPEN_DELONCLOSE) {
attributes |= FILE_FLAG_DELETE_ON_CLOSE;
}
@@ -336,7 +336,7 @@ APR_DECLARE(apr_status_t) apr_file_open(
}
if (flag & APR_FOPEN_XTHREAD) {
- /* This win32 specific feature is required
+ /* This win32 specific feature is required
* to allow multiple threads to work with the file.
*/
attributes |= FILE_FLAG_OVERLAPPED;
@@ -350,7 +350,7 @@ APR_DECLARE(apr_status_t) apr_file_open(
attributes |= FILE_FLAG_SEQUENTIAL_SCAN | FILE_FLAG_OVERLAPPED;
}
- if ((rv = utf8_to_unicode_path(wfname, sizeof(wfname)
+ if ((rv = utf8_to_unicode_path(wfname, sizeof(wfname)
/ sizeof(apr_wchar_t), fname)))
return rv;
handle = CreateFileW(wfname, oflags, sharemode,
@@ -377,7 +377,7 @@ APR_DECLARE(apr_status_t) apr_file_open(
}
/* Need the mutex to share an apr_file_t across multiple threads */
if (flag & APR_FOPEN_XTHREAD) {
- rv = apr_thread_mutex_create(&(*new)->mutex,
+ rv = apr_thread_mutex_create(&(*new)->mutex,
APR_THREAD_MUTEX_DEFAULT, pool);
if (rv) {
if (file_cleanup(*new) == APR_SUCCESS) {
@@ -431,7 +431,7 @@ APR_DECLARE(apr_status_t) apr_file_remov
apr_wchar_t wpath[APR_PATH_MAX];
apr_status_t rv;
- if ((rv = utf8_to_unicode_path(wpath, sizeof(wpath)
+ if ((rv = utf8_to_unicode_path(wpath, sizeof(wpath)
/ sizeof(apr_wchar_t), path))) {
return rv;
}
@@ -463,7 +463,7 @@ APR_DECLARE(apr_status_t) apr_file_renam
return apr_get_os_error();
}
-APR_DECLARE(apr_status_t) apr_file_link(const char *from_path,
+APR_DECLARE(apr_status_t) apr_file_link(const char *from_path,
const char *to_path)
{
apr_status_t rv = APR_SUCCESS;
@@ -513,7 +513,7 @@ APR_DECLARE(apr_status_t) apr_os_file_pu
}
if (flags & APR_FOPEN_XTHREAD) {
apr_status_t rv;
- rv = apr_thread_mutex_create(&(*file)->mutex,
+ rv = apr_thread_mutex_create(&(*file)->mutex,
APR_THREAD_MUTEX_DEFAULT, pool);
if (rv) {
return rv;
@@ -525,13 +525,13 @@ APR_DECLARE(apr_status_t) apr_os_file_pu
/* ### check return codes */
(void) apr_pollset_create(&(*file)->pollset, 1, pool, 0);
#endif
- /* Should we be testing if thefile is a handle to
+ /* Should we be testing if thefile is a handle to
* a PIPE and set up the mechanics appropriately?
*
* (*file)->pipe;
*/
return APR_SUCCESS;
-}
+}
APR_DECLARE(apr_status_t) apr_file_eof(apr_file_t *fptr)
{
@@ -539,10 +539,10 @@ APR_DECLARE(apr_status_t) apr_file_eof(a
return APR_EOF;
}
return APR_SUCCESS;
-}
+}
-APR_DECLARE(apr_status_t) apr_file_open_flags_stderr(apr_file_t **thefile,
- apr_int32_t flags,
+APR_DECLARE(apr_status_t) apr_file_open_flags_stderr(apr_file_t **thefile,
+ apr_int32_t flags,
apr_pool_t *pool)
{
apr_os_file_t file_handle;
@@ -556,7 +556,7 @@ APR_DECLARE(apr_status_t) apr_file_open_
flags | APR_FOPEN_WRITE | APR_STDERR_FLAG, pool);
}
-APR_DECLARE(apr_status_t) apr_file_open_flags_stdout(apr_file_t **thefile,
+APR_DECLARE(apr_status_t) apr_file_open_flags_stdout(apr_file_t **thefile,
apr_int32_t flags,
apr_pool_t *pool)
{
@@ -571,7 +571,7 @@ APR_DECLARE(apr_status_t) apr_file_open_
flags | APR_FOPEN_WRITE | APR_STDOUT_FLAG, pool);
}
-APR_DECLARE(apr_status_t) apr_file_open_flags_stdin(apr_file_t **thefile,
+APR_DECLARE(apr_status_t) apr_file_open_flags_stdin(apr_file_t **thefile,
apr_int32_t flags,
apr_pool_t *pool)
{
@@ -604,5 +604,5 @@ APR_DECLARE(apr_status_t) apr_file_open_
APR_POOL_IMPLEMENT_ACCESSOR(file);
APR_IMPLEMENT_INHERIT_SET(file, flags, pool, file_cleanup)
-
+
APR_IMPLEMENT_INHERIT_UNSET(file, flags, pool, file_cleanup)
Modified: apr/apr/trunk/file_io/win32/readwrite.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/file_io/win32/readwrite.c?rev=1905414&r1=1905413&r2=1905414&view=diff
==============================================================================
--- apr/apr/trunk/file_io/win32/readwrite.c (original)
+++ apr/apr/trunk/file_io/win32/readwrite.c Sun Nov 20 07:14:38 2022
@@ -26,7 +26,7 @@
#include <malloc.h>
/*
- * read_with_timeout()
+ * read_with_timeout()
* Uses async i/o to emulate unix non-blocking i/o with timeouts.
*/
static apr_status_t read_with_timeout(apr_file_t *file, void *buf, apr_size_t len_in, apr_size_t *nbytes)
@@ -61,7 +61,7 @@ static apr_status_t read_with_timeout(ap
}
}
else {
- /* ToDo: Handle zero timeout non-blocking file i/o
+ /* ToDo: Handle zero timeout non-blocking file i/o
* This is not needed until an APR application needs to
* timeout file i/o (which means setting file i/o non-blocking)
*/
@@ -73,7 +73,7 @@ static apr_status_t read_with_timeout(ap
file->pOverlapped->OffsetHigh = (DWORD)(file->filePtr >> 32);
}
- if (ReadFile(file->filehand, buf, len,
+ if (ReadFile(file->filehand, buf, len,
&bytesread, file->pOverlapped)) {
rv = APR_SUCCESS;
}
@@ -86,7 +86,7 @@ static apr_status_t read_with_timeout(ap
* when I/O operation completed syncronously.
* Use fast macro to check that overlapped I/O already
* completed to avoid kernel call.
- */
+ */
if (HasOverlappedIoCompleted(file->pOverlapped)) {
res = WAIT_OBJECT_0;
}
@@ -115,7 +115,7 @@ static apr_status_t read_with_timeout(ap
* fail if the handle is closed, yet the read may have
* completed before we attempted to CancelIo...
*/
- if (GetOverlappedResult(file->filehand, file->pOverlapped,
+ if (GetOverlappedResult(file->filehand, file->pOverlapped,
&bytesread, TRUE)) {
rv = APR_SUCCESS;
}
@@ -135,11 +135,11 @@ static apr_status_t read_with_timeout(ap
rv = APR_EOF;
}
}
-
+
/* OK and 0 bytes read ==> end of file */
if (rv == APR_SUCCESS && bytesread == 0)
rv = APR_EOF;
-
+
if (rv == APR_SUCCESS && file->pOverlapped && file->ftype == APR_FILETYPE_FILE) {
file->filePtr += bytesread;
}
@@ -242,11 +242,11 @@ APR_DECLARE(apr_status_t) apr_file_read(
}
/* If the file is open for xthread support, allocate and
- * initialize the overlapped and io completion event (hEvent).
+ * initialize the overlapped and io completion event (hEvent).
* Threads should NOT share an apr_file_t or its hEvent.
*/
if ((thefile->flags & APR_FOPEN_XTHREAD) && !thefile->pOverlapped ) {
- thefile->pOverlapped = (OVERLAPPED*) apr_pcalloc(thefile->pool,
+ thefile->pOverlapped = (OVERLAPPED*) apr_pcalloc(thefile->pool,
sizeof(OVERLAPPED));
thefile->pOverlapped->hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
if (!thefile->pOverlapped->hEvent) {
@@ -275,7 +275,7 @@ APR_DECLARE(apr_status_t) apr_file_read(
if (thefile->flags & APR_FOPEN_XTHREAD) {
apr_thread_mutex_unlock(thefile->mutex);
}
- } else {
+ } else {
/* Unbuffered i/o */
apr_size_t nbytes;
rv = read_with_timeout(thefile, buf, *len, &nbytes);
@@ -389,11 +389,11 @@ APR_DECLARE(apr_status_t) apr_file_write
DWORD bwrote = 0;
/* If the file is open for xthread support, allocate and
- * initialize the overlapped and io completion event (hEvent).
+ * initialize the overlapped and io completion event (hEvent).
* Threads should NOT share an apr_file_t or its hEvent.
*/
if ((thefile->flags & APR_FOPEN_XTHREAD) && !thefile->pOverlapped ) {
- thefile->pOverlapped = (OVERLAPPED*) apr_pcalloc(thefile->pool,
+ thefile->pOverlapped = (OVERLAPPED*) apr_pcalloc(thefile->pool,
sizeof(OVERLAPPED));
thefile->pOverlapped->hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
if (!thefile->pOverlapped->hEvent) {
@@ -498,7 +498,7 @@ APR_DECLARE(apr_status_t) apr_file_write
rv = apr_get_os_error();
if (rv == APR_FROM_OS_ERROR(ERROR_IO_PENDING)) {
-
+
DWORD res;
/* It seems that WriteFile() return ERROR_IO_PENDING even
@@ -557,7 +557,7 @@ APR_DECLARE(apr_status_t) apr_file_write
*/
APR_DECLARE(apr_status_t) apr_file_writev(apr_file_t *thefile,
const struct iovec *vec,
- apr_size_t nvec,
+ apr_size_t nvec,
apr_size_t *nbytes)
{
apr_status_t rv = APR_SUCCESS;
@@ -602,12 +602,12 @@ APR_DECLARE(apr_status_t) apr_file_getc(
if (rc) {
return rc;
}
-
+
if (bread == 0) {
thefile->eof_hit = TRUE;
return APR_EOF;
}
- return APR_SUCCESS;
+ return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_file_puts(const char *str, apr_file_t *thefile)
@@ -745,7 +745,7 @@ APR_DECLARE(apr_status_t) apr_file_flush
/* There isn't anything to do if we aren't buffering the output
* so just return success.
*/
- return APR_SUCCESS;
+ return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_file_sync(apr_file_t *thefile){
@@ -786,7 +786,7 @@ static int file_printf_flush(apr_vformat
return 0;
}
-APR_DECLARE_NONSTD(int) apr_file_printf(apr_file_t *fptr,
+APR_DECLARE_NONSTD(int) apr_file_printf(apr_file_t *fptr,
const char *format, ...)
{
struct apr_file_printf_data data;
Modified: apr/apr/trunk/file_io/win32/seek.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/file_io/win32/seek.c?rev=1905414&r1=1905413&r2=1905414&view=diff
==============================================================================
--- apr/apr/trunk/file_io/win32/seek.c (original)
+++ apr/apr/trunk/file_io/win32/seek.c Sun Nov 20 07:14:38 2022
@@ -33,7 +33,7 @@ static apr_status_t setptr(apr_file_t *t
thefile->direction = 0;
}
- /* We may be truncating to size here.
+ /* We may be truncating to size here.
* XXX: testing an 'unsigned' as >= 0 below indicates a bug
*/
newbufpos = pos - (thefile->filePtr - thefile->dataRead);
@@ -44,7 +44,7 @@ static apr_status_t setptr(apr_file_t *t
} else {
LARGE_INTEGER li;
li.QuadPart = pos;
-
+
if (!SetFilePointerEx(thefile->filehand, li, NULL, FILE_BEGIN)) {
rv = apr_get_os_error();
}
@@ -78,7 +78,7 @@ APR_DECLARE(apr_status_t) apr_file_seek(
break;
case APR_CUR:
- rc = setptr(thefile, thefile->filePtr - thefile->dataRead
+ rc = setptr(thefile, thefile->filePtr - thefile->dataRead
+ thefile->bufpos + *offset);
break;
@@ -103,11 +103,11 @@ APR_DECLARE(apr_status_t) apr_file_seek(
case APR_SET:
thefile->filePtr = *offset;
break;
-
+
case APR_CUR:
thefile->filePtr += *offset;
break;
-
+
case APR_END:
rc = apr_file_info_get(&finfo, APR_FINFO_SIZE, thefile);
if (rc == APR_SUCCESS && finfo.size + *offset >= 0)
Modified: apr/apr/trunk/locks/beos/proc_mutex.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/locks/beos/proc_mutex.c?rev=1905414&r1=1905413&r2=1905414&view=diff
==============================================================================
--- apr/apr/trunk/locks/beos/proc_mutex.c (original)
+++ apr/apr/trunk/locks/beos/proc_mutex.c Sun Nov 20 07:14:38 2022
@@ -17,7 +17,7 @@
/*Read/Write locking implementation based on the MultiLock code from
* Stephen Beaulieu <hi...@be.com>
*/
-
+
#include "apr_arch_proc_mutex.h"
#include "apr_strings.h"
#include "apr_portable.h"
@@ -28,7 +28,7 @@ static apr_status_t _proc_mutex_cleanup(
if (lock->LockCount != 0) {
/* we're still locked... */
while (atomic_add(&lock->LockCount , -1) > 1){
- /* OK we had more than one person waiting on the lock so
+ /* OK we had more than one person waiting on the lock so
* the sem is also locked. Release it until we have no more
* locks left.
*/
@@ -37,7 +37,7 @@ static apr_status_t _proc_mutex_cleanup(
}
delete_sem(lock->Lock);
return APR_SUCCESS;
-}
+}
APR_DECLARE(apr_status_t) apr_proc_mutex_create(apr_proc_mutex_t **mutex,
const char *fname,
@@ -46,7 +46,7 @@ APR_DECLARE(apr_status_t) apr_proc_mutex
{
apr_proc_mutex_t *new;
apr_status_t stat = APR_SUCCESS;
-
+
if (mech != APR_LOCK_DEFAULT && mech != APR_LOCK_DEFAULT_TIMED) {
return APR_ENOTIMPL;
}
@@ -55,13 +55,13 @@ APR_DECLARE(apr_status_t) apr_proc_mutex
if (new == NULL){
return APR_ENOMEM;
}
-
+
if ((stat = create_sem(0, "APR_Lock")) < B_NO_ERROR) {
_proc_mutex_cleanup(new);
return stat;
}
new->LockCount = 0;
- new->Lock = stat;
+ new->Lock = stat;
new->pool = pool;
apr_pool_cleanup_register(new->pool, (void *)new, _proc_mutex_cleanup,
@@ -77,11 +77,11 @@ APR_DECLARE(apr_status_t) apr_proc_mutex
{
return APR_SUCCESS;
}
-
+
APR_DECLARE(apr_status_t) apr_proc_mutex_lock(apr_proc_mutex_t *mutex)
{
int32 stat;
-
+
if (atomic_add(&mutex->LockCount, 1) > 0) {
if ((stat = acquire_sem(mutex->Lock)) < B_NO_ERROR) {
atomic_add(&mutex->LockCount, -1);
@@ -135,7 +135,7 @@ APR_DECLARE(apr_status_t) apr_proc_mutex
APR_DECLARE(apr_status_t) apr_proc_mutex_unlock(apr_proc_mutex_t *mutex)
{
int32 stat;
-
+
if (atomic_add(&mutex->LockCount, -1) > 1) {
if ((stat = release_sem(mutex->Lock)) < B_NO_ERROR) {
atomic_add(&mutex->LockCount, 1);
@@ -187,7 +187,7 @@ APR_POOL_IMPLEMENT_ACCESSOR(proc_mutex)
/* Implement OS-specific accessors defined in apr_portable.h */
-APR_DECLARE(apr_status_t) apr_os_proc_mutex_get_ex(apr_os_proc_mutex_t *ospmutex,
+APR_DECLARE(apr_status_t) apr_os_proc_mutex_get_ex(apr_os_proc_mutex_t *ospmutex,
apr_proc_mutex_t *pmutex,
apr_lockmech_e *mech)
{
Modified: apr/apr/trunk/locks/beos/thread_cond.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/locks/beos/thread_cond.c?rev=1905414&r1=1905413&r2=1905414&view=diff
==============================================================================
--- apr/apr/trunk/locks/beos/thread_cond.c (original)
+++ apr/apr/trunk/locks/beos/thread_cond.c Sun Nov 20 07:14:38 2022
@@ -36,16 +36,16 @@ static struct waiter_t *make_waiter(apr_
apr_palloc(pool, sizeof(struct waiter_t));
if (w == NULL)
return NULL;
-
+
w->sem = create_sem(0, "apr conditional waiter");
if (w->sem < 0)
return NULL;
APR_RING_ELEM_INIT(w, link);
-
+
return w;
}
-
+
APR_DECLARE(apr_status_t) apr_thread_cond_create(apr_thread_cond_t **cond,
apr_pool_t *pool)
{
@@ -60,12 +60,12 @@ APR_DECLARE(apr_status_t) apr_thread_con
if ((rv = create_sem(1, "apr conditional lock")) < B_OK)
return rv;
-
+
new_cond->lock = rv;
new_cond->pool = pool;
APR_RING_INIT(&new_cond->alist, waiter_t, link);
APR_RING_INIT(&new_cond->flist, waiter_t, link);
-
+
for (i=0;i < 10 ;i++) {
struct waiter_t *nw = make_waiter(pool);
APR_RING_INSERT_TAIL(&new_cond->flist, nw, waiter_t, link);
@@ -87,8 +87,8 @@ static apr_status_t do_wait(apr_thread_c
thread_id cth = find_thread(NULL);
apr_status_t rv;
int flags = B_RELATIVE_TIMEOUT;
-
- /* We must be the owner of the mutex or we can't do this... */
+
+ /* We must be the owner of the mutex or we can't do this... */
if (mutex->owner != cth) {
/* What should we return??? */
return APR_EINVAL;
@@ -99,31 +99,31 @@ static apr_status_t do_wait(apr_thread_c
if (wait)
APR_RING_REMOVE(wait, link);
else
- wait = make_waiter(cond->pool);
+ wait = make_waiter(cond->pool);
APR_RING_INSERT_TAIL(&cond->alist, wait, waiter_t, link);
cond->condlock = mutex;
release_sem(cond->lock);
-
+
apr_thread_mutex_unlock(cond->condlock);
if (timeout == 0)
flags = 0;
-
+
rv = acquire_sem_etc(wait->sem, 1, flags, timeout);
apr_thread_mutex_lock(cond->condlock);
-
+
if (rv != B_OK) {
if (rv == B_TIMED_OUT)
return APR_TIMEUP;
- return rv;
+ return rv;
}
acquire_sem(cond->lock);
APR_RING_REMOVE(wait, link);
APR_RING_INSERT_TAIL(&cond->flist, wait, waiter_t, link);
release_sem(cond->lock);
-
+
return APR_SUCCESS;
}
@@ -144,7 +144,7 @@ APR_DECLARE(apr_status_t) apr_thread_con
{
struct waiter_t *wake;
- acquire_sem(cond->lock);
+ acquire_sem(cond->lock);
if (!APR_RING_EMPTY(&cond->alist, waiter_t, link)) {
wake = APR_RING_FIRST(&cond->alist);
APR_RING_REMOVE(wake, link);
@@ -152,14 +152,14 @@ APR_DECLARE(apr_status_t) apr_thread_con
APR_RING_INSERT_TAIL(&cond->flist, wake, waiter_t, link);
}
release_sem(cond->lock);
-
+
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_thread_cond_broadcast(apr_thread_cond_t *cond)
{
struct waiter_t *wake;
-
+
acquire_sem(cond->lock);
while (! APR_RING_EMPTY(&cond->alist, waiter_t, link)) {
wake = APR_RING_FIRST(&cond->alist);
@@ -168,7 +168,7 @@ APR_DECLARE(apr_status_t) apr_thread_con
APR_RING_INSERT_TAIL(&cond->flist, wake, waiter_t, link);
}
release_sem(cond->lock);
-
+
return APR_SUCCESS;
}
Modified: apr/apr/trunk/locks/beos/thread_mutex.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/locks/beos/thread_mutex.c?rev=1905414&r1=1905413&r2=1905414&view=diff
==============================================================================
--- apr/apr/trunk/locks/beos/thread_mutex.c (original)
+++ apr/apr/trunk/locks/beos/thread_mutex.c Sun Nov 20 07:14:38 2022
@@ -17,7 +17,7 @@
/*Read/Write locking implementation based on the MultiLock code from
* Stephen Beaulieu <hi...@be.com>
*/
-
+
#include "apr_arch_thread_mutex.h"
#include "apr_strings.h"
#include "apr_portable.h"
@@ -28,7 +28,7 @@ static apr_status_t _thread_mutex_cleanu
if (lock->LockCount != 0) {
/* we're still locked... */
while (atomic_add(&lock->LockCount , -1) > 1){
- /* OK we had more than one person waiting on the lock so
+ /* OK we had more than one person waiting on the lock so
* the sem is also locked. Release it until we have no more
* locks left.
*/
@@ -37,7 +37,7 @@ static apr_status_t _thread_mutex_cleanu
}
delete_sem(lock->Lock);
return APR_SUCCESS;
-}
+}
APR_DECLARE(apr_status_t) apr_thread_mutex_create(apr_thread_mutex_t **mutex,
unsigned int flags,
@@ -45,21 +45,21 @@ APR_DECLARE(apr_status_t) apr_thread_mut
{
apr_thread_mutex_t *new_m;
apr_status_t stat = APR_SUCCESS;
-
+
new_m = (apr_thread_mutex_t *)apr_pcalloc(pool, sizeof(apr_thread_mutex_t));
if (new_m == NULL){
return APR_ENOMEM;
}
-
+
if ((stat = create_sem(0, "APR_Lock")) < B_NO_ERROR) {
_thread_mutex_cleanup(new_m);
return stat;
}
new_m->LockCount = 0;
- new_m->Lock = stat;
+ new_m->Lock = stat;
new_m->pool = pool;
- /* Optimal default is APR_THREAD_MUTEX_UNNESTED,
+ /* Optimal default is APR_THREAD_MUTEX_UNNESTED,
* no additional checks required for either flag.
*/
new_m->nested = flags & APR_THREAD_MUTEX_NESTED;
@@ -78,19 +78,19 @@ APR_DECLARE(apr_status_t) apr_thread_mut
apr_pool_t *pool)
{
return APR_ENOTIMPL;
-}
+}
#endif
-
+
APR_DECLARE(apr_status_t) apr_thread_mutex_lock(apr_thread_mutex_t *mutex)
{
int32 stat;
thread_id me = find_thread(NULL);
-
+
if (mutex->nested && mutex->owner == me) {
mutex->owner_ref++;
return APR_SUCCESS;
}
-
+
if (atomic_add(&mutex->LockCount, 1) > 0) {
if ((stat = acquire_sem(mutex->Lock)) < B_NO_ERROR) {
/* Oh dear, acquire_sem failed!! */
@@ -101,7 +101,7 @@ APR_DECLARE(apr_status_t) apr_thread_mut
mutex->owner = me;
mutex->owner_ref = 1;
-
+
return APR_SUCCESS;
}
@@ -109,12 +109,12 @@ APR_DECLARE(apr_status_t) apr_thread_mut
{
int32 stat;
thread_id me = find_thread(NULL);
-
+
if (mutex->nested && mutex->owner == me) {
mutex->owner_ref++;
return APR_SUCCESS;
}
-
+
if (atomic_add(&mutex->LockCount, 1) > 0) {
if ((stat = acquire_sem_etc(mutex->Lock, 1, 0, 0)) < B_NO_ERROR) {
atomic_add(&mutex->LockCount, -1);
@@ -127,7 +127,7 @@ APR_DECLARE(apr_status_t) apr_thread_mut
mutex->owner = me;
mutex->owner_ref = 1;
-
+
return APR_SUCCESS;
}
@@ -136,12 +136,12 @@ APR_DECLARE(apr_status_t) apr_thread_mut
{
int32 stat;
thread_id me = find_thread(NULL);
-
+
if (mutex->nested && mutex->owner == me) {
mutex->owner_ref++;
return APR_SUCCESS;
}
-
+
if (atomic_add(&mutex->LockCount, 1) > 0) {
if (timeout <= 0) {
stat = B_TIMED_OUT;
@@ -161,20 +161,20 @@ APR_DECLARE(apr_status_t) apr_thread_mut
mutex->owner = me;
mutex->owner_ref = 1;
-
+
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_thread_mutex_unlock(apr_thread_mutex_t *mutex)
{
int32 stat;
-
+
if (mutex->nested && mutex->owner == find_thread(NULL)) {
mutex->owner_ref--;
if (mutex->owner_ref > 0)
return APR_SUCCESS;
}
-
+
if (atomic_add(&mutex->LockCount, -1) > 1) {
if ((stat = release_sem(mutex->Lock)) < B_NO_ERROR) {
atomic_add(&mutex->LockCount, 1);
Modified: apr/apr/trunk/locks/beos/thread_rwlock.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/locks/beos/thread_rwlock.c?rev=1905414&r1=1905413&r2=1905414&view=diff
==============================================================================
--- apr/apr/trunk/locks/beos/thread_rwlock.c (original)
+++ apr/apr/trunk/locks/beos/thread_rwlock.c Sun Nov 20 07:14:38 2022
@@ -17,7 +17,7 @@
/*Read/Write locking implementation based on the MultiLock code from
* Stephen Beaulieu <hi...@be.com>
*/
-
+
#include "apr_arch_thread_rwlock.h"
#include "apr_strings.h"
#include "apr_portable.h"
@@ -43,23 +43,23 @@ static apr_status_t _thread_rw_cleanup(v
release_sem (mutex->Lock);
}
}
-
+
delete_sem(mutex->Read);
delete_sem(mutex->Write);
delete_sem(mutex->Lock);
return APR_SUCCESS;
-}
+}
APR_DECLARE(apr_status_t) apr_thread_rwlock_create(apr_thread_rwlock_t **rwlock,
apr_pool_t *pool)
{
apr_thread_rwlock_t *new;
-
+
new = (apr_thread_rwlock_t *)apr_pcalloc(pool, sizeof(apr_thread_rwlock_t));
if (new == NULL){
return APR_ENOMEM;
}
-
+
new->pool = pool;
/* we need to make 3 locks... */
new->ReadCount = 0;
@@ -68,7 +68,7 @@ APR_DECLARE(apr_status_t) apr_thread_rwl
new->Read = create_sem(0, "APR_ReadLock");
new->Write = create_sem(0, "APR_WriteLock");
new->Lock = create_sem(0, "APR_Lock");
-
+
if (new->Lock < 0 || new->Read < 0 || new->Write < 0) {
_thread_rw_cleanup(new);
return -1;
@@ -132,7 +132,7 @@ APR_DECLARE(apr_status_t) apr_thread_rwl
rwlock->writer = find_thread(NULL);
}
}
-
+
return rv;
}
Modified: apr/apr/trunk/locks/netware/proc_mutex.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/locks/netware/proc_mutex.c?rev=1905414&r1=1905413&r2=1905414&view=diff
==============================================================================
--- apr/apr/trunk/locks/netware/proc_mutex.c (original)
+++ apr/apr/trunk/locks/netware/proc_mutex.c Sun Nov 20 07:14:38 2022
@@ -40,8 +40,8 @@ APR_DECLARE(apr_status_t) apr_proc_mutex
new_mutex = (apr_proc_mutex_t *)apr_pcalloc(pool, sizeof(apr_proc_mutex_t));
if (new_mutex == NULL) {
return APR_ENOMEM;
- }
-
+ }
+
new_mutex->pool = pool;
ret = apr_thread_mutex_create(&(new_mutex->mutex), flags, pool);
@@ -57,7 +57,7 @@ APR_DECLARE(apr_status_t) apr_proc_mutex
{
return APR_SUCCESS;
}
-
+
APR_DECLARE(apr_status_t) apr_proc_mutex_lock(apr_proc_mutex_t *mutex)
{
if (mutex)
@@ -125,7 +125,7 @@ APR_POOL_IMPLEMENT_ACCESSOR(proc_mutex)
/* Implement OS-specific accessors defined in apr_portable.h */
-APR_DECLARE(apr_status_t) apr_os_proc_mutex_get_ex(apr_os_proc_mutex_t *ospmutex,
+APR_DECLARE(apr_status_t) apr_os_proc_mutex_get_ex(apr_os_proc_mutex_t *ospmutex,
apr_proc_mutex_t *pmutex,
apr_lockmech_e *mech)
{
Modified: apr/apr/trunk/locks/netware/thread_cond.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/locks/netware/thread_cond.c?rev=1905414&r1=1905413&r2=1905414&view=diff
==============================================================================
--- apr/apr/trunk/locks/netware/thread_cond.c (original)
+++ apr/apr/trunk/locks/netware/thread_cond.c Sun Nov 20 07:14:38 2022
@@ -28,9 +28,9 @@ static apr_status_t thread_cond_cleanup(
{
apr_thread_cond_t *cond = (apr_thread_cond_t *)data;
- NXCondFree(cond->cond);
+ NXCondFree(cond->cond);
return APR_SUCCESS;
-}
+}
APR_DECLARE(apr_status_t) apr_thread_cond_create(apr_thread_cond_t **cond,
apr_pool_t *pool)
@@ -38,18 +38,18 @@ APR_DECLARE(apr_status_t) apr_thread_con
apr_thread_cond_t *new_cond = NULL;
new_cond = (apr_thread_cond_t *)apr_pcalloc(pool, sizeof(apr_thread_cond_t));
-
+
if(new_cond ==NULL) {
return APR_ENOMEM;
- }
+ }
new_cond->pool = pool;
new_cond->cond = NXCondAlloc(NULL);
-
+
if(new_cond->cond == NULL)
return APR_ENOMEM;
- apr_pool_cleanup_register(new_cond->pool, new_cond,
+ apr_pool_cleanup_register(new_cond->pool, new_cond,
(void*)thread_cond_cleanup,
apr_pool_cleanup_null);
*cond = new_cond;
Modified: apr/apr/trunk/locks/netware/thread_mutex.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/locks/netware/thread_mutex.c?rev=1905414&r1=1905413&r2=1905414&view=diff
==============================================================================
--- apr/apr/trunk/locks/netware/thread_mutex.c (original)
+++ apr/apr/trunk/locks/netware/thread_mutex.c Sun Nov 20 07:14:38 2022
@@ -26,7 +26,7 @@ static apr_status_t thread_mutex_cleanup
{
apr_thread_mutex_t *mutex = (apr_thread_mutex_t *)data;
- NXMutexFree(mutex->mutex);
+ NXMutexFree(mutex->mutex);
return APR_SUCCESS;
}
@@ -45,23 +45,23 @@ APR_DECLARE(apr_status_t) apr_thread_mut
if (new_mutex == NULL) {
return APR_ENOMEM;
- }
+ }
new_mutex->pool = pool;
new_mutex->mutex = NXMutexAlloc(NX_MUTEX_RECURSIVE, 0, NULL);
-
+
if(new_mutex->mutex == NULL)
return APR_ENOMEM;
if (flags & APR_THREAD_MUTEX_TIMED) {
apr_status_t rv = apr_thread_cond_create(&new_mutex->cond, pool);
if (rv != APR_SUCCESS) {
- NXMutexFree(new_mutex->mutex);
+ NXMutexFree(new_mutex->mutex);
return rv;
}
}
- apr_pool_cleanup_register(new_mutex->pool, new_mutex,
+ apr_pool_cleanup_register(new_mutex->pool, new_mutex,
(void*)thread_mutex_cleanup,
apr_pool_cleanup_null);
*mutex = new_mutex;
Modified: apr/apr/trunk/locks/netware/thread_rwlock.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/locks/netware/thread_rwlock.c?rev=1905414&r1=1905413&r2=1905414&view=diff
==============================================================================
--- apr/apr/trunk/locks/netware/thread_rwlock.c (original)
+++ apr/apr/trunk/locks/netware/thread_rwlock.c Sun Nov 20 07:14:38 2022
@@ -27,13 +27,13 @@ static apr_status_t thread_rwlock_cleanu
NXRwLockFree (rwlock->rwlock);
return APR_SUCCESS;
-}
+}
APR_DECLARE(apr_status_t) apr_thread_rwlock_create(apr_thread_rwlock_t **rwlock,
apr_pool_t *pool)
{
apr_thread_rwlock_t *new_rwlock = NULL;
-
+
NXHierarchy_t hierarchy = 1; /* for libc NKS NXRwLockAlloc */
NXLockInfo_t *info; /* for libc NKS NXRwLockAlloc */
@@ -41,9 +41,9 @@ APR_DECLARE(apr_status_t) apr_thread_rwl
if(new_rwlock ==NULL) {
return APR_ENOMEM;
- }
+ }
new_rwlock->pool = pool;
-
+
info = (NXLockInfo_t *)apr_pcalloc(pool, sizeof(NXLockInfo_t));
new_rwlock->rwlock = NXRwLockAlloc(hierarchy, info);
if(new_rwlock->rwlock == NULL)
Modified: apr/apr/trunk/locks/os2/proc_mutex.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/locks/os2/proc_mutex.c?rev=1905414&r1=1905413&r2=1905414&view=diff
==============================================================================
--- apr/apr/trunk/locks/os2/proc_mutex.c (original)
+++ apr/apr/trunk/locks/os2/proc_mutex.c Sun Nov 20 07:14:38 2022
@@ -165,7 +165,7 @@ APR_DECLARE(apr_status_t) apr_proc_mutex
apr_interval_time_t timeout)
{
ULONG rc;
-
+
if (timeout <= 0) {
rc = DosRequestMutexSem(mutex->hMutex, SEM_IMMEDIATE_RETURN);
}
@@ -234,7 +234,7 @@ APR_POOL_IMPLEMENT_ACCESSOR(proc_mutex)
/* Implement OS-specific accessors defined in apr_portable.h */
-APR_DECLARE(apr_status_t) apr_os_proc_mutex_get_ex(apr_os_proc_mutex_t *ospmutex,
+APR_DECLARE(apr_status_t) apr_os_proc_mutex_get_ex(apr_os_proc_mutex_t *ospmutex,
apr_proc_mutex_t *pmutex,
apr_lockmech_e *mech)
{
Modified: apr/apr/trunk/locks/unix/proc_mutex.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/locks/unix/proc_mutex.c?rev=1905414&r1=1905413&r2=1905414&view=diff
==============================================================================
--- apr/apr/trunk/locks/unix/proc_mutex.c (original)
+++ apr/apr/trunk/locks/unix/proc_mutex.c Sun Nov 20 07:14:38 2022
@@ -38,7 +38,7 @@ static apr_status_t proc_mutex_no_child_
{
return APR_SUCCESS;
}
-#endif
+#endif
#if APR_HAS_POSIXSEM_SERIALIZE || APR_HAS_PROC_PTHREAD_SERIALIZE
static apr_status_t proc_mutex_no_perms_set(apr_proc_mutex_t *mutex,
@@ -48,7 +48,7 @@ static apr_status_t proc_mutex_no_perms_
{
return APR_ENOTIMPL;
}
-#endif
+#endif
#if APR_HAS_FCNTL_SERIALIZE \
|| APR_HAS_FLOCK_SERIALIZE \
@@ -98,13 +98,13 @@ static apr_status_t proc_mutex_spinsleep
static apr_status_t proc_mutex_posix_cleanup(void *mutex_)
{
apr_proc_mutex_t *mutex = mutex_;
-
+
if (sem_close(mutex->os.psem_interproc) < 0) {
return errno;
}
return APR_SUCCESS;
-}
+}
static apr_status_t proc_mutex_posix_create(apr_proc_mutex_t *new_mutex,
const char *fname)
@@ -113,7 +113,7 @@ static apr_status_t proc_mutex_posix_cre
#define APR_POSIXSEM_NAME_MIN 13
sem_t *psem;
char semname[APR_MD5_DIGESTSIZE * 2 + 2];
-
+
/*
* This bogusness is to follow what appears to be the
* lowest common denominator in Posix semaphore naming:
@@ -179,7 +179,7 @@ static apr_status_t proc_mutex_posix_cre
new_mutex->os.psem_interproc = psem;
new_mutex->fname = apr_pstrdup(new_mutex->pool, semname);
apr_pool_cleanup_register(new_mutex->pool, (void *)new_mutex,
- apr_proc_mutex_cleanup,
+ apr_proc_mutex_cleanup,
apr_pool_cleanup_null);
return APR_SUCCESS;
}
@@ -230,7 +230,7 @@ static apr_status_t proc_mutex_posix_tim
timeout += apr_time_now();
abstime.tv_sec = apr_time_sec(timeout);
abstime.tv_nsec = apr_time_usec(timeout) * 1000; /* nanoseconds */
-
+
do {
rc = sem_timedwait(mutex->os.psem_interproc, &abstime);
} while (rc < 0 && errno == EINTR);
@@ -305,20 +305,20 @@ static apr_status_t proc_mutex_sysv_clea
{
apr_proc_mutex_t *mutex=mutex_;
union semun ick;
-
+
if (mutex->os.crossproc != -1) {
ick.val = 0;
semctl(mutex->os.crossproc, 0, IPC_RMID, ick);
}
return APR_SUCCESS;
-}
+}
static apr_status_t proc_mutex_sysv_create(apr_proc_mutex_t *new_mutex,
const char *fname)
{
union semun ick;
apr_status_t rv;
-
+
new_mutex->os.crossproc = semget(IPC_PRIVATE, 1, IPC_CREAT | 0600);
if (new_mutex->os.crossproc == -1) {
rv = errno;
@@ -334,7 +334,7 @@ static apr_status_t proc_mutex_sysv_crea
}
new_mutex->curr_locked = 0;
apr_pool_cleanup_register(new_mutex->pool,
- (void *)new_mutex, apr_proc_mutex_cleanup,
+ (void *)new_mutex, apr_proc_mutex_cleanup,
apr_pool_cleanup_null);
return APR_SUCCESS;
}
@@ -588,7 +588,7 @@ static apr_status_t proc_mutex_pthread_c
new_mutex->os.pthread_interproc = mmap(NULL, sizeof(proc_pthread_mutex_t),
PROT_READ | PROT_WRITE, MAP_SHARED,
- fd, 0);
+ fd, 0);
if (new_mutex->os.pthread_interproc == MAP_FAILED) {
new_mutex->os.pthread_interproc = NULL;
rv = errno;
@@ -665,18 +665,18 @@ static apr_status_t proc_mutex_pthread_c
apr_pool_cleanup_register(new_mutex->pool,
(void *)new_mutex,
- apr_proc_mutex_cleanup,
+ apr_proc_mutex_cleanup,
apr_pool_cleanup_null);
return APR_SUCCESS;
}
static apr_status_t proc_mutex_pthread_child_init(apr_proc_mutex_t **mutex,
- apr_pool_t *pool,
+ apr_pool_t *pool,
const char *fname)
{
(*mutex)->curr_locked = 0;
if (proc_pthread_mutex_inc(*mutex)) {
- apr_pool_cleanup_register(pool, *mutex, proc_pthread_mutex_unref,
+ apr_pool_cleanup_register(pool, *mutex, proc_pthread_mutex_unref,
apr_pool_cleanup_null);
}
return APR_SUCCESS;
@@ -690,7 +690,7 @@ static apr_status_t proc_mutex_pthread_a
#if APR_USE_PROC_PTHREAD_MUTEX_COND
if (proc_pthread_mutex_is_cond(mutex)) {
if ((rv = pthread_mutex_lock(&proc_pthread_mutex(mutex)))) {
-#ifdef HAVE_ZOS_PTHREADS
+#ifdef HAVE_ZOS_PTHREADS
rv = errno;
#endif
#if defined(HAVE_PTHREAD_MUTEX_ROBUST) || defined(HAVE_PTHREAD_MUTEX_ROBUST_NP)
@@ -800,7 +800,7 @@ static apr_status_t proc_mutex_pthread_a
rv = pthread_mutex_timedlock(&proc_pthread_mutex(mutex), &abstime);
if (rv) {
-#ifdef HAVE_ZOS_PTHREADS
+#ifdef HAVE_ZOS_PTHREADS
rv = errno;
#endif
if (rv == ETIMEDOUT) {
@@ -856,7 +856,7 @@ static apr_status_t proc_mutex_pthread_r
#if APR_USE_PROC_PTHREAD_MUTEX_COND
if (proc_pthread_mutex_is_cond(mutex)) {
if ((rv = pthread_mutex_lock(&proc_pthread_mutex(mutex)))) {
-#ifdef HAVE_ZOS_PTHREADS
+#ifdef HAVE_ZOS_PTHREADS
rv = errno;
#endif
#if defined(HAVE_PTHREAD_MUTEX_ROBUST) || defined(HAVE_PTHREAD_MUTEX_ROBUST_NP)
@@ -940,7 +940,7 @@ static apr_status_t proc_mutex_pthread_c
rv = errno;
#endif
apr_pool_cleanup_run(new_mutex->pool, new_mutex,
- apr_proc_mutex_cleanup);
+ apr_proc_mutex_cleanup);
return rv;
}
if ((rv = pthread_condattr_setpshared(&cattr, PTHREAD_PROCESS_SHARED))) {
@@ -949,7 +949,7 @@ static apr_status_t proc_mutex_pthread_c
#endif
pthread_condattr_destroy(&cattr);
apr_pool_cleanup_run(new_mutex->pool, new_mutex,
- apr_proc_mutex_cleanup);
+ apr_proc_mutex_cleanup);
return rv;
}
if ((rv = pthread_cond_init(&proc_pthread_mutex_cond(new_mutex),
@@ -959,7 +959,7 @@ static apr_status_t proc_mutex_pthread_c
#endif
pthread_condattr_destroy(&cattr);
apr_pool_cleanup_run(new_mutex->pool, new_mutex,
- apr_proc_mutex_cleanup);
+ apr_proc_mutex_cleanup);
return rv;
}
pthread_condattr_destroy(&cattr);
@@ -1019,7 +1019,7 @@ static apr_status_t proc_mutex_fcntl_cle
if (status != APR_SUCCESS)
return status;
}
-
+
if (mutex->interproc) {
status = apr_file_close(mutex->interproc);
}
@@ -1030,13 +1030,13 @@ static apr_status_t proc_mutex_fcntl_cle
status = errno;
}
return status;
-}
+}
static apr_status_t proc_mutex_fcntl_create(apr_proc_mutex_t *new_mutex,
const char *fname)
{
int rv;
-
+
if (fname) {
new_mutex->fname = apr_pstrdup(new_mutex->pool, fname);
rv = apr_file_open(&new_mutex->interproc, new_mutex->fname,
@@ -1050,7 +1050,7 @@ static apr_status_t proc_mutex_fcntl_cre
APR_FOPEN_CREATE | APR_FOPEN_WRITE | APR_FOPEN_EXCL,
new_mutex->pool);
}
-
+
if (rv != APR_SUCCESS) {
return rv;
}
@@ -1061,9 +1061,9 @@ static apr_status_t proc_mutex_fcntl_cre
unlink(new_mutex->fname);
apr_pool_cleanup_register(new_mutex->pool,
(void*)new_mutex,
- apr_proc_mutex_cleanup,
+ apr_proc_mutex_cleanup,
apr_pool_cleanup_null);
- return APR_SUCCESS;
+ return APR_SUCCESS;
}
static apr_status_t proc_mutex_fcntl_acquire(apr_proc_mutex_t *mutex)
@@ -1179,13 +1179,13 @@ static apr_status_t proc_mutex_flock_cle
unlink(mutex->fname);
}
return status;
-}
+}
static apr_status_t proc_mutex_flock_create(apr_proc_mutex_t *new_mutex,
const char *fname)
{
int rv;
-
+
if (fname) {
new_mutex->fname = apr_pstrdup(new_mutex->pool, fname);
rv = apr_file_open(&new_mutex->interproc, new_mutex->fname,
@@ -1199,7 +1199,7 @@ static apr_status_t proc_mutex_flock_cre
APR_FOPEN_CREATE | APR_FOPEN_WRITE | APR_FOPEN_EXCL,
new_mutex->pool);
}
-
+
if (rv != APR_SUCCESS) {
proc_mutex_flock_cleanup(new_mutex);
return rv;
@@ -1260,7 +1260,7 @@ static apr_status_t proc_mutex_flock_rel
}
static apr_status_t proc_mutex_flock_child_init(apr_proc_mutex_t **mutex,
- apr_pool_t *pool,
+ apr_pool_t *pool,
const char *fname)
{
apr_proc_mutex_t *new_mutex;
@@ -1521,7 +1521,7 @@ APR_DECLARE(const char *) apr_proc_mutex
return apr_proc_mutex_name(&mutex);
}
-
+
static apr_status_t proc_mutex_create(apr_proc_mutex_t *new_mutex, apr_lockmech_e mech, const char *fname)
{
apr_status_t rv;
@@ -1626,7 +1626,7 @@ APR_POOL_IMPLEMENT_ACCESSOR(proc_mutex)
/* Implement OS-specific accessors defined in apr_portable.h */
-APR_DECLARE(apr_status_t) apr_os_proc_mutex_get_ex(apr_os_proc_mutex_t *ospmutex,
+APR_DECLARE(apr_status_t) apr_os_proc_mutex_get_ex(apr_os_proc_mutex_t *ospmutex,
apr_proc_mutex_t *pmutex,
apr_lockmech_e *mech)
{
@@ -1668,7 +1668,7 @@ APR_DECLARE(apr_status_t) apr_os_proc_mu
#endif
if (rv == APR_SUCCESS && register_cleanup) {
- apr_pool_cleanup_register(pool, *pmutex, apr_proc_mutex_cleanup,
+ apr_pool_cleanup_register(pool, *pmutex, apr_proc_mutex_cleanup,
apr_pool_cleanup_null);
}
return rv;
Modified: apr/apr/trunk/locks/unix/thread_cond.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/locks/unix/thread_cond.c?rev=1905414&r1=1905413&r2=1905414&view=diff
==============================================================================
--- apr/apr/trunk/locks/unix/thread_cond.c (original)
+++ apr/apr/trunk/locks/unix/thread_cond.c Sun Nov 20 07:14:38 2022
@@ -33,7 +33,7 @@ static apr_status_t thread_cond_cleanup(
}
#endif
return rv;
-}
+}
APR_DECLARE(apr_status_t) apr_thread_cond_create(apr_thread_cond_t **cond,
apr_pool_t *pool)
Modified: apr/apr/trunk/locks/unix/thread_mutex.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/locks/unix/thread_mutex.c?rev=1905414&r1=1905413&r2=1905414&view=diff
==============================================================================
--- apr/apr/trunk/locks/unix/thread_mutex.c (original)
+++ apr/apr/trunk/locks/unix/thread_mutex.c Sun Nov 20 07:14:38 2022
@@ -32,7 +32,7 @@ static apr_status_t thread_mutex_cleanup
}
#endif
return rv;
-}
+}
APR_DECLARE(apr_status_t) apr_thread_mutex_create(apr_thread_mutex_t **mutex,
unsigned int flags,
@@ -40,7 +40,7 @@ APR_DECLARE(apr_status_t) apr_thread_mut
{
apr_thread_mutex_t *new_mutex;
apr_status_t rv;
-
+
#ifndef HAVE_PTHREAD_MUTEX_RECURSIVE
if (flags & APR_THREAD_MUTEX_NESTED) {
return APR_ENOTIMPL;
@@ -53,18 +53,18 @@ APR_DECLARE(apr_status_t) apr_thread_mut
#ifdef HAVE_PTHREAD_MUTEX_RECURSIVE
if (flags & APR_THREAD_MUTEX_NESTED) {
pthread_mutexattr_t mattr;
-
+
rv = pthread_mutexattr_init(&mattr);
if (rv) return rv;
-
+
rv = pthread_mutexattr_settype(&mattr, PTHREAD_MUTEX_RECURSIVE);
if (rv) {
pthread_mutexattr_destroy(&mattr);
return rv;
}
-
+
rv = pthread_mutex_init(&new_mutex->mutex, &mattr);
-
+
pthread_mutexattr_destroy(&mattr);
} else
#endif
@@ -74,7 +74,7 @@ APR_DECLARE(apr_status_t) apr_thread_mut
rv = pthread_mutexattr_init(&mattr);
if (rv) return rv;
-
+
rv = pthread_mutexattr_settype(&mattr, PTHREAD_MUTEX_ERRORCHECK);
if (rv) {
pthread_mutexattr_destroy(&mattr);
@@ -351,7 +351,7 @@ APR_DECLARE(apr_status_t) apr_thread_mut
if (rv == APR_SUCCESS) {
rv = rv2;
}
-
+
return rv;
}
Modified: apr/apr/trunk/locks/unix/thread_rwlock.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/locks/unix/thread_rwlock.c?rev=1905414&r1=1905413&r2=1905414&view=diff
==============================================================================
--- apr/apr/trunk/locks/unix/thread_rwlock.c (original)
+++ apr/apr/trunk/locks/unix/thread_rwlock.c Sun Nov 20 07:14:38 2022
@@ -35,7 +35,7 @@ static apr_status_t thread_rwlock_cleanu
}
#endif
return stat;
-}
+}
APR_DECLARE(apr_status_t) apr_thread_rwlock_create(apr_thread_rwlock_t **rwlock,
apr_pool_t *pool)
Modified: apr/apr/trunk/locks/win32/proc_mutex.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/locks/win32/proc_mutex.c?rev=1905414&r1=1905413&r2=1905414&view=diff
==============================================================================
--- apr/apr/trunk/locks/win32/proc_mutex.c (original)
+++ apr/apr/trunk/locks/win32/proc_mutex.c Sun Nov 20 07:14:38 2022
@@ -67,7 +67,7 @@ APR_DECLARE(apr_status_t) apr_proc_mutex
(*mutex)->pool = pool;
(*mutex)->handle = hMutex;
(*mutex)->fname = fname;
- apr_pool_cleanup_register((*mutex)->pool, *mutex,
+ apr_pool_cleanup_register((*mutex)->pool, *mutex,
proc_mutex_cleanup, apr_pool_cleanup_null);
return APR_SUCCESS;
}
@@ -99,11 +99,11 @@ APR_DECLARE(apr_status_t) apr_proc_mutex
(*mutex)->pool = pool;
(*mutex)->handle = hMutex;
(*mutex)->fname = fname;
- apr_pool_cleanup_register((*mutex)->pool, *mutex,
+ apr_pool_cleanup_register((*mutex)->pool, *mutex,
proc_mutex_cleanup, apr_pool_cleanup_null);
return APR_SUCCESS;
}
-
+
APR_DECLARE(apr_status_t) apr_proc_mutex_lock(apr_proc_mutex_t *mutex)
{
DWORD rv;
@@ -124,7 +124,7 @@ APR_DECLARE(apr_status_t) apr_proc_mutex
if (rv == WAIT_OBJECT_0 || rv == WAIT_ABANDONED) {
return APR_SUCCESS;
- }
+ }
else if (rv == WAIT_TIMEOUT) {
return APR_EBUSY;
}
@@ -143,7 +143,7 @@ APR_DECLARE(apr_status_t) apr_proc_mutex
}
if (rv == WAIT_OBJECT_0 || rv == WAIT_ABANDONED) {
return APR_SUCCESS;
- }
+ }
return apr_get_os_error();
}
@@ -197,7 +197,7 @@ APR_POOL_IMPLEMENT_ACCESSOR(proc_mutex)
/* Implement OS-specific accessors defined in apr_portable.h */
-APR_DECLARE(apr_status_t) apr_os_proc_mutex_get_ex(apr_os_proc_mutex_t *ospmutex,
+APR_DECLARE(apr_status_t) apr_os_proc_mutex_get_ex(apr_os_proc_mutex_t *ospmutex,
apr_proc_mutex_t *pmutex,
apr_lockmech_e *mech)
{
Modified: apr/apr/trunk/memcache/apr_memcache.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/memcache/apr_memcache.c?rev=1905414&r1=1905413&r2=1905414&view=diff
==============================================================================
--- apr/apr/trunk/memcache/apr_memcache.c (original)
+++ apr/apr/trunk/memcache/apr_memcache.c Sun Nov 20 07:14:38 2022
@@ -30,7 +30,7 @@ struct apr_memcache_conn_t
apr_bucket_brigade *bb;
apr_bucket_brigade *tb;
apr_memcache_server_t *ms;
-};
+};
/* Strings for Client Commands */
@@ -124,7 +124,7 @@ static apr_status_t make_server_dead(apr
static apr_status_t make_server_live(apr_memcache_t *mc, apr_memcache_server_t *ms)
{
- ms->status = APR_MC_SERVER_LIVE;
+ ms->status = APR_MC_SERVER_LIVE;
return APR_SUCCESS;
}
@@ -145,7 +145,7 @@ APR_DECLARE(apr_status_t) apr_memcache_a
static apr_status_t mc_version_ping(apr_memcache_server_t *ms);
-APR_DECLARE(apr_memcache_server_t *)
+APR_DECLARE(apr_memcache_server_t *)
apr_memcache_find_server_hash(apr_memcache_t *mc, const apr_uint32_t hash)
{
if (mc->server_func) {
@@ -154,9 +154,9 @@ apr_memcache_find_server_hash(apr_memcac
else {
return apr_memcache_find_server_hash_default(NULL, mc, hash);
}
-}
+}
-APR_DECLARE(apr_memcache_server_t *)
+APR_DECLARE(apr_memcache_server_t *)
apr_memcache_find_server_hash_default(void *baton, apr_memcache_t *mc,
const apr_uint32_t hash)
{
@@ -164,7 +164,7 @@ apr_memcache_find_server_hash_default(vo
apr_uint32_t h = hash ? hash : 1;
apr_uint32_t i = 0;
apr_time_t curtime = 0;
-
+
if(mc->ntotal == 0) {
return NULL;
}
@@ -222,7 +222,7 @@ APR_DECLARE(apr_memcache_server_t *) apr
return NULL;
}
-static apr_status_t ms_find_conn(apr_memcache_server_t *ms, apr_memcache_conn_t **conn)
+static apr_status_t ms_find_conn(apr_memcache_server_t *ms, apr_memcache_conn_t **conn)
{
apr_status_t rv;
apr_bucket_alloc_t *balloc;
@@ -249,7 +249,7 @@ static apr_status_t ms_find_conn(apr_mem
return rv;
}
-static apr_status_t ms_bad_conn(apr_memcache_server_t *ms, apr_memcache_conn_t *conn)
+static apr_status_t ms_bad_conn(apr_memcache_server_t *ms, apr_memcache_conn_t *conn)
{
#if APR_HAS_THREADS
return apr_reslist_invalidate(ms->conns, conn);
@@ -258,7 +258,7 @@ static apr_status_t ms_bad_conn(apr_memc
#endif
}
-static apr_status_t ms_release_conn(apr_memcache_server_t *ms, apr_memcache_conn_t *conn)
+static apr_status_t ms_release_conn(apr_memcache_server_t *ms, apr_memcache_conn_t *conn)
{
apr_pool_clear(conn->tp);
#if APR_HAS_THREADS
@@ -367,7 +367,7 @@ mc_conn_construct(void **conn_, void *pa
else {
*conn_ = conn;
}
-
+
return rv;
}
@@ -378,26 +378,26 @@ mc_conn_destruct(void *conn_, void *para
apr_memcache_conn_t *conn = (apr_memcache_conn_t*)conn_;
struct iovec vec[2];
apr_size_t written;
-
+
/* send a quit message to the memcached server to be nice about it. */
vec[0].iov_base = MC_QUIT;
vec[0].iov_len = MC_QUIT_LEN;
vec[1].iov_base = MC_EOL;
vec[1].iov_len = MC_EOL_LEN;
-
+
/* Return values not checked, since we just want to make it go away. */
apr_socket_sendv(conn->sock, vec, 2, &written);
apr_socket_close(conn->sock);
apr_pool_destroy(conn->p);
-
+
return APR_SUCCESS;
}
#endif
-APR_DECLARE(apr_status_t) apr_memcache_server_create(apr_pool_t *p,
- const char *host, apr_port_t port,
+APR_DECLARE(apr_status_t) apr_memcache_server_create(apr_pool_t *p,
+ const char *host, apr_port_t port,
apr_uint32_t min, apr_uint32_t smax,
apr_uint32_t max, apr_uint32_t ttl,
apr_memcache_server_t **ms)
@@ -423,7 +423,7 @@ APR_DECLARE(apr_status_t) apr_memcache_s
return rv;
}
- rv = apr_reslist_create(&server->conns,
+ rv = apr_reslist_create(&server->conns,
min, /* hard minimum */
smax, /* soft maximum */
max, /* hard maximum */
@@ -450,11 +450,11 @@ APR_DECLARE(apr_status_t) apr_memcache_s
APR_DECLARE(apr_status_t) apr_memcache_create(apr_pool_t *p,
apr_uint16_t max_servers, apr_uint32_t flags,
- apr_memcache_t **memcache)
+ apr_memcache_t **memcache)
{
apr_status_t rv = APR_SUCCESS;
apr_memcache_t *mc;
-
+
mc = apr_palloc(p, sizeof(apr_memcache_t));
mc->p = p;
mc->nalloc = max_servers;
@@ -473,7 +473,7 @@ APR_DECLARE(apr_status_t) apr_memcache_c
* Garrett <sr...@quick.com> and was gleaned from the PostgreSQL source
* tree via the files contrib/ltree/crc32.[ch] and from FreeBSD at
* src/usr.bin/cksum/crc32.c.
- */
+ */
static const apr_uint32_t crc32tab[256] = {
0x00000000, 0x77073096, 0xee0e612c, 0x990951ba,
@@ -542,21 +542,21 @@ static const apr_uint32_t crc32tab[256]
0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d,
};
-APR_DECLARE(apr_uint32_t) apr_memcache_hash_crc32(void *baton,
+APR_DECLARE(apr_uint32_t) apr_memcache_hash_crc32(void *baton,
const char *data,
const apr_size_t data_len)
{
apr_uint32_t i;
apr_uint32_t crc;
crc = ~0;
-
+
for (i = 0; i < data_len; i++)
crc = (crc >> 8) ^ crc32tab[(crc ^ (data[i])) & 0xff];
-
+
return ~crc;
}
-APR_DECLARE(apr_uint32_t) apr_memcache_hash_default(void *baton,
+APR_DECLARE(apr_uint32_t) apr_memcache_hash_default(void *baton,
const char *data,
const apr_size_t data_len)
{
@@ -708,7 +708,7 @@ apr_memcache_add(apr_memcache_t *mc,
apr_uint32_t timeout,
apr_uint16_t flags)
{
- return storage_cmd_write(mc,
+ return storage_cmd_write(mc,
MC_ADD, MC_ADD_LEN,
key,
data, data_size,
@@ -771,7 +771,7 @@ apr_memcache_getp(apr_memcache_t *mc,
ms = apr_memcache_find_server_hash(mc, hash);
if (ms == NULL)
return APR_NOTFOUND;
-
+
rv = ms_find_conn(ms, &conn);
if (rv != APR_SUCCESS) {
@@ -835,7 +835,7 @@ apr_memcache_getp(apr_memcache_t *mc,
apr_memcache_disable_server(mc, ms);
return rv;
}
-
+
bbb = apr_brigade_split(conn->bb, e);
rv = apr_brigade_pflatten(conn->bb, baton, &len, p);
@@ -855,7 +855,7 @@ apr_memcache_getp(apr_memcache_t *mc,
*new_length = len - 2;
(*baton)[*new_length] = '\0';
}
-
+
rv = get_server_line(conn);
if (rv != APR_SUCCESS) {
ms_bad_conn(ms, conn);
@@ -900,7 +900,7 @@ apr_memcache_delete(apr_memcache_t *mc,
ms = apr_memcache_find_server_hash(mc, hash);
if (ms == NULL)
return APR_NOTFOUND;
-
+
rv = ms_find_conn(ms, &conn);
if (rv != APR_SUCCESS) {
@@ -969,7 +969,7 @@ static apr_status_t num_cmd_write(apr_me
ms = apr_memcache_find_server_hash(mc, hash);
if (ms == NULL)
return APR_NOTFOUND;
-
+
rv = ms_find_conn(ms, &conn);
if (rv != APR_SUCCESS) {
@@ -1032,7 +1032,7 @@ apr_memcache_incr(apr_memcache_t *mc,
MC_INCR,
MC_INCR_LEN,
key,
- inc,
+ inc,
new_value);
}
@@ -1047,7 +1047,7 @@ apr_memcache_decr(apr_memcache_t *mc,
MC_DECR,
MC_DECR_LEN,
key,
- inc,
+ inc,
new_value);
}
@@ -1090,7 +1090,7 @@ apr_memcache_version(apr_memcache_server
}
if (strncmp(MS_VERSION, conn->buffer, MS_VERSION_LEN) == 0) {
- *baton = apr_pstrmemdup(p, conn->buffer+MS_VERSION_LEN+1,
+ *baton = apr_pstrmemdup(p, conn->buffer+MS_VERSION_LEN+1,
conn->blen - MS_VERSION_LEN - 2);
rv = APR_SUCCESS;
}
@@ -1136,7 +1136,7 @@ apr_status_t mc_version_ping(apr_memcach
}
-APR_DECLARE(void)
+APR_DECLARE(void)
apr_memcache_add_multget_key(apr_pool_t *data_pool,
const char* key,
apr_hash_t **values)
@@ -1170,7 +1170,7 @@ static void mget_conn_result(int serveru
{
apr_int32_t j;
apr_memcache_value_t* value;
-
+
apr_hash_set(server_queries, &ms, sizeof(ms), NULL);
if (connup) {
@@ -1182,12 +1182,12 @@ static void mget_conn_result(int serveru
apr_memcache_disable_server(mc, ms);
}
}
-
+
for (j = 1; j < server_query->query_vec_count ; j+=2) {
if (server_query->query_vec[j].iov_base) {
value = apr_hash_get(values, server_query->query_vec[j].iov_base,
strlen(server_query->query_vec[j].iov_base));
-
+
if (value->status == APR_NOTFOUND) {
value->status = rv;
}
@@ -1295,7 +1295,7 @@ apr_memcache_multgetp(apr_memcache_t *mc
/* create polling structures */
pollfds = apr_pcalloc(temp_pool, apr_hash_count(server_queries) * sizeof(apr_pollfd_t));
-
+
rv = apr_pollset_create(&pollset, apr_hash_count(server_queries), temp_pool,
APR_POLLSET_NOCOPY);
@@ -1462,26 +1462,26 @@ apr_memcache_multgetp(apr_memcache_t *mc
}
} /* /for */
} /* /while */
-
+
query_hash_index = apr_hash_first(temp_pool, server_queries);
while (query_hash_index) {
void *v;
apr_hash_this(query_hash_index, NULL, NULL, &v);
server_query = v;
query_hash_index = apr_hash_next(query_hash_index);
-
+
conn = server_query->conn;
ms = server_query->ms;
-
+
mget_conn_result(TRUE, (rv == APR_SUCCESS), rv, mc, ms, conn,
server_query, values, server_queries);
continue;
}
-
+
apr_pollset_destroy(pollset);
apr_pool_clear(temp_pool);
return APR_SUCCESS;
-
+
}
@@ -1600,7 +1600,7 @@ static apr_time_t stat_read_rtime(apr_po
}
/**
- * I got tired of Typing. Meh.
+ * I got tired of Typing. Meh.
*
* TODO: Convert it to static tables to make it cooler.
*/
@@ -1632,9 +1632,9 @@ static apr_time_t stat_read_rtime(apr_po
#define mc_do_stat(name, type) \
if (mc_stat_cmp(name)) { \
stats-> name = mc_stat_ ## type ((STAT_ ## name ## _LEN)); \
- }
+ }
-static void update_stats(apr_pool_t *p, apr_memcache_conn_t *conn,
+static void update_stats(apr_pool_t *p, apr_memcache_conn_t *conn,
apr_memcache_stats_t *stats)
{
@@ -1665,7 +1665,7 @@ static void update_stats(apr_pool_t *p,
APR_DECLARE(apr_status_t)
apr_memcache_stats(apr_memcache_server_t *ms,
apr_pool_t *p,
- apr_memcache_stats_t **stats)
+ apr_memcache_stats_t **stats)
{
apr_memcache_stats_t *ret;
apr_status_t rv;
Modified: apr/apr/trunk/memory/unix/apr_pools.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/memory/unix/apr_pools.c?rev=1905414&r1=1905413&r2=1905414&view=diff
==============================================================================
--- apr/apr/trunk/memory/unix/apr_pools.c (original)
+++ apr/apr/trunk/memory/unix/apr_pools.c Sun Nov 20 07:14:38 2022
@@ -95,9 +95,9 @@ static unsigned int boundary_size;
#define GUARDPAGE_SIZE 0
#endif /* APR_ALLOCATOR_GUARD_PAGES */
-/*
+/*
* Timing constants for killing subprocesses
- * There is a total 3-second delay between sending a SIGINT
+ * There is a total 3-second delay between sending a SIGINT
* and sending of the final SIGKILL.
* TIMEOUT_INTERVAL should be set to TIMEOUT_USECS / 64
* for the exponetial timeout alogrithm.
@@ -295,7 +295,7 @@ apr_memnode_t *allocator_alloc(apr_alloc
* dividing its size by the boundary size
*/
index = (size >> BOUNDARY_INDEX) - 1;
-
+
if (index > APR_UINT32_MAX) {
return NULL;
}
@@ -1167,7 +1167,7 @@ APR_DECLARE(apr_status_t) apr_pool_creat
abort_fn(APR_ENOMEM);
apr_allocator_destroy(pool_allocator);
-
+
return APR_ENOMEM;
}
}
@@ -2396,7 +2396,7 @@ APR_DECLARE(apr_abortfunc_t) apr_pool_ab
APR_DECLARE(apr_pool_t *) apr_pool_parent_get(apr_pool_t *pool)
{
#ifdef NETWARE
- /* On NetWare, don't return the global_pool, return the application pool
+ /* On NetWare, don't return the global_pool, return the application pool
as the top most pool */
if (pool->parent == global_pool)
return pool;
@@ -2722,7 +2722,7 @@ APR_DECLARE(void) apr_pool_cleanup_for_e
APR_DECLARE(void) apr_pool_cleanup_for_exec(void)
{
/*
- * Don't need to do anything on NT or OS/2, because
+ * Don't need to do anything on NT or OS/2, because
* these platforms will spawn the new process - not
* fork for exec. All handles that are not inheritable,
* will be automajically closed. The only problem is
Modified: apr/apr/trunk/misc/netware/libprews.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/misc/netware/libprews.c?rev=1905414&r1=1905413&r2=1905414&view=diff
==============================================================================
--- apr/apr/trunk/misc/netware/libprews.c (original)
+++ apr/apr/trunk/misc/netware/libprews.c Sun Nov 20 07:14:38 2022
@@ -61,7 +61,7 @@ int _NonAppStart
WSADATA wsaData;
#endif
apr_status_t status;
-
+
NX_LOCK_INFO_ALLOC(liblock, "Per-Application Data Lock", 0);
gLibId = register_library(DisposeLibraryData);
Modified: apr/apr/trunk/misc/netware/rand.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/misc/netware/rand.c?rev=1905414&r1=1905413&r2=1905414&view=diff
==============================================================================
--- apr/apr/trunk/misc/netware/rand.c (original)
+++ apr/apr/trunk/misc/netware/rand.c Sun Nov 20 07:14:38 2022
@@ -33,7 +33,7 @@ static int NXSeedRandomInternal( size_t
srand(NXGetSystemTick());
init = 1;
}
-
+
if (width > 3)
{
do
@@ -42,21 +42,21 @@ static int NXSeedRandomInternal( size_t
}
while ((width -= 4) > 3);
}
-
+
if (width > 0)
{
char *p = (char *) s;
u.x = rand();
-
+
while (width > 0)
*p++ = u.y[width--];
}
-
+
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_generate_random_bytes(unsigned char *buf,
+APR_DECLARE(apr_status_t) apr_generate_random_bytes(unsigned char *buf,
apr_size_t length)
{
if (NXSeedRandom(length, buf) != 0) {
Modified: apr/apr/trunk/misc/netware/start.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/misc/netware/start.c?rev=1905414&r1=1905413&r2=1905414&view=diff
==============================================================================
--- apr/apr/trunk/misc/netware/start.c (original)
+++ apr/apr/trunk/misc/netware/start.c Sun Nov 20 07:14:38 2022
@@ -53,7 +53,7 @@ int (*WSACleanupWithNLMHandle)( void *ha
static int wsa_startup_with_handle (WORD wVersionRequested, LPWSADATA data, void *handle)
{
APP_DATA *app_data;
-
+
if (!(app_data = (APP_DATA*) get_app_data(gLibId)))
return APR_EGENERAL;
@@ -63,18 +63,18 @@ static int wsa_startup_with_handle (WORD
app_data->gs_event_rtag = AllocateResourceTag(handle, "WinSock Event", WS_WSAEVENT_SIGNATURE);
app_data->gs_pcp_rtag = AllocateResourceTag(handle, "WinSock C-Port", WS_CPORT_SIGNATURE);
- return WSAStartupRTags(wVersionRequested, data,
- app_data->gs_startup_rtag,
- app_data->gs_socket_rtag,
- app_data->gs_lookup_rtag,
- app_data->gs_event_rtag,
+ return WSAStartupRTags(wVersionRequested, data,
+ app_data->gs_startup_rtag,
+ app_data->gs_socket_rtag,
+ app_data->gs_lookup_rtag,
+ app_data->gs_event_rtag,
app_data->gs_pcp_rtag);
}
static int wsa_cleanup_with_handle (void *handle)
{
APP_DATA *app_data;
-
+
if (!(app_data = (APP_DATA*) get_app_data(gLibId)))
return APR_EGENERAL;
@@ -108,7 +108,7 @@ static int RegisterAppWithWinSock (void
if (LOBYTE(wsaData.wVersion) != WSAHighByte ||
HIBYTE(wsaData.wVersion) != WSALowByte) {
-
+
UnregisterAppWithWinSock (nlm_handle);
return APR_EEXIST;
}
@@ -119,8 +119,8 @@ static int RegisterAppWithWinSock (void
-APR_DECLARE(apr_status_t) apr_app_initialize(int *argc,
- const char * const * *argv,
+APR_DECLARE(apr_status_t) apr_app_initialize(int *argc,
+ const char * const * *argv,
const char * const * *env)
{
/* An absolute noop. At present, only Win32 requires this stub, but it's
@@ -143,9 +143,9 @@ APR_DECLARE(apr_status_t) apr_initialize
}
/* apr_pool_initialize() is being called from the library
- startup code since all of the memory resources belong
+ startup code since all of the memory resources belong
to the library rather than the application. */
-
+
if (apr_pool_create(&pool, NULL) != APR_SUCCESS) {
return APR_ENOPOOL;
}
@@ -180,7 +180,7 @@ APR_DECLARE_NONSTD(void) apr_terminate(v
return;
}
- /* apr_pool_terminate() is being called from the
+ /* apr_pool_terminate() is being called from the
library shutdown code since the memory resources
belong to the library rather than the application */
Modified: apr/apr/trunk/misc/unix/errorcodes.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/misc/unix/errorcodes.c?rev=1905414&r1=1905413&r2=1905414&view=diff
==============================================================================
--- apr/apr/trunk/misc/unix/errorcodes.c (original)
+++ apr/apr/trunk/misc/unix/errorcodes.c Sun Nov 20 07:14:38 2022
@@ -170,17 +170,17 @@ static char *apr_os_strerror(char* buf,
ULONG len;
char *pos;
int c;
-
+
if (err >= 10000 && err < 12000) { /* socket error codes */
return stuffbuffer(buf, bufsize,
strerror(apr_canonical_error(err+APR_OS_START_SYSERR)));
- }
+ }
else if (DosGetMessage(NULL, 0, message, HUGE_STRING_LEN, err,
"OSO001.MSG", &len) == 0) {
len--;
message[len] = 0;
pos = result;
-
+
if (len >= sizeof(result))
len = sizeof(result) - 1;
@@ -190,17 +190,17 @@ static char *apr_os_strerror(char* buf,
c++;
*(pos++) = apr_isspace(message[c]) ? ' ' : message[c];
}
-
+
*pos = 0;
- }
+ }
else {
sprintf(result, "OS/2 error %d", err);
}
- /* Stuff the string into the caller supplied buffer, then return
+ /* Stuff the string into the caller supplied buffer, then return
* a pointer to it.
*/
- return stuffbuffer(buf, bufsize, result);
+ return stuffbuffer(buf, bufsize, result);
}
#elif defined(WIN32) || (defined(NETWARE) && defined(USE_WINSOCK))
@@ -267,7 +267,7 @@ static char *apr_os_strerror(char *buf,
apr_size_t len=0, i;
#ifndef NETWARE
- len = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM
+ len = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM
| FORMAT_MESSAGE_IGNORE_INSERTS,
NULL,
errcode,
@@ -311,10 +311,10 @@ static char *apr_os_strerror(char *buf,
}
#else
-/* On Unix, apr_os_strerror() handles error codes from the resolver
- * (h_errno).
+/* On Unix, apr_os_strerror() handles error codes from the resolver
+ * (h_errno).
*/
-static char *apr_os_strerror(char* buf, apr_size_t bufsize, int err)
+static char *apr_os_strerror(char* buf, apr_size_t bufsize, int err)
{
#ifdef HAVE_HSTRERROR
return stuffbuffer(buf, bufsize, hstrerror(err));
@@ -351,7 +351,7 @@ static char *native_strerror(apr_status_
apr_size_t bufsize)
{
if (strerror_r(statcode, buf, bufsize) < 0) {
- return stuffbuffer(buf, bufsize,
+ return stuffbuffer(buf, bufsize,
"APR does not understand this error code");
}
else {
@@ -384,7 +384,7 @@ static char *native_strerror(apr_status_
}
}
#else
-/* plain old strerror();
+/* plain old strerror();
* thread-safe on some platforms (e.g., Solaris, OS/390)
*/
static char *native_strerror(apr_status_t statcode, char *buf,
@@ -394,7 +394,7 @@ static char *native_strerror(apr_status_
if (err) {
return stuffbuffer(buf, bufsize, err);
} else {
- return stuffbuffer(buf, bufsize,
+ return stuffbuffer(buf, bufsize,
"APR does not understand this error code");
}
}