You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Brian Behlendorf <br...@hyperreal.com> on 1997/02/02 22:40:06 UTC
PATCH: conf.h / USE_FLOCK or USE_FCNTL (fwd)
---------- Forwarded message ----------
Date: Sat, 1 Feb 1997 13:19:56 +0100
From: System Owner <ro...@en3.engelschall.de>
To: Apache Developer ML <ne...@hyperreal.com>
Subject: PATCH: conf.h / USE_FLOCK or USE_FCNTL
Below is a patch for conf.h to define USE_FLOCK or USE_FCNTL in a more
pessimistic way than the current mod_rewrite.h (3.0.0) does. It is highly
recommomened that we include such defines, because currently mod_rewrite
privately guesses the choice of flock/fcntl from the
USE_FCNTL_SERIALIZED_ACCEPT define.
BTW: For MACHTEN there was a FCNTL_SER... instead of USE_FCNTL_SER...
This was the old name in 1.1.x. The patch below fixes this too.
Ralf S. Engelschall
rse@engelschall.com
www.engelschall.com
*** conf.h Mon Jan 27 03:00:09 1997
--- conf.h.n Sat Feb 1 13:15:52 1997
***************
*** 71,76 ****
--- 71,77 ----
#include <sys/time.h>
#define NEED_STRERROR
typedef int rlim_t;
+ #define USE_FCNTL
#elif defined(SOLARIS2)
#undef HAVE_GMTOFF
***************
*** 81,86 ****
--- 82,88 ----
#define getwd(d) getcwd(d,MAX_STRING_LEN)
#define JMP_BUF sigjmp_buf
#define USE_FCNTL_SERIALIZED_ACCEPT
+ #define USE_FCNTL
#define HAVE_MMAP
#define HAVE_CRYPT_H
int gethostname(char *name, int namelen);
***************
*** 91,96 ****
--- 93,99 ----
#undef NO_SETSID
#define JMP_BUF sigjmp_buf
#define USE_FCNTL_SERIALIZED_ACCEPT
+ #define USE_FCNTL
#define HAVE_SHMGET
#define HAVE_CRYPT_H
#define NO_LONG_DOUBLE
***************
*** 110,115 ****
--- 113,119 ----
#define HAVE_SHMGET
#ifndef HPUX10
typedef int rlim_t;
+ #define USE_FCNTL
#endif
#elif defined(AIX)
***************
*** 136,141 ****
--- 140,146 ----
#define const /* Not implemented */
#endif
#define JMP_BUF sigjmp_buf
+ #define USE_FLOCK
#elif defined(OSF1)
#define HAVE_GMTOFF
***************
*** 227,232 ****
--- 232,238 ----
#undef NEED_STRDUP
#define JMP_BUF sigjmp_buf
#define USE_FCNTL_SERIALIZED_ACCEPT
+ #define USE_FCNTL
#include <sys/time.h>
#elif defined(SCO)
***************
*** 244,249 ****
--- 250,256 ----
#define SIGURG SIGUSR1
#define HAVE_SYS_SELECT_H
#define USE_FCNTL_SERIALIZED_ACCEPT
+ #define USE_FCNTL
#define HAVE_MMAP
#define HAVE_SYS_RESOURCE_H
#define SecureWare
***************
*** 299,304 ****
--- 306,312 ----
#define getwd(d) getcwd(d,MAX_STRING_LEN)
/* A lot of SVR4 systems need this */
#define USE_FCNTL_SERIALIZED_ACCEPT
+ #define USE_FCNTL
#elif defined(UW)
#define NO_KILLPG
***************
*** 317,322 ****
--- 325,331 ----
#define HAVE_SYS_RESOURCE_H
#include <sys/time.h>
#define _POSIX_SOURCE
+ #define USE_FCNTL
#elif defined(DGUX)
#define NO_KILLPG
***************
*** 329,334 ****
--- 338,344 ----
#define getwd(d) getcwd(d,MAX_STRING_LEN)
/* A lot of SVR4 systems need this */
#define USE_FCNTL_SERIALIZED_ACCEPT
+ #define USE_FCNTL
#elif defined(__NetBSD__) || defined(__OpenBSD__)
#define HAVE_SYS_RESOURCE_H
***************
*** 338,343 ****
--- 348,354 ----
#define JMP_BUF sigjmp_buf
#define DEFAULT_USER "nobody"
#define DEFAULT_GROUP "nogroup"
+ #define USE_FLOCK
#elif defined(UTS21)
#undef HAVE_GMTOFF
***************
*** 365,370 ****
--- 376,382 ----
#define DEFAULT_USER "nobody"
#define DEFAULT_GROUP "nogroup"
typedef quad_t rlim_t;
+ #define USE_FLOCK
#elif defined(QNX)
#undef NO_KILLPG
***************
*** 398,403 ****
--- 410,416 ----
#define getwd(d) getcwd(d,MAX_STRING_LEN)
#define JMP_BUF sigjmp_buf
#define USE_FCNTL_SERIALIZED_ACCEPT
+ #define USE_FCNTL
#define HAVE_MMAP
#define HAVE_CRYPT_H
***************
*** 424,434 ****
#ifndef __MACHTEN_68K__
#define __MACHTEN_68K__
#endif
! #define FLOCK_SERIALIZED_ACCEPT
#define NO_USE_SIGACTION
#undef NEED_STRDUP
#else
! #define FCNTL_SERIALIZED_ACCEPT
#endif
/* Convex OS v11 */
--- 437,449 ----
#ifndef __MACHTEN_68K__
#define __MACHTEN_68K__
#endif
! #define USE_FLOCK_SERIALIZED_ACCEPT
! #define USE_FLOCK
#define NO_USE_SIGACTION
#undef NEED_STRDUP
#else
! #define USE_FCNTL_SERIALIZED_ACCEPT
! #define USE_FCNTL
#endif
/* Convex OS v11 */
***************
*** 447,452 ****
--- 462,468 ----
#define SIGURG SIGUSR1
#define JMP_BUF sigjmp_buf
#define USE_FCNTL_SERIALIZED_ACCEPT
+ #define USE_FCNTL
#define getwd(d) getcwd(d,MAX_STRING_LEN)
/* Unknown system - Edit these to match */
***************
*** 462,467 ****
--- 478,488 ----
#undef NO_SETSID
/* NEED_STRDUP is set on stupid systems that don't have strdup. */
#undef NEED_STRDUP
+ /* Try to guess whether to use flock or fcntl */
+ #ifdef BSD
+ #define USE_FLOCK
+ #else
+ #define USE_FCNTL
#endif
/* Do we have sys/resource.h; assume that BSD does. */
Re: PATCH: conf.h / USE_FLOCK or USE_FCNTL (fwd)
Posted by Marc Slemko <ma...@znep.com>.
On Sun, 2 Feb 1997, Brian Behlendorf wrote:
>
>
> ---------- Forwarded message ----------
> Date: Sat, 1 Feb 1997 13:19:56 +0100
> From: System Owner <ro...@en3.engelschall.de>
> To: Apache Developer ML <ne...@hyperreal.com>
> Subject: PATCH: conf.h / USE_FLOCK or USE_FCNTL
>
>
> Below is a patch for conf.h to define USE_FLOCK or USE_FCNTL in a more
> pessimistic way than the current mod_rewrite.h (3.0.0) does. It is highly
> recommomened that we include such defines, because currently mod_rewrite
> privately guesses the choice of flock/fcntl from the
> USE_FCNTL_SERIALIZED_ACCEPT define.
+1 on the concept. I wonder if we should get rid of
USE_*_SERIALIZED_ACCEPT and replace it with a combination of
USE_SERIALIZED_ACCEPT and USE_{FCNTL|FLOCK}. Comments? If we are
generalizing this (and I think that is a good idea; can think of lots
of ideas for cool modules that need to lock files) may as well do it
fully.
I don't have time to really look at the patch and how it impacts
things right now, but at first glance it looks reasonable.