Re: cvs commit: apache-2.0/src/modules/standard mod_userdir.c

2000-01-19 Thread Ryan Bloom

The better way to fix it is for Apache to provide an AP_HAVE_PWD_H macro
depending on what autoconf finds.  This is all part of the autoconf not
protecting their own macros problem.  This will be fixed in time, but how
to do it is a real problem.  I am seriously considering doing what we did
for APR, which is to create another header file for public namespace
protected macros.  BTW, why are you bothering with userdir?  I didn't
think it worked on Windows.

Ryan


On 19 Jan 2000 [EMAIL PROTECTED] wrote:

 stoddard00/01/18 17:33:17
 
   Modified:src/modules/standard mod_userdir.c
   Log:
   Fix Windows compile break. Gotta find a better way to fix this.
   
   Revision  ChangesPath
   1.6   +2 -0  apache-2.0/src/modules/standard/mod_userdir.c
   
   Index: mod_userdir.c
   ===
   RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_userdir.c,v
   retrieving revision 1.5
   retrieving revision 1.6
   diff -u -r1.5 -r1.6
   --- mod_userdir.c   2000/01/18 23:41:56 1.5
   +++ mod_userdir.c   2000/01/19 01:33:16 1.6
   @@ -93,7 +93,9 @@
#include httpd.h
#include http_config.h
#include http_request.h
   +#ifndef WIN32
#include pwd.h
   +#endif

/* The default directory in user's home dir */
#ifndef DEFAULT_USER_DIR
   
   
   
 

___
Ryan Bloom  [EMAIL PROTECTED]
4205 S Miami Blvd   
RTP, NC 27709   

Come to the first official Apache Software Foundation
Conference!  http://ApacheCon.Com/




Re: cvs commit: apache-2.0/src acinclude.m4

2000-01-12 Thread Ryan Bloom
On 12 Jan 2000 [EMAIL PROTECTED] wrote:

 sascha  00/01/12 12:41:59
 
   Modified:src  acinclude.m4
   Log:
   gcc on AIX takes -mthreads. I wonder what they smoked during creating
   all those wonderful flags.

Is this just on AIX or do we need to deal with this everywhere?

Ryan

___
Ryan Bloom  [EMAIL PROTECTED]
4205 S Miami Blvd   
RTP, NC 27709   

Come to the first official Apache Software Foundation
Conference!  http://ApacheCon.Com/




Re: cvs commit: apache-2.0/src/modules/standard mod_autoindex.c mod_cern_meta.c mod_cgi.c mod_dir.c mod_mime.c mod_negotiation.c

2000-01-10 Thread Ryan Bloom

Thanks for doing the work, I'll look at the Unix impl now.

Ryan

   Rework ap_finfo_t to split the file type out of the protection field.
   I've taken a stab at the unix implementation but tested only on OS/2.



Re: cvs commit: apache-2.0/src/modules/standard mod_digest.c mod_vhost_alias.c

1999-12-31 Thread Ryan Bloom

I've been using APACI when dealing with modules, because I don't think
Manoj has finished the module config stuff yet.

Ryan

On Fri, 31 Dec 1999, Ben Laurie wrote:

 [EMAIL PROTECTED] wrote:
  
  rbb 99/12/31 09:06:16
  
Modified:src/modules/standard mod_digest.c mod_vhost_alias.c
Log:
Update these modules to Apache 2.0.  Not tested, but they compile again.
 
 On that note ... how do you actually get a module into Apache 2.0? I
 tried to add mod_actions earlier today (./configure --enable-actions)
 but it didn't seem to result in a server that understood Action. Not
 sure I'm keen on that method of doing it, anyway.
 
 Cheers,
 
 Ben.
 
 --
 SECURE HOSTING AT THE BUNKER! http://www.thebunker.net/hosting.htm
 
 http://www.apache-ssl.org/ben.html
 
 My grandfather once told me that there are two kinds of people: those
 who work and those who take the credit. He told me to try to be in the
 first group; there was less competition there.
  - Indira Gandhi
 

___
Ryan Bloom  [EMAIL PROTECTED]
4205 S Miami Blvd   
RTP, NC 27709   

Come to the first official Apache Software Foundation
Conference!  http://ApacheCon.Com/




Re: cvs commit: apache-2.0/src/modules/mpm config.m4

1999-12-23 Thread Ryan Bloom

Okay, I just committed this bit of logic to detect the best flags for
compiling threaded programs.  A few caveats.  This is tested only on Linux
2.2.10, but it should work everywhere.  It doesn't always come up with the
best possible flags, but it should alwyas work.  For example, on Linux, it
seems to come up with -lpthread in LDFLAGS instead of -pthread in CFLAGS,
but since this is what I have been using to compile the server since we
started, that should be okay.

I also have not started to use this logic to help us pick which MPM to
use.  For example, picking prefork if there is no threading library
defined.  That is work for after this has been tested by more people.

I would appreciate it if everybody who gave input on getting this test
working would extract the new code, and try to configure and compile it.
If there are no problems reported, then I will finish this work.  If there
are problems, we'll fix them when we know about them. :)

Thanks to everybody who helped me get this test right.  It does look like
I missed a -lpthread somewhere in the configure stuff, but I'll track it
down soon.

Ryan

On 23 Dec 1999 [EMAIL PROTECTED] wrote:

 rbb 99/12/23 13:01:32
 
   Modified:src  acinclude.m4 configure.in
src/modules/mpm config.m4
   Log:
   First stab at logic to determine which threading library to use.  This also
   gets rid of the hack of always putting -pthread in the CFLAGS variable.
   
   Revision  ChangesPath
   1.8   +43 -0 apache-2.0/src/acinclude.m4
   
   Index: acinclude.m4
   ===
   RCS file: /home/cvs/apache-2.0/src/acinclude.m4,v
   retrieving revision 1.7
   retrieving revision 1.8
   diff -u -r1.7 -r1.8
   --- acinclude.m41999/12/20 03:09:43 1.7
   +++ acinclude.m41999/12/23 21:01:27 1.8
   @@ -95,3 +95,46 @@
  fi
])

   +dnl
   +dnl APACHE_CHECK_THREADS()
   +dnl
   +dnl Determine the best flags for linking against a threading library.
   +dnl
   +AC_DEFUN(THREAD_TEST, [
   +AC_TRY_RUN( [
   +#include pthread.h
   +
   +void *thread_routine(void *data) {
   +return data;
   +}
   +
   +int main() {
   +pthread_t thd;
   +int data = 1;
   +return pthread_create(thd, NULL, thread_routine, data);
   +} ], [ 
   +  THREADS_WORKING=yes
   +  ], [
   +  THREADS_WORKING=no
   +  ], THREADS_WORKING=no ) ] )
   +
   +define(APACHE_CHECK_THREADS, [dnl
   +  cflags_orig=$CFLAGS
   +  ldflags_orig=$LDFLAGS
   +  for test_cflag in $1; do
   +for test_ldflag in $2; do
   +  CFLAGS=$test_cflag $cflags_orig
   +  LDFLAGS=$test_ldflag $ldflags_orig
   +  THREAD_TEST()
   +  if test $THREADS_WORKING = yes; then
   +break
   +  fi
   +done
   +if test $THREADS_WORKING = yes; then
   +  threads_result=Updating CFLAGS and LDFLAGS
   +  break
   +fi
   +  threads_result=Threads not found
   +  done
   +] )
   +
   
   
   
   1.15  +4 -0  apache-2.0/src/configure.in
   
   Index: configure.in
   ===
   RCS file: /home/cvs/apache-2.0/src/configure.in,v
   retrieving revision 1.14
   retrieving revision 1.15
   diff -u -r1.14 -r1.15
   --- configure.in1999/12/21 21:41:40 1.14
   +++ configure.in1999/12/23 21:01:28 1.15
   @@ -73,6 +73,10 @@

dnl ## Check for library functions

   +AC_MSG_CHECKING([for which threading library to use])
   +APACHE_CHECK_THREADS('' -pthread -D_REENTRANT, '' -lpthread -lc_r)
   +AC_MSG_RESULT($threads_result)
   +
dnl See Comment #Spoon

AC_CHECK_FUNCS( \
   
   
   
   1.5   +0 -2  apache-2.0/src/modules/mpm/config.m4
   
   Index: config.m4
   ===
   RCS file: /home/cvs/apache-2.0/src/modules/mpm/config.m4,v
   retrieving revision 1.4
   retrieving revision 1.5
   diff -u -r1.4 -r1.5
   --- config.m4   1999/12/20 03:09:50 1.4
   +++ config.m4   1999/12/23 21:01:31 1.5
   @@ -46,8 +46,6 @@

dnl XXX - We should be checking for the proper flags to use on a 
 particular 
dnl platform. This will cover a couple of them, anyway
   -CFLAGS=-pthread $CFLAGS
   -CXXFLAGS=-pthread $CXXFLAGS

AC_CHECK_HEADER(pthread.h, [ ],[
AC_MSG_ERROR(This MPM requires pthreads. Try --with-mpm=prefork.)
   
   
   
 

___
Ryan Bloom  [EMAIL PROTECTED]
4205 S Miami Blvd   
RTP, NC 27709   

Come to the first official Apache Software Foundation
Conference!  http://ApacheCon.Com/




Re: cvs commit: apache-2.0/src buildconf configure.in

1999-12-20 Thread Ryan Bloom
 OK, but the config.cache should still be removed, surely?
 
 Also, BTW, the current version completely fails to build for me (lots of
 unresolved externals) - what's the current recommended build path?
 
 I'm slightly puzzled by what's going on with APR - it seems to build a
 dozen different libraries, but Apache only seems to use one. What am I
 missing?

APR hasn't built a dozen different libraries for a long time.  We are only
building the one libapr.a.

What platform are you on?  I have the code working just fine on Linux and
Windows.  If you are using the prefork MPM, you have to specify
LIBS=-lpthread.  If you are on any other platform, you are on your own.
The configure script has basically been written on Linux, and it is
assumed it will be modified as we port 2.0.

Ryan

___
Ryan Bloom  [EMAIL PROTECTED]
4205 S Miami Blvd   
RTP, NC 27709   It's a beautiful sight to see good dancers 
doing simple steps.  It's a painful sight to
see beginners doing complicated patterns.   



Re: cvs commit: apache-2.0/src/lib/apr/locks/beos Makefile.in

1999-12-20 Thread Ryan Bloom
   Modified:src/lib/apr/locks/beos Makefile.in
   Log:
   Missed this one when I did the others.  As there isn't an inc directory
   I guess the other platforms should do this as well?

Good point.  We need to clean things up a bit.  I have been busy doing
other stuff recently, but hopefully this week I'll get a chance to clean
APR a bit.  Unless somebody else wants to beat me to it.

Ryan

___
Ryan Bloom  [EMAIL PROTECTED]
4205 S Miami Blvd   
RTP, NC 27709   

Come to the first official Apache Software Foundation
Conference!  http://ApacheCon.Com/




Re: cvs commit: apache-2.0/src buildconf configure.in

1999-12-20 Thread Ryan Bloom

  APR hasn't built a dozen different libraries for a long time.  We are only
  building the one libapr.a.
 
 Should I send a log? Perhaps there's a step missing in the build? I
 dunno. I'm confused.

I don't know either.  I'll look into it.  It's possible that we are
actually building all of the libraries and then merging them all together
into one big one.  We shouldn't be, but I never checked the commit that
got us to build one library.  

   I have the code working just fine on Linux and
  Windows.  If you are using the prefork MPM, you have to specify
  LIBS=-lpthread.
 
 I let it choose (it chose threaded).

I may be wrong, but I am reasonably sure that the configure script doesn't
get the correct CFLAGS or LIBS for pthreads on FreeBSD.  This is a known
issue, and it needs to be fixed.  :)

 Consider me porting and modifying!

Cool.

Ryan

___
Ryan Bloom  [EMAIL PROTECTED]
4205 S Miami Blvd   
RTP, NC 27709   

Come to the first official Apache Software Foundation
Conference!  http://ApacheCon.Com/




Re: cvs commit: apache-2.0/src/modules/mpm/winnt winnt.c

1999-12-20 Thread Ryan Bloom


   -API_VAR_EXPORT const char *ap_server_root;
   +//API_VAR_IMPORT const char *ap_server_root;
   +const char *ap_server_root;

Please don't use C++ comments in the base code.  I didn't check to see if
this is the only place it is being done, but it really messes up some
compilers.

Ryan

___
Ryan Bloom  [EMAIL PROTECTED]
4205 S Miami Blvd   
RTP, NC 27709   

Come to the first official Apache Software Foundation
Conference!  http://ApacheCon.Com/




Re: cvs commit: apache-2.0/src/os/win32 main_win32.c

1999-12-17 Thread Ryan Bloom

   Windows:
   Some more work to properly handle -k restart,shutdown. I have made a 
 simplifying
   assumption that the relative name of the server pidfile is always 
 logs/httpd.pid.
   This saves the error prone effort of reading the config file in apache.exe 
 (as
   opposed to ApacheCore.dll). I am really working hard to keep Windows 
 specific
   junk out of http_main.c.

I disagree with this assumption.  If somebody wants to change where the
pidfile is stored, then we have to be able to deal with it.  If that means
putting some Windows specific stuff in http_main, then so be it.  There
are other ways to do this as well (I need to think them through more, and
do some more research about Windows before I post about them).  I am -1
for this patch, unless it is a stop-gap solution so we can get 2.0 working
on Windows until we fix this the right way.

Ryan




Re: cvs commit: apache-2.0/src/lib/apr/test htdigest.c testmmap.c

1999-12-15 Thread Ryan Bloom

   Index: htdigest.c
   ===
   RCS file: /home/cvs/apache-2.0/src/lib/apr/test/htdigest.c,v
   retrieving revision 1.9
   retrieving revision 1.10
   diff -u -r1.9 -r1.10
   --- htdigest.c  1999/12/03 16:12:27 1.9
   +++ htdigest.c  1999/12/15 12:20:40 1.10
   @@ -66,12 +66,21 @@
 * by Alexei Kosut, based on htpasswd.c, by Rob McCool
 */

   +#include apr_config.h
#include apr_lib.h
#include apr_md5.h
   +#ifdef HAVE_SYS_TYPES_H
#include sys/types.h
   +#endif
   +#ifdef HAVE_SYS_SIGNAL_H
#include sys/signal.h
   +#endif
   +#ifdef HAVE_SIGNAL_H
#include signal.h
   +#endif
   +#ifdef HAVE_STDLIB_H
#include stdlib.h
   +#endif

None of the test programs can include apr_config.h or use HAVE_FOO_H tests
anymore.  This is because apr_config.h is a private header file, and is
not available to programs using apr.  Test programs should only include
apr.h.  The HAVE_FOO_H macros are by definition internal only, because
they do not protect namespace.  This part of the patch needs to be
backed out, because it does not really test APR's ability to abstract
information.

Ryan
___
Ryan Bloom  [EMAIL PROTECTED]
4205 S Miami Blvd   
RTP, NC 27709   It's a beautiful sight to see good dancers 
doing simple steps.  It's a painful sight to
see beginners doing complicated patterns.   



Re: cvs commit: apache-2.0/src/lib/apr/time/unix Makefile.in access.c atime.h time.c

1999-12-03 Thread Ryan Bloom
On 3 Dec 1999 [EMAIL PROTECTED] wrote:

   Log:
   Fix the logic in blocking vs non-blocking pipes to children.  It only
   makes sense to change the blocking attributes of a pipe if we actually
   are successful in creating the pipe.

My bad, I thought I had committed all of the other changes I made
yesterday.  The non-blocking related changes, are basically cleanup.  They
keep us from including the same headers all over the place, and they
protect all of the #include's in APR with HAVE_FOO_H.

Ryan
___
Ryan Bloom  [EMAIL PROTECTED]
6209 H Shanda Dr.
Raleigh, NC 27609   Ryan Bloom -- thinker, adventurer, artist,
 writer, but mostly, friend.
---



Re: cvs commit: apache-2.0/src/include ap_ac_config.h

1999-12-01 Thread Ryan Bloom
On 1 Dec 1999 [EMAIL PROTECTED] wrote:

 manoj   99/11/30 21:09:19
 
   Modified:src/include ap_ac_config.h
   Log:
   Autoconf's configure script will tell us which types select is looking
   for; we might as well take advantage of it.

We shouldn't be using select anymore in Apache.  It should be using
ap_poll, and ap_poll will figure out how to use select.  So, this whole
check shouldn't be necessary.

Ryan

___
Ryan Bloom  [EMAIL PROTECTED]
4205 S Miami Blvd   
RTP, NC 27709   It's a beautiful sight to see good dancers 
doing simple steps.  It's a painful sight to
see beginners doing complicated patterns.   



Re: cvs commit: apache-2.0/src/lib/apr/include apr_file_io.h

1999-10-13 Thread Ryan Bloom
On 13 Oct 1999 [EMAIL PROTECTED] wrote:

 bhyde   99/10/13 13:33:43
 
   Modified:src/lib/apr/include apr_file_io.h
   Log:
   Mr. -Wall, full of opinions.
   
   Revision  ChangesPath
   1.14  +1 -1  apache-2.0/src/lib/apr/include/apr_file_io.h
   
   Index: apr_file_io.h
   ===
   RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_file_io.h,v
   retrieving revision 1.13
   retrieving revision 1.14
   diff -u -r1.13 -r1.14
   --- apr_file_io.h   1999/10/13 15:29:18 1.13
   +++ apr_file_io.h   1999/10/13 20:33:42 1.14
   @@ -130,7 +130,7 @@
API_EXPORT(int) ap_fprintf(ap_file_t *fptr, const char *format, ...)
__attribute__((format(printf,2,3)));

   -ap_status_t ap_make_iov(ap_iovec_t **, struct iovec *, ap_context_t *);
   +ap_status_t ap_make_iov(ap_iovec_t **, ap_iovec_t *, ap_context_t *);

This is wrong.  There is no way somebody could have an ap_iovec_t to pass
into this function as the second argument, because this function is
creating the instance of ap_iovec_t.

I'll fix it tomorrow.

Ryan

___
Ryan Bloom  [EMAIL PROTECTED]
6209 H Shanda Dr.
Raleigh, NC 27609   Ryan Bloom -- thinker, adventurer, artist,
 writer, but mostly, friend.
---



Re: cvs commit: apache-2.0/src/lib/apr/file_io/unix open.c

1999-09-13 Thread Ryan Bloom

   -if ((*new)-filedes  0  (*new)-filehand == NULL) {
   +if ((*new)-filedes  0 || (*new)-filehand == NULL) {
   (*new)-filedes = -1;
   (*new)-eof_hit = 1;
return errno;

This is wrong.  This says that we NEVER open the file correctly.  This is
because we only ever set one of the two options, either the filedes or the
filehand, NEVER both.  We are checking for the error condition, not the
successful case.  Either the filedes or the filehand WILL be not set after
each open.  I have serious doubts that the code even works anymore.  If
it does, it is only because we aren't checking return code properly.

Ryan



___
Ryan Bloom  [EMAIL PROTECTED]
4205 S Miami Blvd   
RTP, NC 27709   It's a beautiful sight to see good dancers 
doing simple steps.  It's a painful sight to
see beginners doing complicated patterns.   



Re: cvs commit: apache-2.0/src/lib/apr/file_io/unix open.c

1999-09-13 Thread Ryan Bloom
 Yeah but filedes == 0 when you use filehand (which is possibly a bug).

OK.  This is the bug.  Filedes should be -1.  I don't know how I missed
that in my testing, because we are using filedes all over the place.  I'll
fix this ASAP.

 OK, well it didn't work before, and it now does _when_ it is using
 filehand. I agree this it is still broken, though, but less so than
 before.

Agreed.  The best way to fix it, IMHO, is to init filedes to -1 and make
the original check.

Ryan

___
Ryan Bloom  [EMAIL PROTECTED]
4205 S Miami Blvd   
RTP, NC 27709   It's a beautiful sight to see good dancers 
doing simple steps.  It's a painful sight to
see beginners doing complicated patterns.   



Re: cvs commit: apache-2.0/src/support Makefile.tmpl

1999-09-10 Thread Ryan Bloom
   Let's integrate APR better into the source tree, because it's more than 
 boring
   if one cannot even compile the beast easily (sorry Ryan that I do not agree
   with you here - I think that this is important and has to be done early or
   people will not work with the stuff)...

No complaints here.  I didn't do it, because what you just did in about
twenty minutes, would have taken me three hours.  I have just barely
looked at Configure, and I didn't want to spend the time to understand it
if it goes away.  I'm glad this got done.  :)

Ryan

___
Ryan Bloom  [EMAIL PROTECTED]
4205 S Miami Blvd   
RTP, NC 27709   It's a beautiful sight to see good dancers 
doing simple steps.  It's a painful sight to
see beginners doing complicated patterns.   



Re: cvs commit: apache-2.0/mpm README.rse

1999-08-12 Thread Ryan Bloom

Not to sound pushy or anything, but any chance you'll run the same test
for either apache-apr or the pthread-mpm.  They are basically the same
code, so there is really no need to run the test on both servers.  I would
be interested to see if the static number of processes/ dynamic threads 
is really a big win though.

Ryan

On 12 Aug 1999 [EMAIL PROTECTED] wrote:

 rse 99/08/12 06:25:26
 
   Modified:mpm  README.rse
   Log:
   Give more details
   
   Revision  ChangesPath
   1.5   +3 -2  apache-2.0/mpm/README.rse
   
   Index: README.rse
   ===
   RCS file: /home/cvs/apache-2.0/mpm/README.rse,v
   retrieving revision 1.4
   retrieving revision 1.5
   diff -u -r1.4 -r1.5
   --- README.rse  1999/08/12 12:09:29 1.4
   +++ README.rse  1999/08/12 13:25:26 1.5
   @@ -98,8 +98,9 @@
 $ make 
 $ make install

   -  Some quick tests with the dexter MPM and both GNU Pth and FreeBSD uthread
   -  showed the not too bad results with ApacheBench under the following 
 config:
   +  Some quick tests with the dexter MPM and both GNU Pth and FreeBSD 
 uthread on
   +  a PII/400 under FreeBSD 3.1 showed the not too bad results with 
 ApacheBench
   +  under the following config:

  NumServers   1
  StartThreads32
   
   
   
 

___
Ryan Bloom  [EMAIL PROTECTED]
4205 S Miami Blvd   
RTP, NC 27709   It's a beautiful sight to see good dancers 
doing simple steps.  It's a painful sight to
see beginners doing complicated patterns.   



Re: cvs commit: apache-apr/apr/test testfile.c

1999-06-07 Thread Ryan Bloom
On 6 Jun 1999 [EMAIL PROTECTED] wrote:

   - The directory entry for a file doesn't have it's size attribute updated 
 until
 the file is closed or flushed.

I don't like this.  I would rather have the file flushed each time data is
written to it, than have to close the file to update the directory update.
I saw this same problem on Windows, and I just decided to flush the
buffer.  IMHO, the OS is broken if it is buffering output to a file, but
not using that buffer at ALL time the file is referenced.

Do you have any strong objections to putting the test back the way it was,
and flushing the file with each write.  I know it will cause a performance
hit, but it will make the results more predicatable.

Ryan


___
Ryan Bloom  [EMAIL PROTECTED]
4205 S Miami Blvd   
RTP, NC 27709   It's a beautiful sight to see good dancers 
doing simple steps.  It's a painful sight to
see beginners doing complicated patterns.   



Re: cvs commit: apache-apr/apr/network_io/unix sendrecv.c

1999-04-19 Thread Ryan Bloom
   Modified:apr/network_io/unix sendrecv.c
   Log:
   Fix the algorithm for apr_send.  The same needs to be done for apr_read.
   Why are these functions called send and recv when they have no relation
   to the UNIX system functions send and recv?  write_with_nonblocking_timeout
   is what it does.

They are called apr_send and apr_recv because they implement the apr send
and recv functions.  On Windows, they will use send and recv.  I wasn't
following any real naming guidelines, except for what makes sense when
writing the code.  the name apr_write_with_nonblocking_timeout seemed long
and unnecessary to me.  This is the apr primitive to send data over a
network.  To me, that is sending.

The original design document said we were going to use POSIX type calls,
but that was decided against, so I left most of the names the same because
they made sense, and changed arguments were appropriate.

Ryan

___
Ryan Bloom  [EMAIL PROTECTED]
4205 S Miami Blvd   
RTP, NC 27709   It's a beautiful sight to see good dancers 
doing simple steps.  It's a painful sight to
see beginners doing complicated patterns.