View | Details | Raw Unified | Return to bug 117014
Collapse All | Expand All

(-)mod_fcgid/Makefile (-2 / +2 lines)
Lines 6-13 Link Here
6
#
6
#
7
7
8
PORTNAME=	mod_fcgid
8
PORTNAME=	mod_fcgid
9
PORTVERSION=	2.1
9
PORTVERSION=	2.2
10
PORTREVISION=	2
10
PORTREVISION=	0
11
CATEGORIES=	www
11
CATEGORIES=	www
12
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE_EXTENDED}
12
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE_EXTENDED}
13
MASTER_SITE_SUBDIR=	${PORTNAME:S/_/-/}
13
MASTER_SITE_SUBDIR=	${PORTNAME:S/_/-/}
(-)mod_fcgid/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
MD5 (mod_fcgid.2.1.tar.gz) = 0bc036276e378463c80617ff57e853dc
1
MD5 (mod_fcgid.2.2.tar.gz) = ce7d7b16e69643dbd549d43d85025983
2
SHA256 (mod_fcgid.2.1.tar.gz) = 9d847f66f8067c5b8de06088a04356d22cee9ced2db7d04be6d6a7613c6b83df
2
SHA256 (mod_fcgid.2.2.tar.gz) = 7a0985a120dceb4c6974e8bf216752b0b763ae949f5dfbbf93cc350510e4c80e
3
SIZE (mod_fcgid.2.1.tar.gz) = 54359
3
SIZE (mod_fcgid.2.2.tar.gz) = 56954
(-)mod_fcgid/files/patch-arch-unix-fcgid_proctbl_unix.c (-98 lines)
Lines 1-98 Link Here
1
--- arch/unix/fcgid_proctbl_unix.c.orig	Fri Feb 16 04:34:41 2007
2
+++ arch/unix/fcgid_proctbl_unix.c	Tue Feb 27 18:33:28 2007
3
@@ -1,4 +1,5 @@
4
 #include "fcgid_proctbl.h"
5
+#include "apr_version.h"
6
 #include "apr_shm.h"
7
 #include "apr_global_mutex.h"
8
 #include "fcgid_global.h"
9
@@ -17,6 +18,89 @@
10
 static fcgid_share *_global_memory = NULL;
11
 static fcgid_global_share *g_global_share = NULL;	/* global information */
12
 static size_t g_table_size = FCGID_PROC_TABLE_SIZE;
13
+
14
+/* apr version 0.x not support apr_shm_remove, I have to copy it from apr version 1.x */
15
+#if (APR_MAJOR_VERSION < 1)
16
+#ifdef HAVE_SYS_MMAN_H
17
+#include <sys/mman.h>
18
+#endif
19
+#ifdef HAVE_SYS_IPC_H
20
+#include <sys/ipc.h>
21
+#endif
22
+#ifdef HAVE_SYS_MUTEX_H
23
+#include <sys/mutex.h>
24
+#endif
25
+#ifdef HAVE_SYS_SHM_H
26
+#include <sys/shm.h>
27
+#endif
28
+#if !defined(SHM_R)
29
+#define SHM_R 0400
30
+#endif
31
+#if !defined(SHM_W)
32
+#define SHM_W 0200
33
+#endif
34
+#ifdef HAVE_SYS_FILE_H
35
+#include <sys/file.h>
36
+#endif
37
+
38
+static apr_status_t apr_shm_remove(const char *filename, apr_pool_t * pool)
39
+{
40
+#if APR_USE_SHMEM_SHMGET
41
+	apr_status_t status;
42
+	apr_file_t *file;
43
+	key_t shmkey;
44
+	int shmid;
45
+#endif
46
+
47
+#if APR_USE_SHMEM_MMAP_TMP
48
+	return apr_file_remove(filename, pool);
49
+#endif
50
+#if APR_USE_SHMEM_MMAP_SHM
51
+	if (shm_unlink(filename) == -1) {
52
+		return errno;
53
+	}
54
+	return APR_SUCCESS;
55
+#endif
56
+#if APR_USE_SHMEM_SHMGET
57
+	/* Presume that the file already exists; just open for writing */
58
+	status = apr_file_open(&file, filename, APR_WRITE,
59
+						   APR_OS_DEFAULT, pool);
60
+	if (status) {
61
+		return status;
62
+	}
63
+
64
+	/* ftok() (on solaris at least) requires that the file actually
65
+	 * exist before calling ftok(). */
66
+	shmkey = ftok(filename, 1);
67
+	if (shmkey == (key_t) - 1) {
68
+		goto shm_remove_failed;
69
+	}
70
+
71
+	apr_file_close(file);
72
+
73
+	if ((shmid = shmget(shmkey, 0, SHM_R | SHM_W)) < 0) {
74
+		goto shm_remove_failed;
75
+	}
76
+
77
+	/* Indicate that the segment is to be destroyed as soon
78
+	 * as all processes have detached. This also disallows any
79
+	 * new attachments to the segment. */
80
+	if (shmctl(shmid, IPC_RMID, NULL) == -1) {
81
+		goto shm_remove_failed;
82
+	}
83
+	return apr_file_remove(filename, pool);
84
+
85
+  shm_remove_failed:
86
+	status = errno;
87
+	/* ensure the file has been removed anyway. */
88
+	apr_file_remove(filename, pool);
89
+	return status;
90
+#endif
91
+
92
+	/* No support for anonymous shm */
93
+	return APR_ENOTIMPL;
94
+}
95
+#endif							/* APR_MAJOR_VERSION<1 */
96
 
97
 apr_status_t
98
 proctable_post_config(server_rec * main_server, apr_pool_t * configpool)
(-)mod_fcgid/files/patch-fcgid_conf.c (-3 / +3 lines)
Lines 1-6 Link Here
1
--- fcgid_conf.c.orig	Mon Jul 26 07:08:03 2004
1
--- fcgid_conf.c.orig	2007-07-31 04:09:20.000000000 -0500
2
+++ fcgid_conf.c	Fri Aug 13 05:04:44 2004
2
+++ fcgid_conf.c	2007-10-08 08:17:12.000000000 -0500
3
@@ -15,7 +15,7 @@
3
@@ -17,8 +17,8 @@
4
 #define DEFAULT_ERROR_SCAN_INTERVAL 3
4
 #define DEFAULT_ERROR_SCAN_INTERVAL 3
5
 #define DEFAULT_ZOMBIE_SCAN_INTERVAL 3
5
 #define DEFAULT_ZOMBIE_SCAN_INTERVAL 3
6
 #define DEFAULT_PROC_LIFETIME (60*60)
6
 #define DEFAULT_PROC_LIFETIME (60*60)

Return to bug 117014