You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rb...@locus.apache.org on 2000/03/02 21:36:48 UTC

cvs commit: apache-2.0/src/main http_log.c

rbb         00/03/02 12:36:47

  Modified:    src/lib/apr acconfig.h configure.in
               src/lib/apr/include apr.h.in
               src/main http_log.c
  Log:
  Fix the logic for ap_signal, so it is exposed in external header files in APR.
  Also change the header file included in http_log.c.
  
  Revision  Changes    Path
  1.22      +0 -16     apache-2.0/src/lib/apr/acconfig.h
  
  Index: acconfig.h
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/acconfig.h,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- acconfig.h	2000/01/24 13:58:59	1.21
  +++ acconfig.h	2000/03/02 20:36:44	1.22
  @@ -53,22 +53,6 @@
   /* Make sure we have ssize_t defined to be somethine */
   #undef ssize_t
   
  -/* We want this in config.h, because it is a macro that Windows requires.  This
  - * way, every thread start function has this definition, and things are happy.
  - */
  -#define API_THREAD_FUNC
  -
  -#ifdef HAVE_SIGACTION
  -typedef void Sigfunc(int);
  -Sigfunc *ap_signal(int signo, Sigfunc * func);
  -
  -#if defined(SIG_ING) && !defined(SIG_ERR)
  -#define SIG_ERR ((Sigfunc *)-1)
  -#endif
  -#else
  -#define ap_signal(a,b) signal(a,b)
  -#endif
  -
   #if !defined(HAVE_PTHREAD_SIGMASK) && defined(_AIX)
   #define pthread_sigmask sigprocmask
   #endif
  
  
  
  1.54      +3 -1      apache-2.0/src/lib/apr/configure.in
  
  Index: configure.in
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/configure.in,v
  retrieving revision 1.53
  retrieving revision 1.54
  diff -u -r1.53 -r1.54
  --- configure.in	2000/03/02 16:54:24	1.53
  +++ configure.in	2000/03/02 20:36:44	1.54
  @@ -101,7 +101,8 @@
   dnl Checks for library functions.
   AC_CHECK_FUNCS(pthread_sigmask)
   AC_CHECK_FUNCS(strcasecmp stricmp poll setsid)
  -AC_CHECK_FUNCS(sigaction writev)
  +AC_CHECK_FUNCS(sigaction, [ have_sigaction="1" ], [ have_sigaction="0" ]) 
  +AC_CHECK_FUNCS(writev)
   AC_CHECK_FUNCS(sendfile, [ sendfile="1" ], [ sendfile="0" ])
   AC_CHECK_FUNCS(fork, [ fork="1" ], [ fork="0" ])
   AC_CHECK_FUNCS(getpass)
  @@ -113,6 +114,7 @@
   AC_SUBST(fork)
   AC_SUBST(inet_addr)
   AC_SUBST(inet_network)
  +AC_SUBST(have_sigaction)
   
   
   dnl #----------------------------- Checks for Any required Headers
  
  
  
  1.15      +16 -0     apache-2.0/src/lib/apr/include/apr.h.in
  
  Index: apr.h.in
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr.h.in,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- apr.h.in	2000/02/04 01:06:57	1.14
  +++ apr.h.in	2000/03/02 20:36:45	1.15
  @@ -95,4 +95,20 @@
    */
   @ssize_t_fmt@
   
  +/* Define ap_signal and related necessary definitions.
  + */
  +/* We are checking for HAVE_SIGACTION, but autoconf is filling this in 
  + * for us automatically.
  + */
  +#if @have_sigaction@
  +typedef void Sigfunc(int);
  +Sigfunc *ap_signal(int signo, Sigfunc * func);
  +
  +#if defined(SIG_ING) && !defined(SIG_ERR)
  +#define SIG_ERR ((Sigfunc *)-1)
  +#endif
  +#else
  +#define ap_signal(a,b) signal(a,b)
  +#endif
  +
   #endif /* APR_H */
  
  
  
  1.33      +5 -1      apache-2.0/src/main/http_log.c
  
  Index: http_log.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/main/http_log.c,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- http_log.c	2000/03/02 11:05:16	1.32
  +++ http_log.c	2000/03/02 20:36:46	1.33
  @@ -64,10 +64,14 @@
   
   
   #define CORE_PRIVATE
  +#ifdef WIN32
  +#include "apr_win.h"
  +#else
  +#include "apr.h"  /* for ap_signal */
  +#endif
   #include "ap_config.h"
   #include "apr_lib.h"
   #include "apr_portable.h"
  -#include "apr_config.h"		/* XXX for ap_signal?? */
   #include "httpd.h"
   #include "http_config.h"
   #include "http_core.h"
  
  
  

Re: cvs commit: apache-2.0/src/main http_log.c

Posted by rb...@apache.org.
> > I guess we could, but it would be pretty ugly.  I'll look into doing it.
> 
> Maybe move apr.h to apr_default.h and have apr.h select between apr_win.h,
> apr_default.h, and apr_xxx.h? (where xxx is for other platforms that do
> not have configure)
> 
> That might keep it clean.
> 
> ??

That's what I was thinking of doing.  It just seems like it may get a bit
ugly quickly, and people will have to track definitions through multiple
header files.  I know some people don't like it when one header file is
included, and all it does is include another header file.  Plus, what will
this do to dependancies.

Ryan


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

_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------


Re: cvs commit: apache-2.0/src/main http_log.c

Posted by Greg Stein <gs...@lyra.org>.
On Thu, 2 Mar 2000 rbb@apache.org wrote:
> On Thu, 2 Mar 2000, Greg Stein wrote:
> > On 2 Mar 2000 rbb@locus.apache.org wrote:
...
> > >   +#ifdef WIN32
> > >   +#include "apr_win.h"
> > >   +#else
> > >   +#include "apr.h"  /* for ap_signal */
> > >   +#endif
> > 
> > Can this be isolated within apr.h, so that APR users don't have to
> > replicate the above #ifdef every time they include the header?
> 
> I guess we could, but it would be pretty ugly.  I'll look into doing it.

Maybe move apr.h to apr_default.h and have apr.h select between apr_win.h,
apr_default.h, and apr_xxx.h? (where xxx is for other platforms that do
not have configure)

That might keep it clean.

??

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/


Re: cvs commit: apache-2.0/src/main http_log.c

Posted by rb...@apache.org.
On Thu, 2 Mar 2000, Greg Stein wrote:

> On 2 Mar 2000 rbb@locus.apache.org wrote:
> >...
> >   Index: http_log.c
> >   ===================================================================
> >   RCS file: /home/cvs/apache-2.0/src/main/http_log.c,v
> >   retrieving revision 1.32
> >   retrieving revision 1.33
> >   diff -u -r1.32 -r1.33
> >   --- http_log.c	2000/03/02 11:05:16	1.32
> >   +++ http_log.c	2000/03/02 20:36:46	1.33
> >   @@ -64,10 +64,14 @@
> >    
> >    
> >    #define CORE_PRIVATE
> >   +#ifdef WIN32
> >   +#include "apr_win.h"
> >   +#else
> >   +#include "apr.h"  /* for ap_signal */
> >   +#endif
> 
> Can this be isolated within apr.h, so that APR users don't have to
> replicate the above #ifdef every time they include the header?

I guess we could, but it would be pretty ugly.  I'll look into doing it.

Ryan


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

_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------


Re: cvs commit: apache-2.0/src/main http_log.c

Posted by Greg Stein <gs...@lyra.org>.
On 2 Mar 2000 rbb@locus.apache.org wrote:
>...
>   Index: http_log.c
>   ===================================================================
>   RCS file: /home/cvs/apache-2.0/src/main/http_log.c,v
>   retrieving revision 1.32
>   retrieving revision 1.33
>   diff -u -r1.32 -r1.33
>   --- http_log.c	2000/03/02 11:05:16	1.32
>   +++ http_log.c	2000/03/02 20:36:46	1.33
>   @@ -64,10 +64,14 @@
>    
>    
>    #define CORE_PRIVATE
>   +#ifdef WIN32
>   +#include "apr_win.h"
>   +#else
>   +#include "apr.h"  /* for ap_signal */
>   +#endif

Can this be isolated within apr.h, so that APR users don't have to
replicate the above #ifdef every time they include the header?

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/