httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Slemko <ma...@alive.ampr.ab.ca>
Subject Re: cvs commit: apache/src conf.h
Date Mon, 25 Nov 1996 00:36:10 GMT
Ok, you are right.  I actually looked at the code this time to see which
of the two billion defines are being used for what, and the real problem
is that on AIX, sys/wait.h includes sys/resource.h if _ALL_SOURCE is
defined. 

standards.h, which is included by a whole whack of headers, defines
_ALL_SOURCE based on:

	#if (!defined (_XOPEN_SOURCE)) &&  (!defined (_POSIX_SOURCE)) && (!defined
(_ANSI_C_SOURCE))
	#define _XOPEN_SOURCE
	#define _POSIX_SOURCE
	#define _ANSI_C_SOURCE
	#ifndef _ALL_SOURCE
	#define _ALL_SOURCE
	#endif
	#endif

The code causing the problem is the set_rlimit routine in http_core.c, which
is surrounded by:

  #if defined(RLIMIT_CPU) || defined(RLIMIT_DATA) || defined(RLIMIT_VMEM) || defined(RLIMIT_NPROC)

Since sys/resource.h is being included indirectly, some of the
above are defined.

Is there some reason that HAVE_SYS_RESOURCE_H isn't used here instead?

On Sun, 24 Nov 1996, Randy Terbush wrote:

> Wait a second.
> 
> HAVE_SYS_RESOURCE_H is _not_ defined for AIX and therefore should
> not be compiling code using the rlim_t type. Can someone point
> me to where this problem was found?  I'll start digging.
> 
> I think this patch is fluff.
> 
> > brian       96/11/24 11:22:55
> > 
> >   Modified:    src       conf.h
> >   Log:
> >   Reviewed by:	Brian Behlendorf
> >   Submitted by:	Marc Slemko
> >   
> >   rlim_t does not exist on AIX, at least AIX 4.1.x.
> >   
> >   Revision  Changes    Path
> >   1.46      +1 -0      apache/src/conf.h
> >   
> >   Index: conf.h
> >   ===================================================================
> >   RCS file: /export/home/cvs/apache/src/conf.h,v
> >   retrieving revision 1.45
> >   retrieving revision 1.46
> >   diff -C3 -r1.45 -r1.46
> >   *** conf.h	1996/11/23 19:58:17	1.45
> >   --- conf.h	1996/11/24 19:22:54	1.46
> >   ***************
> >   *** 120,125 ****
> >   --- 120,126 ----
> >     #define HAVE_SYS_SELECT_H
> >     #define JMP_BUF sigjmp_buf
> >     #define HAVE_MMAP
> >   + typedef int rlim_t;
> >     
> >     #elif defined(ULTRIX)
> >     #define HAVE_GMTOFF
> >   
> >   
> >   
> 
> 
> 




Mime
View raw message