cvs commit: apache-site/contributors index.html
dirkx 99/04/12 01:50:48 Modified:contributors index.html Log: Retracting those political tentacles slowly and painfully Revision ChangesPath 1.70 +4 -8 apache-site/contributors/index.html Index: index.html === RCS file: /home/cvs/apache-site/contributors/index.html,v retrieving revision 1.69 retrieving revision 1.70 diff -u -r1.69 -r1.70 --- index.html1999/04/01 00:39:24 1.69 +++ index.html1999/04/12 08:50:48 1.70 @@ -521,14 +521,10 @@ P STRONGName:/STRONG A NAME=vangulikDirk-Willem van Gulik/ABR -STRONGEmail:/STRONG A HREF=mailto:[EMAIL PROTECTED][EMAIL PROTECTED]/ABR -STRONGURL:/STRONG A HREF=http://me-www.jrc.it/~dirkx;http://me-www.jrc.it/~dirkx/ABR -STRONGOrganization:/STRONG The European Wide Service Exchange lt; - A HREF=http://ewse.ceo.org;CODE - http://ewse.ceo.org/CODE/Agt;,lt;A HREF=http://enrm.ceo.org;CODE - http://enrm.ceo.org/CODE/Agt; a lt;A HREF=http://www.ceo.org; - CEO/Agt; project.BR -STRONGOccupation:/STRONG Internet consultant/contractor, currently working for the above.BR +STRONGEmail:/STRONG A HREF=mailto:[EMAIL PROTECTED][EMAIL PROTECTED]/ABR +STRONGURL:/STRONG A HREF=http://www.webweaving.org;http://www.webweaving.org/ABR +STRONGOrganization:/STRONGWebWeaving Consultancybr +STRONGOccupation:/STRONG Internet consultant/contractorbr STRONGLocation:/STRONG A HREF=http://www.ceo.org/geotool/newserver/centeurmap/centeurdisp.pl?156,242;Sunny Italy/ABR STRONGContributions:/STRONG Full time web development for various remote sensing related projects; playing
cvs commit: apache-apr/pthreads/src CHANGES
stoddard99/04/12 08:06:25 Modified:pthreads/src CHANGES Log: Update CHANGES file with accept loop abstraction Revision ChangesPath 1.6 +3 -0 apache-apr/pthreads/src/CHANGES Index: CHANGES === RCS file: /export/home/cvs/apache-apr/pthreads/src/CHANGES,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- CHANGES 1999/04/09 02:31:22 1.5 +++ CHANGES 1999/04/12 15:06:23 1.6 @@ -1,4 +1,7 @@ Changes with Apache apr + *) Created http_accept abstraction. Added 4 new functions (not exported): + init_accept(), begin_accepting_requests(), get_request(), + stop_accepting_requests() [Bill Stoddard [EMAIL PROTECTED] *) Fix to ap_rprintf call that allows mod_info to work properly [James Morris [EMAIL PROTECTED]]
cvs commit: apache-apr/apr/file_io/unix filedup.c
rbb 99/04/12 08:06:35 Modified:apr/file_io/unix filedup.c Log: Modified duplicatefile so we can close the original file after duplicating without affecting the new file. Submitted by: Brian Havard Revision ChangesPath 1.2 +2 -2 apache-apr/apr/file_io/unix/filedup.c Index: filedup.c === RCS file: /home/cvs/apache-apr/apr/file_io/unix/filedup.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- filedup.c 1999/02/25 21:33:43 1.1 +++ filedup.c 1999/04/12 15:06:35 1.2 @@ -64,8 +64,8 @@ errno = ENOMEM; return NULL; } -old_file-filedes = new_file-filedes; -old_file-fname = new_file-fname; +old_file-filedes = dup(new_file-filedes); +old_file-fname = stdup(new_file-fname); old_file-buffered = new_file-buffered; old_file-protection = new_file-protection; old_file-user = new_file-user;
cvs commit: apache-apr/apr/file_io/unix filedup.c
rbb 99/04/12 08:25:53 Modified:apr/file_io/unix filedup.c Log: compiler didn't catch these last time I made them, or at least I missed it, but this commit will actually let the duplicate file function work. Revision ChangesPath 1.3 +2 -2 apache-apr/apr/file_io/unix/filedup.c Index: filedup.c === RCS file: /home/cvs/apache-apr/apr/file_io/unix/filedup.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- filedup.c 1999/04/12 15:06:35 1.2 +++ filedup.c 1999/04/12 15:25:52 1.3 @@ -52,7 +52,7 @@ * project, please see http://www.apache.org/. * */ - +#include strings.h #include apr_file_io.h #include apr_general.h @@ -65,7 +65,7 @@ return NULL; } old_file-filedes = dup(new_file-filedes); -old_file-fname = stdup(new_file-fname); +old_file-fname = strdup(new_file-fname); old_file-buffered = new_file-buffered; old_file-protection = new_file-protection; old_file-user = new_file-user;
cvs commit: apache-apr/apr/network_io - New directory
rbb 99/04/12 08:36:32 apache-apr/apr/network_io - New directory
cvs commit: apache-apr/apr/network_io/unix - New directory
rbb 99/04/12 08:48:40 apache-apr/apr/network_io/unix - New directory
cvs commit: apache-apr/apr/file_io/unix fileacc.c fileio.h Makefile open.c
rbb 99/04/12 10:48:28 Modified:apr/file_io/unix Makefile open.c Added: apr/file_io/unix fileacc.c fileio.h Log: Abstracted out the types a bit more for both files and directories. This should make it easier for Other platforms to define their own types. I am also adding accessor functions for both files and directories. Revision ChangesPath 1.6 +3 -3 apache-apr/apr/file_io/unix/Makefile Index: Makefile === RCS file: /home/cvs/apache-apr/apr/file_io/unix/Makefile,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- Makefile 1999/04/09 14:36:57 1.5 +++ Makefile 1999/04/12 17:48:19 1.6 @@ -17,7 +17,7 @@ EXTRA_DEPS= OSDIR= INCDIR=../../../include -INCLUDES0=-I $(INCDIR) +INCLUDES0=-I . -I $(INCDIR) SHELL=/bin/sh CC=gcc CPP=gcc -E @@ -48,7 +48,7 @@ LIB= libfile.a OBJS= open.o readwrite.o filedup.o filestat.o seek.o dir.o\ - + fileacc.o .c.o: $(CC) -c $(INCLUDES) $(CFLAGS) $ @@ -88,4 +88,4 @@ filestat.o: filestat.c seek.o: seek.c dir.o: dir.c - +fileacc.o: fileacc.c 1.13 +1 -0 apache-apr/apr/file_io/unix/open.c Index: open.c === RCS file: /home/cvs/apache-apr/apr/file_io/unix/open.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- open.c1999/04/09 18:09:25 1.12 +++ open.c1999/04/12 17:48:19 1.13 @@ -54,6 +54,7 @@ */ #include apr_file_io.h +#include apr_general.h #include errno.h #include string.h 1.1 apache-apr/apr/file_io/unix/fileacc.c Index: fileacc.c === /* * Copyright (c) 1999 The Apache Group. 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. All advertising materials mentioning features or use of this *software must display the following acknowledgment: *This product includes software developed by the Apache Group *for use in the Apache HTTP server project (http://www.apache.org/). * * 4. The names Apache Server and Apache Group must not be used to *endorse or promote products derived from this software without *prior written permission. For written permission, please contact *[EMAIL PROTECTED] * * 5. Products derived from this software may not be called Apache *nor may Apache appear in their names without prior written *permission of the Apache Group. * * 6. Redistributions of any form whatsoever must retain the following *acknowledgment: *This product includes software developed by the Apache Group *for use in the Apache HTTP server project (http://www.apache.org/). * * THIS SOFTWARE IS PROVIDED BY THE APACHE GROUP ``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 GROUP 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 Group. * For more information on the Apache Group and the Apache HTTP server * project, please see http://www.apache.org/. * */ #include apr_file_io.h #include apr_general.h #include errno.h #include string.h /* A file to put ALL of the accessor functions for apr_file_t types. */ apr_status_t apr_valid_file(apr_file_t *thefile) { if (thefile != NULL thefile-filedes 0) { return APR_SUCCESS; } else {
cvs commit: apache-apr/include apr_file_io.h
rbb 99/04/12 10:50:44 Modified:include apr_file_io.h Log: Removed all of the platform dependant definitions from the include file. These are now in the platform's direcotry, along with the code. Hopefully, that will make it easier for other platforms to port this stuff. Revision ChangesPath 1.15 +24 -33apache-apr/include/apr_file_io.h Index: apr_file_io.h === RCS file: /home/cvs/apache-apr/include/apr_file_io.h,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- apr_file_io.h 1999/04/09 18:13:07 1.14 +++ apr_file_io.h 1999/04/12 17:50:43 1.15 @@ -62,9 +62,11 @@ #include time.h #include dirent.h #include sys/uio.h +#include fileio.h #include apr_general.h #include apr_errno.h + /* Flags for apr_open */ #define APR_READ 1 /* Open the file for reading */ #define APR_WRITE2 /* Open the file for writing */ @@ -82,42 +84,26 @@ #define APR_END SEEK_END /* Permissions flags */ -#define APR_UREAD S_IRUSR -#define APR_UWRITES_IWUSR -#define APR_UEXECUTE S_IXUSR - -#define APR_GREAD S_IRGRP -#define APR_GWRITES_IWGRP -#define APR_GEXECUTE S_IXGRP - -#define APR_WREAD S_IROTH -#define APR_WWRITES_IWOTH -#define APR_WEXECUTE S_IXOTH +#define APR_UREAD UREAD +#define APR_UWRITEUWRITE +#define APR_UEXECUTE UEXECUTE + +#define APR_GREAD GREAD +#define APR_GWRITEGWRITE +#define APR_GEXECUTE GEXECUTE + +#define APR_WREAD WREAD +#define APR_WWRITEWWRITE +#define APR_WEXECUTE WEXECUTE /* should be same as whence type in lseek, POSIZ defines this as int */ -typedef int apr_seek_where_t; +typedef apr_int32_t apr_seek_where_t; -typedef struct apr_file_t { -int filedes; -char * fname; -int buffered; -mode_t protection; -uid_t user; -gid_t group; -off_t size; -time_t atime; -time_t mtime; -time_t ctime; -} apr_file_t; - -typedef struct apr_dir_t { -char *dirname; -DIR *dirstruct; -} apr_dir_t; - -typedef mode_tapr_fileperms_t; -typedef struct dirent apr_dirent_t; -typedef struct iovec apr_iovec_t; +typedef struct file_t apr_file_t; +typedef struct dir_t apr_dir_t; +typedef fileperms_t apr_fileperms_t; +typedef dirent_t apr_dirent_t; +typedef iovec_t apr_iovec_t; /* Function definitions */ apr_file_t *apr_open(char *, apr_int32_t, apr_fileperms_t); @@ -139,6 +125,11 @@ apr_status_t apr_rewinddir(apr_dir_t *); apr_status_t apr_make_dir(const char *, apr_fileperms_t); apr_status_t apr_remove_dir(const char *); + +/*accessor and general file_io functions. */ +apr_status_t apr_valid_file(apr_file_t *); +char *apr_get_filename(apr_file_t *); + #endif /* ! APR_FILE_IO_H */
cvs commit: apache-apr/apr/test Makefile testfile.c
rbb 99/04/12 10:54:12 Modified:apr/test Makefile testfile.c Log: Basic cleanup of the test code. The test cases should work better now. This also removes all direct references to the internals of structures. It just had to wait until all the accessors were done. Revision ChangesPath 1.2 +1 -1 apache-apr/apr/test/Makefile Index: Makefile === RCS file: /home/cvs/apache-apr/apr/test/Makefile,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- Makefile 1999/02/25 16:42:38 1.1 +++ Makefile 1999/04/12 17:54:11 1.2 @@ -17,7 +17,7 @@ EXTRA_DEPS= OSDIR= INCDIR=../../include -INCLUDES0=-I $(INCDIR) +INCLUDES0=-I ../file_io/unix -I $(INCDIR) SHELL=/bin/sh CC=gcc CPP=gcc -E 1.11 +14 -14apache-apr/apr/test/testfile.c Index: testfile.c === RCS file: /home/cvs/apache-apr/apr/test/testfile.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- testfile.c1999/04/09 18:09:25 1.10 +++ testfile.c1999/04/12 17:54:11 1.11 @@ -88,11 +88,11 @@ } fprintf(stdout, \tChecking file...); -if (thefile-filedes 0) { +if (apr_valid_file(thefile) == APR_FAILURE) { fprintf(stderr, Bad file des\n); exit(-1); } -if (strcmp(thefile-fname, filename) != 0) { +if (strcmp(apr_get_filename(thefile), filename) != 0) { fprintf(stderr, wrong filename\n); exit(-1); } @@ -171,15 +171,6 @@ fprintf(stdout, OK\n); } -fprintf(stdout, \tDeleting file while still open...); -if (test_filedel() == APR_FAILURE) { -fprintf(stderr, Something happened, please look into it.\n); -exit(-1); -} -else { -fprintf(stdout, OK\n); -} - testdirs(); return 1; @@ -204,7 +195,7 @@ } thefile = apr_open(testdel, APR_READ, APR_UREAD | APR_UWRITE | APR_GREAD); -if (thefile != NULL) { +if (thefile == NULL) { return APR_FAILURE; } @@ -219,7 +210,7 @@ fprintf(stdout, Testing Directory functions.\n); fprintf(stdout, \tMakeing Directory...); -if (apr_make_dir(testdir, 444) == APR_FAILURE) { +if (apr_make_dir(testdir, APR_UREAD | APR_UWRITE | APR_UEXECUTE | APR_GREAD | APR_GWRITE | APR_GEXECUTE | APR_WREAD | APR_WWRITE | APR_WEXECUTE) == APR_FAILURE) { fprintf(stderr, Could not create directory\n); return -1; } @@ -227,7 +218,7 @@ fprintf(stdout, OK\n); } -if (apr_open(testdir/testfile, APR_READ | APR_WRITE | APR_CREATE, APR_UREAD | APR_UWRITE | APR_UEXECUTE) != NULL) {; +if (apr_open(testdir/testfile, APR_READ | APR_WRITE | APR_CREATE, APR_UREAD | APR_UWRITE | APR_UEXECUTE) == NULL) {; return -1; } @@ -266,6 +257,15 @@ fprintf(stdout, \tClosing Directory...); if (apr_closedir(temp) == APR_FAILURE) { fprintf(stderr, Could not close directory\n); +return -1; +} +else { +fprintf(stdout, OK\n); +} + +fprintf(stdout, \tRemoving file from directory...); +if (apr_remove_file(testdir/testfile) == APR_FAILURE) { +fprintf(stderr, Could not remove file\n); return -1; } else {
cvs commit: apache-apr/docs fileio.txt
rbb 99/04/12 11:04:19 Modified:docs fileio.txt Log: Update the file I/O function definitions. This file should define exactly what each function is, and what it does for file file I/O part of APR now. Revision ChangesPath 1.12 +15 -1 apache-apr/docs/fileio.txt Index: fileio.txt === RCS file: /home/cvs/apache-apr/docs/fileio.txt,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- fileio.txt1999/04/09 18:09:26 1.11 +++ fileio.txt1999/04/12 18:04:19 1.12 @@ -142,7 +142,7 @@ arg 1) The path of the directory to remove. return) APR_SUCCESS or APR_FAILURE - apr_ssize_t apr_writev(APRFile, APRIOVec *, APRUInt64) + apr_ssize_t apr_writev(apr_file_t, apr_iovec_t *, apr_ssize_t) Same as apr_write, except it gets the data from the APRIOVec array. Arguments: arg 1) File descriptor to write data to @@ -153,6 +153,20 @@ return) number of bytes written. APR_FAILURE on failure. Notes: apr_writev will write a complete entry from APRIOVec array before moving on to the next one. + + apr_status_t apr_valid_file(apr_file_t *) +Determine if a file is valid or not + Arguments: + arg 1) File to check for validity + return) APR_SUCCESS or APR_FAILURE + + char * apr_get_filename(apr_file_t *) +Get the name of an opened file. + Arguments: + arg 1) File to get the name of + return) filename. NULL on failure + + IMPLEMENTATION DETAILS **
cvs commit: apache-apr/docs networkio.txt
rbb 99/04/12 11:23:12 Added: docs networkio.txt Log: First pass at the network function defs. This will get updated as the functions are written. Revision ChangesPath 1.1 apache-apr/docs/networkio.txt Index: networkio.txt === h2 Network I/O/h2 APRStatus apr_send(APRSocket, const void *, APRUInt64, APRUInt64 *) Sends a message over a socket Arguments: arg 1) Pointer to abstracted File descriptor (socket) arg 2) buffer containing message to send arg 3) size of buf (in bytes) arg 4) Amount of data sent in bytes. (Returned by APR) APRStatus apr_recv(APRSocket, void *, APRUInt64, APRUInt64 *); Receive a message from a socket Arguments: arg 1) Pointer to abstracted File descriptor (socket) arg 2) buffer to store message in arg 3) size of buf (in bytes) !-- arg 4) OS specific flags to determine how to receive the message. because of OS differences, it is best to always use zero. we are including this flag to mimic POSIX, but may take it out -- arg 4) Amount of data received in bytes APRStatus apr_create_tcp_socket(APSocket *) Create a new TCP network connection Arguments: arg 1) Abstracted out ptr to file descriptor, pointing to the created Socket. NULL on failure. APRStatus apr_initializenetaddr(APRNetAddrValue, APRUInt16, APRNetAddr); Initialize the fields of a APRNetAddr. assigning well known values as appropriate. This function only sets up values in the APRNetAddr structure. It does not setup the connection. Arguments: arg 1) The value to assign to the IP address portion of the APRNetAddr struct. Can only specify INADDR_ANY and INADR_LOOPBACK equivalents. arg 2) Port number to be assigned in the struct arg 3) The address of the APRNetAddr struct to be filled out. APRStatus apr_gethostbyname(char *, APRHostEnt) Lookup a host by name Arguments: arg 1) string defining the host name of interest arg 2) returns an APRHostEnt structure that has been filled out on success. On failure, it returns NULL. APRStatus apr_gethostbyaddr(const void *, APRInt32, APRNetAddrValue, APRHostEnt) Lookup a host by address Arguments: arg 1) IP addr of host, not Null-terminated string arg 2) length of IP addr arg 3) type of address arg 4) returns an APRHostEnt structure that has been filled out on success. On failure, it returns NULL. APRStatus apr_enumeratehostent(APRUInt32, const APRHostEnt *, APRUInt16, APRNetAddr *, APRInt32); Evaluate each of the possible address of a Host Entry retrived from apr_GetHostByName or apr_GetHostByAddr. Arguments: arg 1) The index of the enumeration. To start, set to zero. To continue, set to last returned value. arg 2) pointer to structure return by apr_GetHostBy* Functions. arg 3) Port number to be asssigned as part of the APRNetAddr structure. arg 4) Input a pointer to an APRNetAddr struct. On output, this struct is filled in by the runtime if the returned result is 0. arg 5) Next value for the index parameter. If 0, the enumeration is ended. APR_FAILURE otherwise. APRStatus apr_familyinet(APRInt16) Get the value of the address family for IP Arguments: return) Returns the address family APRStatus apr_hton16(APRUInt16, APRUInt16 *) 16 bit conversion from host to network byte order Arguments: arg 1) the integer to convert arg 2) the integer in proper byte order. APRStatus apr_ntoh16(APRUInt16, APRUInt16 *); 16 bit conversion from network to host byte order Arguments: arg 1) the integer to convert arg 2) the integer in proper byte order. APRStatus apr_netaddrtostring(const APRNetAddr *, char *, APRUInt32) Convert an internet address to a String Arguments: arg 1) The structure to get the Internet address from arg 2) the buffer to store the converted address into arg 3) The size of the buffer APRStatus apr_stringtonetaddr(const char *, APRNetAddr *) Convert a string into an internet address Arguments: arg 1) the buffer to get the Internet address from arg 2) The structure to store the converted address into APRStatus apr_setsocketoption(APRSocket, APRSocketOptionData); Set options on the specified socket Arguments: arg 1) The abstracted
cvs commit: apache-apr/docs fileio.txt
rbb 99/04/12 11:54:49 Modified:docs fileio.txt Log: minor name change in fileio document Revision ChangesPath 1.13 +1 -1 apache-apr/docs/fileio.txt Index: fileio.txt === RCS file: /home/cvs/apache-apr/docs/fileio.txt,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- fileio.txt1999/04/12 18:04:19 1.12 +++ fileio.txt1999/04/12 18:54:48 1.13 @@ -170,7 +170,7 @@ IMPLEMENTATION DETAILS ** -struct APRFile { +struct apr_file_t { int filedes; char * fname; int buffered;