~ubuntu-branches/ubuntu/feisty/apache2/feisty

« back to all changes in this revision

Viewing changes to os/tpf/os.h

  • Committer: Bazaar Package Importer
  • Author(s): Andreas Barth
  • Date: 2006-12-09 21:05:45 UTC
  • mfrom: (0.6.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20061209210545-h70s0xaqc2v8vqr2
Tags: 2.2.3-3.2
* Non-maintainer upload.
* 043_ajp_connection_reuse: Patch from upstream Bugzilla, fixing a critical
  issue with regard to connection reuse in mod_proxy_ajp.
  Closes: #396265

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Licensed to the Apache Software Foundation (ASF) under one or more
 
2
 * contributor license agreements.  See the NOTICE file distributed with
 
3
 * this work for additional information regarding copyright ownership.
 
4
 * The ASF licenses this file to You under the Apache License, Version 2.0
 
5
 * (the "License"); you may not use this file except in compliance with
 
6
 * the License.  You may obtain a copy of the License at
 
7
 *
 
8
 *     http://www.apache.org/licenses/LICENSE-2.0
 
9
 *
 
10
 * Unless required by applicable law or agreed to in writing, software
 
11
 * distributed under the License is distributed on an "AS IS" BASIS,
 
12
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 
13
 * See the License for the specific language governing permissions and
 
14
 * limitations under the License.
 
15
 */
 
16
 
 
17
/**
 
18
 * @file tpf/os.h
 
19
 * @brief This file in included in all Apache source code. It contains definitions
 
20
 * of facilities available on _this_ operating system (HAVE_* macros),
 
21
 * and prototypes of OS specific functions defined in os.c or os-inline.c
 
22
 *
 
23
 * @defgroup APACHE_OS_TPF tpf
 
24
 * @ingroup  APACHE_OS
 
25
 * @{
 
26
 */
 
27
 
 
28
#ifndef APACHE_OS_H
 
29
#define APACHE_OS_H
 
30
 
 
31
#define PLATFORM "TPF"
 
32
 
 
33
#ifdef errno
 
34
#undef errno
 
35
#endif
 
36
 
 
37
#include "apr.h"
 
38
#include "ap_config.h"
 
39
#include <strings.h>
 
40
#ifndef __strings_h
 
41
 
 
42
#define FD_SETSIZE    2048 
 
43
 
 
44
typedef long fd_mask;
 
45
 
 
46
#define NBBY    8    /* number of bits in a byte */
 
47
#define NFDBITS (sizeof(fd_mask) * NBBY)
 
48
#define  howmany(x, y)  (((x)+((y)-1))/(y))
 
49
 
 
50
typedef struct fd_set { 
 
51
        fd_mask fds_bits [howmany(FD_SETSIZE, NFDBITS)];
 
52
} fd_set; 
 
53
 
 
54
#define FD_CLR(n, p)((p)->fds_bits[(n)/NFDBITS] &= ~(1 << ((n) % NFDBITS)))
 
55
#define FD_ISSET(n, p)((p)->fds_bits[(n)/NFDBITS] & (1 <<((n) % NFDBITS)))
 
56
#define  FD_ZERO(p)   memset((char *)(p), 0, sizeof(*(p)))
 
57
#endif
 
58
    
 
59
#ifdef FD_SET
 
60
#undef FD_SET
 
61
#define FD_SET(n, p) (0)
 
62
#endif
 
63
 
 
64
#include <i$netd.h>
 
65
struct apache_input {
 
66
    INETD_SERVER_INPUT  inetd_server;
 
67
    void                *scoreboard_heap;   /* scoreboard system heap address */
 
68
    int                 scoreboard_fd;      /* scoreboard file descriptor */
 
69
    int                 slot;               /* child number */
 
70
    int                 generation;         /* server generation number */
 
71
    int                 listeners[10];
 
72
    time_t              restart_time;
 
73
};
 
74
 
 
75
typedef struct apache_input APACHE_TPF_INPUT;
 
76
 
 
77
extern int tpf_child;
 
78
 
 
79
struct server_rec;
 
80
pid_t os_fork(struct server_rec *s, int slot);
 
81
int os_check_server(char *server);
 
82
 
 
83
extern char *ap_server_argv0;
 
84
extern int scoreboard_fd;
 
85
#include <signal.h>
 
86
#ifndef SIGPIPE
 
87
#define SIGPIPE 14
 
88
#endif
 
89
#ifdef NSIG
 
90
#undef NSIG
 
91
#endif
 
92
#endif /*! APACHE_OS_H*/
 
93
/** @} */