summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.cvsignore4
-rw-r--r--CHANGES15
-rw-r--r--file_io/os2/filesys.c13
-rw-r--r--file_io/unix/readwrite.c66
-rw-r--r--include/apr_version.h7
-rw-r--r--misc/unix/charset.c2
-rw-r--r--renames_pending39
-rw-r--r--threadproc/beos/.cvsignore1
-rw-r--r--threadproc/beos/threadcancel.c88
-rw-r--r--threadproc/os2/threadcancel.c85
-rw-r--r--threadproc/win32/threadcancel.c86
11 files changed, 20 insertions, 386 deletions
diff --git a/.cvsignore b/.cvsignore
index 13ef1e0e2..4b17e2735 100644
--- a/.cvsignore
+++ b/.cvsignore
@@ -6,7 +6,6 @@ config.status
configure
libtool
apr-config
-apr-*-config
apr-config.out
LibD
LibR
@@ -39,5 +38,4 @@ build-outputs.mk
*.bbg
*.da
coverage
-apr*.pc
-apr.spec
+apr.pc
diff --git a/CHANGES b/CHANGES
index 70a71eb2d..04a92d3ff 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,18 +1,3 @@
-Changes for APR 1.1 [Deferring these features when 1.0 is rolled out.]
-
- *) Improve apr_file_gets() performance on buffered files. [Justin Erenkrantz]
-
- *) Win32: Fix bug in apr_socket_sendfile that interferred with
- Win32 LSPs. PR 23982 [Jan Bilek, Bill Stoddard]
-
- *) Add a new PRNG. Note that the implementation of SHA-256 is a
- stop-gap pending snarfing the SHA-1 implementation from apr-util
- and upgrading it to do SHA-256. Not yet ready for prime time.
- [Ben Laurie]
-
- *) Win32: Fix bug tracking the file pointer on a file opened for
- overlapped/APR_XTHREAD io. [Bill Stoddard]
-
Changes with APR 1.0
*) Only install apr-$MAJOR-config and add appropriate detection code to
diff --git a/file_io/os2/filesys.c b/file_io/os2/filesys.c
index ef597b38e..b323e488d 100644
--- a/file_io/os2/filesys.c
+++ b/file_io/os2/filesys.c
@@ -94,13 +94,12 @@ apr_status_t filepath_drive_get(char **rootpath, char drive,
apr_status_t filepath_root_case(char **rootpath, char *root, apr_pool_t *p)
{
- if (root[0] && apr_islower(root[0]) && root[1] == ':') {
- *rootpath = apr_pstrdup(p, root);
- (*rootpath)[0] = apr_toupper((*rootpath)[0]);
- }
- else {
- *rootpath = root;
- }
+ char path[APR_PATH_MAX];
+
+ strcpy(path, root);
+ if (path[1] == ':')
+ path[0] = apr_toupper(path[0]);
+ *rootpath = apr_pstrdup(p, path);
return APR_SUCCESS;
}
diff --git a/file_io/unix/readwrite.c b/file_io/unix/readwrite.c
index 98a11421d..1e6a6e665 100644
--- a/file_io/unix/readwrite.c
+++ b/file_io/unix/readwrite.c
@@ -24,6 +24,9 @@
#define USE_WAIT_FOR_IO
#endif
+/* problems:
+ * 1) ungetchar not used for buffered files
+ */
APR_DECLARE(apr_status_t) apr_file_read(apr_file_t *thefile, void *buf, apr_size_t *nbytes)
{
apr_ssize_t rv;
@@ -308,65 +311,18 @@ APR_DECLARE(apr_status_t) apr_file_gets(char *str, int len, apr_file_t *thefile)
return APR_SUCCESS;
}
- /* If we have an underlying buffer, we can be *much* more efficient
- * and skip over the apr_file_read calls.
- */
- if (thefile->buffered) {
-
-#if APR_HAS_THREADS
- if (thefile->thlock) {
- apr_thread_mutex_lock(thefile->thlock);
- }
-#endif
-
- if (thefile->direction == 1) {
- apr_file_flush(thefile);
- thefile->direction = 0;
- thefile->bufpos = 0;
- thefile->dataRead = 0;
+ while (str < final) { /* leave room for trailing '\0' */
+ nbytes = 1;
+ rv = apr_file_read(thefile, str, &nbytes);
+ if (rv != APR_SUCCESS) {
+ break;
}
-
- while (str < final) { /* leave room for trailing '\0' */
- /* Force ungetc leftover to call apr_file_read. */
- if (thefile->bufpos < thefile->dataRead &&
- thefile->ungetchar == -1) {
- *str = thefile->buffer[thefile->bufpos++];
- }
- else {
- nbytes = 1;
- rv = apr_file_read(thefile, str, &nbytes);
- if (rv != APR_SUCCESS) {
- break;
- }
- }
- if (*str == '\n') {
- ++str;
- break;
- }
- ++str;
- }
-
-#if APR_HAS_THREADS
- if (thefile->thlock) {
- apr_thread_mutex_unlock(thefile->thlock);
- }
-#endif
- }
- else {
- while (str < final) { /* leave room for trailing '\0' */
- nbytes = 1;
- rv = apr_file_read(thefile, str, &nbytes);
- if (rv != APR_SUCCESS) {
- break;
- }
- if (*str == '\n') {
- ++str;
- break;
- }
+ if (*str == '\n') {
++str;
+ break;
}
+ ++str;
}
-
/* We must store a terminating '\0' if we've stored any chars. We can
* get away with storing it if we hit an error first.
*/
diff --git a/include/apr_version.h b/include/apr_version.h
index 08d5f3a26..af307b48f 100644
--- a/include/apr_version.h
+++ b/include/apr_version.h
@@ -60,13 +60,8 @@ extern "C" {
#define APR_MINOR_VERSION 0
/** patch level */
-#define APR_PATCH_VERSION 1
+#define APR_PATCH_VERSION 0
-/**
- * This symbol is defined for internal, "development" copies of APR.
- * This symbol should be #undef'd for releases.
- */
-#define APR_IS_DEV_VERSION
/** The formatted string of APR's version */
#define APR_VERSION_STRING \
diff --git a/misc/unix/charset.c b/misc/unix/charset.c
index 6acb4e157..5e1842fac 100644
--- a/misc/unix/charset.c
+++ b/misc/unix/charset.c
@@ -55,7 +55,7 @@ APR_DECLARE(const char*) apr_os_default_encoding (apr_pool_t *pool)
}
if ('A' == 0x41) {
- return "ISO-8859-1"; /* not necessarily true */
+ return "ISO8859-1"; /* not necessarily true */
}
return "unknown";
diff --git a/renames_pending b/renames_pending
deleted file mode 100644
index ca007a729..000000000
--- a/renames_pending
+++ /dev/null
@@ -1,39 +0,0 @@
-Pending symbol renames for APR [for some discussion yet]
-
-apr_file_info_t from apr_finfo_t
-apr_file_attrs_t from apr_fileattrs_t
-apr_file_seek_where_t from apr_seek_where_t
-
-#apr_filepath_name_get from apr_filename_of_pathname
-
-apr_lock_mech_e from apr_lockmech_e
-
-#apr_gid_get from apr_get_groupid
-#apr_gid_name_get from apr_get_groupname
-#apr_gid_name_get from apr_group_name_get
-#apr_gid_compare from apr_compare_groups
-
-#apr_socket_shutdown from apr_shutdown
-#apr_socket_bind from apr_bind
-#apr_socket_listen from apr_listen
-#apr_socket_accept from apr_accept
-#apr_socket_connect from apr_connect
-#apr_socket_send from apr_send
-#apr_socket_sendv from apr_sendv
-#apr_socket_sendto from apr_sendto
-#apr_socket_recvfrom from apr_recvfrom
-#apr_socket_sendfile from apr_sendfile
-#apr_socket_recv from apr_recv
-#apr_socket_inherit_set from apr_socket_set_inherit
-#apr_socket_inherit_unset from apr_socket_unset_inherit
-
-
-#apr_time_exp_gmt_get from apr_implode_gmt
-apr_time_interval_t from apr_interval_time_t
-apr_time_interval_short_t from apr_short_interval_time_t
-
-#apr_uid_homepath_get from apr_get_home_directory
-#apr_uid_get from apr_get_userid
-#apr_uid_current from apr_current_userid
-#apr_uid_compare from apr_compare_users
-#apr_uid_name_get from apr_get_username
diff --git a/threadproc/beos/.cvsignore b/threadproc/beos/.cvsignore
index f82426797..11f54a843 100644
--- a/threadproc/beos/.cvsignore
+++ b/threadproc/beos/.cvsignore
@@ -1,6 +1,5 @@
Makefile
apr_proc_stub
*.lo
-*.slo
.libs
.deps
diff --git a/threadproc/beos/threadcancel.c b/threadproc/beos/threadcancel.c
deleted file mode 100644
index 94a7e9407..000000000
--- a/threadproc/beos/threadcancel.c
+++ /dev/null
@@ -1,88 +0,0 @@
-/* ====================================================================
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 2000 The Apache Software Foundation. All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- * if any, must include the following acknowledgment:
- * "This product includes software developed by the
- * Apache Software Foundation (http://www.apache.org/)."
- * Alternately, this acknowledgment may appear in the software itself,
- * if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Apache" and "Apache Software Foundation" must
- * not be used to endorse or promote products derived from this
- * software without prior written permission. For written
- * permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- * nor may "Apache" appear in their name, without prior written
- * permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation. For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-#include "threadproc.h"
-
-
-ap_status_t ap_cancel_thread(ap_thread_t *thd)
-{
- if (kill_thread(thd->td) == 0) {
- return APR_SUCCESS;
- }
- else {
- return errno;
- }
-}
-
-
-ap_status_t ap_setcanceltype(ap_int32_t type, ap_pool_t *cont)
-{
-/* if (pthread_setcanceltype(type, NULL) == 0) {*/
- return APR_SUCCESS;
-/* }
- else {
- return APR_FAILURE;
- }*/
-}
-
-ap_status_t ap_setcancelstate(ap_int32_t type, ap_pool_t *cont)
-{
-/* if (pthread_setcanceltype(type, NULL) == 0) {*/
- return APR_SUCCESS;
-/* }
- else {
- return APR_FAILURE;
- }*/
-}
-
diff --git a/threadproc/os2/threadcancel.c b/threadproc/os2/threadcancel.c
deleted file mode 100644
index ca7a18753..000000000
--- a/threadproc/os2/threadcancel.c
+++ /dev/null
@@ -1,85 +0,0 @@
-/* ====================================================================
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 2000 The Apache Software Foundation. All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- * if any, must include the following acknowledgment:
- * "This product includes software developed by the
- * Apache Software Foundation (http://www.apache.org/)."
- * Alternately, this acknowledgment may appear in the software itself,
- * if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Apache" and "Apache Software Foundation" must
- * not be used to endorse or promote products derived from this
- * software without prior written permission. For written
- * permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- * nor may "Apache" appear in their name, without prior written
- * permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation. For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-#include "threadproc.h"
-#include "apr_thread_proc.h"
-#include "apr_general.h"
-#include "fileio.h"
-
-ap_status_t ap_cancel_thread(ap_thread_t *thd)
-{
- return APR_OS2_STATUS(DosKillThread(thd->tid));
-}
-
-
-
-ap_status_t ap_setcanceltype(ap_int32_t type, ap_pool_t *cont)
-{
- ULONG rc, nesting;
-
- if (type == APR_CANCEL_DEFER)
- rc = DosEnterMustComplete(&nesting);
- else
- rc = DosExitMustComplete(&nesting);
-
- return APR_OS2_STATUS(rc);
-}
-
-
-
-ap_status_t ap_setcancelstate(ap_int32_t type, ap_pool_t *cont)
-{
-/* There's no way to ignore thread kills altogether in OS/2 (that I know of) */
- return APR_ENOTIMPL;
-}
diff --git a/threadproc/win32/threadcancel.c b/threadproc/win32/threadcancel.c
deleted file mode 100644
index 3a509202b..000000000
--- a/threadproc/win32/threadcancel.c
+++ /dev/null
@@ -1,86 +0,0 @@
-/* ====================================================================
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 2000 The Apache Software Foundation. All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- * if any, must include the following acknowledgment:
- * "This product includes software developed by the
- * Apache Software Foundation (http://www.apache.org/)."
- * Alternately, this acknowledgment may appear in the software itself,
- * if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Apache" and "Apache Software Foundation" must
- * not be used to endorse or promote products derived from this
- * software without prior written permission. For written
- * permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- * nor may "Apache" appear in their name, without prior written
- * permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation. For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-#include "threadproc.h"
-#include "apr_thread_proc.h"
-#include "apr_general.h"
-
-
-ap_status_t ap_cancel_thread(ap_thread_t *thd)
-{
- if (TerminateThread(thd->td, APR_SUCCESS) == 0) {
- return APR_EEXIST;
- }
- else {
- return APR_SUCCESS;
- }
-}
-
-/* Not sure of the best way to do this just yet.
-ap_status_t ap_setcanceltype(ap_int32_t type, ap_pool_t *cont)
-{
-
-}
-
-ap_status_t ap_setcancelstate(ap_int32_t type, ap_pool_t *cont)
-{
- ap_status_t stat;
- if ((stat = pthread_setcanceltype(type, NULL)) == 0) {
- return APR_SUCCESS;
- }
- else {
- return stat;
- }
-}
-*/