update to 0.1.2alpha5pl2 from 0.1.0alpha18
see http://www.opencm.org/news.html for hilights of this update, major noteworthy changes include: - sxd has gone away, gzfs is 'interim' while 'sxd2' is almost ready - if you have an old sxd repository, read the mailing list archives for how to update (use an interum version) - an incompatible update to the server/client protocol requires that you update both at the same time (as a reminder, this is 'alpha' and as such is subject to incompatible changes like the above. expect more to come when sxd2 emerges) Also, add a 'nogc' flavor that removes the dependency on boehm-gc, at the cost of not free()'ing all memory allocated (read: at the moment, most).
This commit is contained in:
parent
0e41eafb18
commit
31057a08c0
@ -1,13 +1,12 @@
|
||||
# $OpenBSD: Makefile,v 1.10 2003/03/04 21:41:00 sturm Exp $
|
||||
# $OpenBSD: Makefile,v 1.11 2003/05/23 13:22:14 todd Exp $
|
||||
|
||||
COMMENT= "OpenCM change management system"
|
||||
COMMENT-docs= "OpenCM Documentation"
|
||||
|
||||
V= 0.1.0alpha18pl2
|
||||
V= 0.1.2alpha5pl2
|
||||
sV= -1
|
||||
DISTNAME= opencm-${V}${sV}-src
|
||||
PKGNAME= opencm-${V}
|
||||
FULLPKGNAME= opencm-${V}
|
||||
FULLPKGNAME-docs= opencm-docs-${V}
|
||||
CATEGORIES= devel
|
||||
|
||||
@ -26,23 +25,29 @@ PERMIT_DISTFILES_FTP= Yes
|
||||
MASTER_SITES= http://www.opencm.org/releases/
|
||||
EXTRACT_SUFX= .tgz
|
||||
|
||||
BUILD_DEPENDS= gc.1:boehm-gc->=6.0:devel/boehm-gc
|
||||
LIB_DEPENDS= gc.1::devel/boehm-gc
|
||||
|
||||
USE_GMAKE= Yes
|
||||
MODGNU_CONFIG_GUESS_DIRS= ${WRKSRC}
|
||||
CONFIGURE_STYLE= autoconf
|
||||
CONFIGURE_ARGS+= ${CONFIGURE_SHARED}
|
||||
CONFIGURE_ENV= LDFLAGS="-L${LOCALBASE}/lib -lz -lgc" \
|
||||
CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include"
|
||||
CONFIGURE_ARGS+= --disable-shared --enable-static
|
||||
CONFIGURE_ENV= LDFLAGS="${LDFLAGS}" \
|
||||
CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include" \
|
||||
vl_cv_lib_kerberos=1
|
||||
|
||||
FLAVORS=docs
|
||||
LDFLAGS=-L${LOCALBASE}/lib
|
||||
|
||||
MAKE_ENV= LDFLAGS="${LDFLAGS}"
|
||||
|
||||
PSEUDO_FLAVORS= no_docs
|
||||
FLAVORS= nogc
|
||||
FLAVOR?=
|
||||
|
||||
MULTI_PACKAGES=
|
||||
|
||||
.if ${FLAVOR:L:Mdocs}
|
||||
BUILD_DEPENDS+= :teTeX_base-*:print/teTeX/base
|
||||
.if ${FLAVOR:L:Mno_docs}
|
||||
MAKE_FLAGS+= TEXI2DVI=: DVIPS=:
|
||||
FAKE_FLAGS+= TEXI2DVI=: DVIPS=:
|
||||
.else
|
||||
BUILD_DEPENDS+= :teTeX_base-1.0.*:print/teTeX/base
|
||||
MULTI_PACKAGES+= -docs
|
||||
|
||||
post-install:
|
||||
@ -50,12 +55,23 @@ post-install:
|
||||
${INSTALL_DATA} ${WRKSRC}/doc/opencm.html ${PREFIX}/share/doc/opencm
|
||||
${INSTALL_DATA} ${WRKSRC}/doc/opencm.ps ${PREFIX}/share/doc/opencm
|
||||
|
||||
.else
|
||||
MAKE_FLAGS+= TEXI2DVI=: DVIPS=:
|
||||
FAKE_FLAGS+= TEXI2DVI=: DVIPS=:
|
||||
.endif
|
||||
MAKE_FLAGS+= LIBZ= LIBGC= USOURCE_SUBDIRS="libgdiff src"
|
||||
FAKE_FLAGS+= LIBZ= LIBGC= USOURCE_SUBDIRS="libgdiff src"
|
||||
|
||||
MAKE_FLAGS+= LIBZ=-lz USOURCE_SUBDIRS="libgdiff src"
|
||||
FAKE_FLAGS+= LIBZ=-lz USOURCE_SUBDIRS="libgdiff src"
|
||||
|
||||
.if ${FLAVOR:L:Mnogc}
|
||||
|
||||
PATCHDIR= ${.CURDIR}/patches.nogc
|
||||
|
||||
.else
|
||||
|
||||
MAKE_FLAGS+= LIBGC=/usr/local/lib/libgc.a
|
||||
FAKE_FLAGS+= LIBGC=/usr/local/lib/libgc.a
|
||||
BUILD_DEPENDS= gc.1:boehm-gc->=6.0:devel/boehm-gc
|
||||
LIB_DEPENDS= gc.1::devel/boehm-gc
|
||||
|
||||
.endif
|
||||
|
||||
PLIST= ${PKGDIR}/PLIST${SUBPACKAGE}
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
MD5 (opencm-0.1.0alpha18pl2-1-src.tgz) = df78021d867d90e548c496b472d6ca71
|
||||
RMD160 (opencm-0.1.0alpha18pl2-1-src.tgz) = a13a885d27a0458dc726351b108378b1adcfbe3e
|
||||
SHA1 (opencm-0.1.0alpha18pl2-1-src.tgz) = 9ae861e648acb19880ad39187b1735ef9ab3db02
|
||||
MD5 (opencm-0.1.2alpha5pl2-1-src.tgz) = 3e8917d8cdbd78414d1045e9ad65c08b
|
||||
RMD160 (opencm-0.1.2alpha5pl2-1-src.tgz) = 87f14a83c98fc012c35d0f73a2749120a937db2d
|
||||
SHA1 (opencm-0.1.2alpha5pl2-1-src.tgz) = c975637ed775f398a7c710771c63995c5b54aa24
|
||||
|
12
devel/opencm/patches.nogc/patch-base_Makefile_in
Normal file
12
devel/opencm/patches.nogc/patch-base_Makefile_in
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-base_Makefile_in,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/Makefile.in.orig Fri Jan 17 16:20:31 2003
|
||||
+++ base/Makefile.in Thu May 22 17:46:39 2003
|
||||
@@ -127,7 +127,7 @@ DISTFILES = \
|
||||
|
||||
### Subdirectories to run make in for the primary targets.
|
||||
# Unix source subdirs, where we'll want to run lint and etags:
|
||||
-USOURCE_SUBDIRS = libgdiff gc6.1 zlib src
|
||||
+USOURCE_SUBDIRS = libgdiff zlib src
|
||||
# All other subdirs:
|
||||
SUBDIRS = ${USOURCE_SUBDIRS} doc tools etc
|
||||
|
22
devel/opencm/patches.nogc/patch-base_aclocal_m4
Normal file
22
devel/opencm/patches.nogc/patch-base_aclocal_m4
Normal file
@ -0,0 +1,22 @@
|
||||
$OpenBSD: patch-base_aclocal_m4,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/aclocal.m4.orig Tue Apr 22 08:59:16 2003
|
||||
+++ base/aclocal.m4 Thu May 22 17:46:39 2003
|
||||
@@ -1,18 +1,3 @@
|
||||
-AC_DEFUN([AC_AUTOCONFIG_GC], [
|
||||
- AC_MSG_CHECKING([if autoconf has been run for gc6.1])
|
||||
- if test -d gc6.1; then
|
||||
- if test -r gc6.1/configure; then
|
||||
- AC_MSG_RESULT([yes])
|
||||
- else
|
||||
- (cd gc6.1; autoconf)
|
||||
- AC_MSG_RESULT([built])
|
||||
- fi
|
||||
- else
|
||||
- echo "no - using external gc6.1"
|
||||
- fi
|
||||
- ])
|
||||
-])
|
||||
-
|
||||
dnl The check for libtermcap/libcurses is a HUGE mess. First, the headers
|
||||
dnl and the libraries need to agree. Second, we need to get the proper header
|
||||
dnl macros defined. The objective of the macro below is to identify
|
55
devel/opencm/patches.nogc/patch-base_configure_in
Normal file
55
devel/opencm/patches.nogc/patch-base_configure_in
Normal file
@ -0,0 +1,55 @@
|
||||
$OpenBSD: patch-base_configure_in,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/configure.in.orig Wed Apr 23 14:50:38 2003
|
||||
+++ base/configure.in Thu May 22 17:46:39 2003
|
||||
@@ -41,8 +41,6 @@ AC_PREREQ(2.13)dnl
|
||||
AC_INIT(src/client/opencm.c)
|
||||
AC_REVISION($Revision 0.1$)
|
||||
AC_CONFIG_HEADER(config.h)
|
||||
-AC_AUTOCONFIG_GC()
|
||||
-AC_CONFIG_SUBDIRS(gc6.1)
|
||||
|
||||
AC_CANONICAL_HOST
|
||||
|
||||
@@ -103,15 +101,8 @@ AC_ARG_WITH(krb5-dir,
|
||||
]
|
||||
)
|
||||
|
||||
-dnl enable GC debugging by default.
|
||||
-dnl
|
||||
-dnl If --enable is not supplied explicitly on the command line, then we need
|
||||
-dnl to export the option variable so that the subordinate configure down in the
|
||||
-dnl gc6.1/ subdir will pick it up anyway.
|
||||
-
|
||||
AC_ARG_ENABLE(full-debug,
|
||||
- [ --enable-full-debug include full support for pointer backtracing etc
|
||||
- (implies --enable-gc-debug).],
|
||||
+ [ --enable-full-debug include full support for pointer backtracing etc],
|
||||
[
|
||||
enable_full_debug="yes"
|
||||
if test "x$enableval" = "xno"; then
|
||||
@@ -119,25 +110,6 @@ AC_ARG_ENABLE(full-debug,
|
||||
fi
|
||||
]
|
||||
)
|
||||
-
|
||||
-AC_ARG_ENABLE(gc-debug,
|
||||
- [ --enable-gc-debug enable debugging garbage collector.],
|
||||
- [
|
||||
- gc_debug="yes"
|
||||
- if test "x$enableval" = "xno"; then
|
||||
- gc_debug=$enableval
|
||||
- fi
|
||||
- ]
|
||||
-)
|
||||
-
|
||||
-case "$enable_full_debug" in "yes")
|
||||
- gc_debug="yes"
|
||||
- AC_DEFINE(GC_FULL_DEBUG)
|
||||
-esac
|
||||
-
|
||||
-case "$gc_debug" in "yes")
|
||||
- AC_DEFINE(GC_DEBUG)
|
||||
-esac
|
||||
|
||||
dnl Set the inline keyword appropriately for the platform
|
||||
AC_C_INLINE
|
123
devel/opencm/patches.nogc/patch-base_libgdiff_analyze_c
Normal file
123
devel/opencm/patches.nogc/patch-base_libgdiff_analyze_c
Normal file
@ -0,0 +1,123 @@
|
||||
$OpenBSD: patch-base_libgdiff_analyze_c,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/libgdiff/analyze.c.orig Sat Mar 29 16:15:27 2003
|
||||
+++ base/libgdiff/analyze.c Thu May 22 17:46:39 2003
|
||||
@@ -411,7 +411,7 @@ discard_confusing_lines (filevec)
|
||||
int *p;
|
||||
|
||||
/* Allocate our results. */
|
||||
- p = (int *) GC_MALLOC ((filevec[0].buffered_lines + filevec[1].buffered_lines)
|
||||
+ p = (int *) malloc ((filevec[0].buffered_lines + filevec[1].buffered_lines)
|
||||
* (2 * sizeof (int)));
|
||||
for (f = 0; f < 2; f++)
|
||||
{
|
||||
@@ -422,7 +422,7 @@ discard_confusing_lines (filevec)
|
||||
/* Set up equiv_count[F][I] as the number of lines in file F
|
||||
that fall in equivalence class I. */
|
||||
|
||||
- p = (int *) GC_MALLOC (filevec[0].equiv_max * (2 * sizeof (int)));
|
||||
+ p = (int *) malloc (filevec[0].equiv_max * (2 * sizeof (int)));
|
||||
equiv_count[0] = p;
|
||||
equiv_count[1] = p + filevec[0].equiv_max;
|
||||
bzero (p, filevec[0].equiv_max * (2 * sizeof (int)));
|
||||
@@ -434,7 +434,7 @@ discard_confusing_lines (filevec)
|
||||
|
||||
/* Set up tables of which lines are going to be discarded. */
|
||||
|
||||
- discarded[0] = GC_MALLOC (sizeof (char)
|
||||
+ discarded[0] = malloc (sizeof (char)
|
||||
* (filevec[0].buffered_lines
|
||||
+ filevec[1].buffered_lines));
|
||||
discarded[1] = discarded[0] + filevec[0].buffered_lines;
|
||||
@@ -600,8 +600,8 @@ discard_confusing_lines (filevec)
|
||||
filevec[f].nondiscarded_lines = j;
|
||||
}
|
||||
|
||||
- GC_FREE (discarded[0]);
|
||||
- GC_FREE (equiv_count[0]);
|
||||
+ free (discarded[0]);
|
||||
+ free (equiv_count[0]);
|
||||
}
|
||||
|
||||
/* Adjust inserts/deletes of identical lines to join changes
|
||||
@@ -733,7 +733,7 @@ add_change (line0, line1, deleted, inser
|
||||
int line0, line1, deleted, inserted;
|
||||
struct change *old;
|
||||
{
|
||||
- struct change *new = (struct change *) GC_MALLOC (sizeof (struct change));
|
||||
+ struct change *new = (struct change *) malloc (sizeof (struct change));
|
||||
|
||||
new->line0 = line0;
|
||||
new->line1 = line1;
|
||||
@@ -867,7 +867,7 @@ diff_2_files (filevec, depth)
|
||||
size_t buffer_size = buffer_lcm (STAT_BLOCKSIZE (filevec[0].stat),
|
||||
STAT_BLOCKSIZE (filevec[1].stat));
|
||||
for (i = 0; i < 2; i++)
|
||||
- filevec[i].buffer = GC_REALLOC (filevec[i].buffer, buffer_size);
|
||||
+ filevec[i].buffer = realloc (filevec[i].buffer, buffer_size);
|
||||
|
||||
for (;; filevec[0].buffered_chars = filevec[1].buffered_chars = 0)
|
||||
{
|
||||
@@ -917,7 +917,7 @@ diff_2_files (filevec, depth)
|
||||
Allocate an extra element, always zero, at each end of each vector. */
|
||||
|
||||
size_t s = filevec[0].buffered_lines + filevec[1].buffered_lines + 4;
|
||||
- filevec[0].changed_flag = GC_MALLOC (s);
|
||||
+ filevec[0].changed_flag = malloc (s);
|
||||
bzero (filevec[0].changed_flag, s);
|
||||
filevec[0].changed_flag++;
|
||||
filevec[1].changed_flag = filevec[0].changed_flag
|
||||
@@ -935,7 +935,7 @@ diff_2_files (filevec, depth)
|
||||
xvec = filevec[0].undiscarded;
|
||||
yvec = filevec[1].undiscarded;
|
||||
diags = filevec[0].nondiscarded_lines + filevec[1].nondiscarded_lines + 3;
|
||||
- fdiag = (int *) GC_MALLOC (diags * (2 * sizeof (int)));
|
||||
+ fdiag = (int *) malloc (diags * (2 * sizeof (int)));
|
||||
bdiag = fdiag + diags;
|
||||
fdiag += filevec[1].nondiscarded_lines + 1;
|
||||
bdiag += filevec[1].nondiscarded_lines + 1;
|
||||
@@ -954,7 +954,7 @@ diff_2_files (filevec, depth)
|
||||
compareseq (0, filevec[0].nondiscarded_lines,
|
||||
0, filevec[1].nondiscarded_lines, no_discards);
|
||||
|
||||
- GC_FREE (fdiag - (filevec[1].nondiscarded_lines + 1));
|
||||
+ free (fdiag - (filevec[1].nondiscarded_lines + 1));
|
||||
|
||||
/* Modify the results slightly to make them prettier
|
||||
in cases where that can validly be done. */
|
||||
@@ -1052,20 +1052,20 @@ diff_2_files (filevec, depth)
|
||||
}
|
||||
}
|
||||
|
||||
- GC_FREE (filevec[0].undiscarded);
|
||||
+ free (filevec[0].undiscarded);
|
||||
|
||||
- GC_FREE (filevec[0].changed_flag - 1);
|
||||
+ free (filevec[0].changed_flag - 1);
|
||||
|
||||
for (i = 1; i >= 0; --i)
|
||||
- GC_FREE (filevec[i].equivs);
|
||||
+ free (filevec[i].equivs);
|
||||
|
||||
for (i = 0; i < 2; ++i)
|
||||
- GC_FREE (filevec[i].linbuf + filevec[i].linbuf_base);
|
||||
+ free (filevec[i].linbuf + filevec[i].linbuf_base);
|
||||
|
||||
for (e = script; e; e = p)
|
||||
{
|
||||
p = e->link;
|
||||
- GC_FREE (e);
|
||||
+ free (e);
|
||||
}
|
||||
|
||||
if (! ROBUST_OUTPUT_STYLE (output_style))
|
||||
@@ -1078,8 +1078,8 @@ diff_2_files (filevec, depth)
|
||||
}
|
||||
|
||||
if (filevec[0].buffer != filevec[1].buffer)
|
||||
- GC_FREE (filevec[0].buffer);
|
||||
- GC_FREE (filevec[1].buffer);
|
||||
+ free (filevec[0].buffer);
|
||||
+ free (filevec[1].buffer);
|
||||
|
||||
return changes;
|
||||
}
|
92
devel/opencm/patches.nogc/patch-base_libgdiff_diff3_c
Normal file
92
devel/opencm/patches.nogc/patch-base_libgdiff_diff3_c
Normal file
@ -0,0 +1,92 @@
|
||||
$OpenBSD: patch-base_libgdiff_diff3_c,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/libgdiff/diff3.c.orig Sun Apr 6 16:03:44 2003
|
||||
+++ base/libgdiff/diff3.c Thu May 22 17:46:39 2003
|
||||
@@ -17,11 +17,11 @@
|
||||
/* Librarification by Tim Pierce */
|
||||
|
||||
#include "../config.h"
|
||||
-#include "../gc6.1/include/gc.h"
|
||||
|
||||
#include "system.h"
|
||||
#include <stdio.h>
|
||||
#include <setjmp.h>
|
||||
+#include <stdlib.h>
|
||||
#include "getopt.h"
|
||||
#include "diffrun.h"
|
||||
|
||||
@@ -156,7 +156,7 @@ struct diff3_block {
|
||||
* General memory allocation function.
|
||||
*/
|
||||
#define ALLOCATE(number, type) \
|
||||
- (type *) GC_MALLOC ((number) * sizeof (type))
|
||||
+ (type *) malloc ((number) * sizeof (type))
|
||||
|
||||
/* Options variables for flags set on command line. */
|
||||
|
||||
@@ -474,8 +474,8 @@ diff3_run (argc, argv, out, callbacks_ar
|
||||
conflicts_found = 0;
|
||||
}
|
||||
|
||||
- GC_FREE(content0);
|
||||
- GC_FREE(content1);
|
||||
+ free(content0);
|
||||
+ free(content1);
|
||||
free_diff_blocks(thread0);
|
||||
free_diff_blocks(thread1);
|
||||
free_diff3_blocks(diff3);
|
||||
@@ -1319,7 +1319,7 @@ read_diff (filea, fileb, output_placemen
|
||||
if (fstat (fd, &pipestat) == 0)
|
||||
current_chunk_size = max (current_chunk_size, STAT_BLOCKSIZE (pipestat));
|
||||
|
||||
- diff_result = GC_MALLOC (current_chunk_size);
|
||||
+ diff_result = malloc (current_chunk_size);
|
||||
total = 0;
|
||||
do {
|
||||
bytes = myread (fd,
|
||||
@@ -1334,7 +1334,7 @@ read_diff (filea, fileb, output_placemen
|
||||
current_chunk_size = (size_t) -1;
|
||||
else
|
||||
diff3_fatal ("files are too large to fit into memory");
|
||||
- diff_result = GC_REALLOC (diff_result, (current_chunk_size *= 2));
|
||||
+ diff_result = realloc (diff_result, (current_chunk_size *= 2));
|
||||
}
|
||||
} while (bytes);
|
||||
|
||||
@@ -1889,11 +1889,11 @@ free_diff_blocks(p)
|
||||
while (p)
|
||||
{
|
||||
next = p->next;
|
||||
- if (p->lines[0]) GC_FREE(p->lines[0]);
|
||||
- if (p->lines[1]) GC_FREE(p->lines[1]);
|
||||
- if (p->lengths[0]) GC_FREE(p->lengths[0]);
|
||||
- if (p->lengths[1]) GC_FREE(p->lengths[1]);
|
||||
- GC_FREE(p);
|
||||
+ if (p->lines[0]) free(p->lines[0]);
|
||||
+ if (p->lines[1]) free(p->lines[1]);
|
||||
+ if (p->lengths[0]) free(p->lengths[0]);
|
||||
+ if (p->lengths[1]) free(p->lengths[1]);
|
||||
+ free(p);
|
||||
p = next;
|
||||
}
|
||||
}
|
||||
@@ -1907,13 +1907,13 @@ free_diff3_blocks(p)
|
||||
while (p)
|
||||
{
|
||||
next = p->next;
|
||||
- if (p->lines[0]) GC_FREE(p->lines[0]);
|
||||
- if (p->lines[1]) GC_FREE(p->lines[1]);
|
||||
- if (p->lines[2]) GC_FREE(p->lines[2]);
|
||||
- if (p->lengths[0]) GC_FREE(p->lengths[0]);
|
||||
- if (p->lengths[1]) GC_FREE(p->lengths[1]);
|
||||
- if (p->lengths[2]) GC_FREE(p->lengths[2]);
|
||||
- GC_FREE(p);
|
||||
+ if (p->lines[0]) free(p->lines[0]);
|
||||
+ if (p->lines[1]) free(p->lines[1]);
|
||||
+ if (p->lines[2]) free(p->lines[2]);
|
||||
+ if (p->lengths[0]) free(p->lengths[0]);
|
||||
+ if (p->lengths[1]) free(p->lengths[1]);
|
||||
+ if (p->lengths[2]) free(p->lengths[2]);
|
||||
+ free(p);
|
||||
p = next;
|
||||
}
|
||||
}
|
65
devel/opencm/patches.nogc/patch-base_libgdiff_diff_c
Normal file
65
devel/opencm/patches.nogc/patch-base_libgdiff_diff_c
Normal file
@ -0,0 +1,65 @@
|
||||
$OpenBSD: patch-base_libgdiff_diff_c,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/libgdiff/diff.c.orig Sat Mar 29 16:15:23 2003
|
||||
+++ base/libgdiff/diff.c Thu May 22 17:46:39 2003
|
||||
@@ -85,7 +85,7 @@ option_list (optionvec, count)
|
||||
for (i = 0; i < count; i++)
|
||||
length += strlen (optionvec[i]) + 1;
|
||||
|
||||
- result = GC_MALLOC (length + 1);
|
||||
+ result = malloc (length + 1);
|
||||
result[0] = 0;
|
||||
|
||||
for (i = 0; i < count; i++)
|
||||
@@ -136,8 +136,8 @@ add_exclude (pattern)
|
||||
if (exclude_alloc <= exclude_count)
|
||||
exclude = (char const **)
|
||||
(exclude_alloc == 0
|
||||
- ? GC_MALLOC ((exclude_alloc = 64) * sizeof (*exclude))
|
||||
- : GC_REALLOC (exclude, (exclude_alloc *= 2) * sizeof (*exclude)));
|
||||
+ ? malloc ((exclude_alloc = 64) * sizeof (*exclude))
|
||||
+ : realloc (exclude, (exclude_alloc *= 2) * sizeof (*exclude)));
|
||||
|
||||
exclude[exclude_count++] = pattern;
|
||||
}
|
||||
@@ -338,7 +338,7 @@ diff_run (argc, argv, out, callbacks_arg
|
||||
int i, err = 0;
|
||||
static char const C_ifdef_group_formats[] =
|
||||
"#ifndef %s\n%%<#endif /* not %s */\n%c#ifdef %s\n%%>#endif /* %s */\n%c%%=%c#ifndef %s\n%%<#else /* %s */\n%%>#endif /* %s */\n";
|
||||
- char *b = GC_MALLOC (sizeof (C_ifdef_group_formats)
|
||||
+ char *b = malloc (sizeof (C_ifdef_group_formats)
|
||||
+ 7 * strlen(optarg) - 14 /* 7*"%s" */
|
||||
- 8 /* 5*"%%" + 3*"%c" */);
|
||||
sprintf (b, C_ifdef_group_formats,
|
||||
@@ -701,7 +701,7 @@ diff_run (argc, argv, out, callbacks_arg
|
||||
/* Print any messages that were saved up for last. */
|
||||
print_message_queue ();
|
||||
|
||||
- GC_FREE (switch_string);
|
||||
+ free (switch_string);
|
||||
|
||||
optind = optind_old;
|
||||
|
||||
@@ -725,9 +725,9 @@ add_regexp (reglist, pattern)
|
||||
struct regexp_list *r;
|
||||
char const *m;
|
||||
|
||||
- r = (struct regexp_list *) GC_MALLOC (sizeof (*r));
|
||||
+ r = (struct regexp_list *) malloc (sizeof (*r));
|
||||
bzero (r, sizeof (*r));
|
||||
- r->buf.fastmap = GC_MALLOC (256);
|
||||
+ r->buf.fastmap = malloc (256);
|
||||
m = re_compile_pattern (pattern, strlen (pattern), &r->buf);
|
||||
if (m != 0)
|
||||
diff_error ("%s: %s", pattern, m);
|
||||
@@ -1195,9 +1195,9 @@ compare_files (dir0, name0, dir1, name1,
|
||||
flush_output ();
|
||||
|
||||
if (free0)
|
||||
- GC_FREE (free0);
|
||||
+ free (free0);
|
||||
if (free1)
|
||||
- GC_FREE (free1);
|
||||
+ free (free1);
|
||||
|
||||
return val;
|
||||
}
|
16
devel/opencm/patches.nogc/patch-base_libgdiff_diff_h
Normal file
16
devel/opencm/patches.nogc/patch-base_libgdiff_diff_h
Normal file
@ -0,0 +1,16 @@
|
||||
$OpenBSD: patch-base_libgdiff_diff_h,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/libgdiff/diff.h.orig Sun Apr 6 16:03:44 2003
|
||||
+++ base/libgdiff/diff.h Thu May 22 17:46:39 2003
|
||||
@@ -16,11 +16,11 @@ GNU General Public License for more deta
|
||||
*/
|
||||
|
||||
#include "../config.h"
|
||||
-#include "../gc6.1/include/gc.h"
|
||||
|
||||
#include "system.h"
|
||||
#include <stdio.h>
|
||||
#include <setjmp.h>
|
||||
+#include <stdlib.h>
|
||||
#include "regex.h"
|
||||
#include "diffrun.h"
|
||||
|
42
devel/opencm/patches.nogc/patch-base_libgdiff_dir_c
Normal file
42
devel/opencm/patches.nogc/patch-base_libgdiff_dir_c
Normal file
@ -0,0 +1,42 @@
|
||||
$OpenBSD: patch-base_libgdiff_dir_c,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/libgdiff/dir.c.orig Sat Mar 29 16:15:26 2003
|
||||
+++ base/libgdiff/dir.c Thu May 22 17:46:40 2003
|
||||
@@ -69,7 +69,7 @@ dir_sort (dir, dirdata)
|
||||
|
||||
data_alloc = max (1, (size_t) dir->stat.st_size);
|
||||
data_used = 0;
|
||||
- dirdata->data = data = GC_MALLOC (data_alloc);
|
||||
+ dirdata->data = data = malloc (data_alloc);
|
||||
|
||||
/* Read the directory entries, and insert the subfiles
|
||||
into the `data' table. */
|
||||
@@ -88,7 +88,7 @@ dir_sort (dir, dirdata)
|
||||
continue;
|
||||
|
||||
while (data_alloc < data_used + d_size)
|
||||
- dirdata->data = data = GC_REALLOC (data, data_alloc *= 2);
|
||||
+ dirdata->data = data = realloc (data, data_alloc *= 2);
|
||||
memcpy (data + data_used, d_name, d_size);
|
||||
data_used += d_size;
|
||||
nnames++;
|
||||
@@ -109,7 +109,7 @@ dir_sort (dir, dirdata)
|
||||
}
|
||||
|
||||
/* Create the `names' table from the `data' table. */
|
||||
- dirdata->names = names = (char const **) GC_MALLOC (sizeof (char *)
|
||||
+ dirdata->names = names = (char const **) malloc (sizeof (char *)
|
||||
* (nnames + 1));
|
||||
for (i = 0; i < nnames; i++)
|
||||
{
|
||||
@@ -209,9 +209,9 @@ diff_dirs (filevec, handle_file, depth)
|
||||
for (i = 0; i < 2; i++)
|
||||
{
|
||||
if (dirdata[i].names)
|
||||
- GC_FREE (dirdata[i].names);
|
||||
+ free (dirdata[i].names);
|
||||
if (dirdata[i].data)
|
||||
- GC_FREE (dirdata[i].data);
|
||||
+ free (dirdata[i].data);
|
||||
}
|
||||
|
||||
return val;
|
139
devel/opencm/patches.nogc/patch-base_libgdiff_io_c
Normal file
139
devel/opencm/patches.nogc/patch-base_libgdiff_io_c
Normal file
@ -0,0 +1,139 @@
|
||||
$OpenBSD: patch-base_libgdiff_io_c,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/libgdiff/io.c.orig Sat Mar 29 16:15:20 2003
|
||||
+++ base/libgdiff/io.c Thu May 22 17:46:40 2003
|
||||
@@ -88,12 +88,12 @@ sip (current, skip_test)
|
||||
{
|
||||
/* Leave room for a sentinel. */
|
||||
current->bufsize = sizeof (word);
|
||||
- current->buffer = GC_MALLOC (current->bufsize);
|
||||
+ current->buffer = malloc (current->bufsize);
|
||||
}
|
||||
else
|
||||
{
|
||||
current->bufsize = STAT_BLOCKSIZE (current->stat);
|
||||
- current->buffer = GC_MALLOC (current->bufsize);
|
||||
+ current->buffer = malloc (current->bufsize);
|
||||
|
||||
if (! skip_test)
|
||||
{
|
||||
@@ -143,7 +143,7 @@ slurp (current)
|
||||
if (current->bufsize < cc)
|
||||
{
|
||||
current->bufsize = cc;
|
||||
- current->buffer = GC_REALLOC (current->buffer, cc);
|
||||
+ current->buffer = realloc (current->buffer, cc);
|
||||
}
|
||||
|
||||
if (current->buffered_chars < current->stat.st_size)
|
||||
@@ -164,7 +164,7 @@ slurp (current)
|
||||
if (current->buffered_chars == current->bufsize)
|
||||
{
|
||||
current->bufsize = current->bufsize * 2;
|
||||
- current->buffer = GC_REALLOC (current->buffer, current->bufsize);
|
||||
+ current->buffer = realloc (current->buffer, current->bufsize);
|
||||
}
|
||||
cc = read (current->desc,
|
||||
current->buffer + current->buffered_chars,
|
||||
@@ -177,7 +177,7 @@ slurp (current)
|
||||
}
|
||||
/* Allocate just enough room for appended newline and sentinel. */
|
||||
current->bufsize = current->buffered_chars + 1 + sizeof (word);
|
||||
- current->buffer = GC_REALLOC (current->buffer, current->bufsize);
|
||||
+ current->buffer = realloc (current->buffer, current->bufsize);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -199,7 +199,7 @@ find_and_hash_each_line (current)
|
||||
int alloc_lines = current->alloc_lines;
|
||||
int line = 0;
|
||||
int linbuf_base = current->linbuf_base;
|
||||
- int *cureqs = (int *) GC_MALLOC (alloc_lines * sizeof (int));
|
||||
+ int *cureqs = (int *) malloc (alloc_lines * sizeof (int));
|
||||
struct equivclass *eqs = equivs;
|
||||
int eqs_index = equivs_index;
|
||||
int eqs_alloc = equivs_alloc;
|
||||
@@ -302,7 +302,7 @@ find_and_hash_each_line (current)
|
||||
i = eqs_index++;
|
||||
if (i == eqs_alloc)
|
||||
eqs = (struct equivclass *)
|
||||
- GC_REALLOC (eqs, (eqs_alloc*=2) * sizeof(*eqs));
|
||||
+ realloc (eqs, (eqs_alloc*=2) * sizeof(*eqs));
|
||||
eqs[i].next = *bucket;
|
||||
eqs[i].hash = h;
|
||||
eqs[i].line = ip;
|
||||
@@ -330,8 +330,8 @@ find_and_hash_each_line (current)
|
||||
{
|
||||
/* Double (alloc_lines - linbuf_base) by adding to alloc_lines. */
|
||||
alloc_lines = 2 * alloc_lines - linbuf_base;
|
||||
- cureqs = (int *) GC_REALLOC (cureqs, alloc_lines * sizeof (*cureqs));
|
||||
- linbuf = (char const **) GC_REALLOC (linbuf + linbuf_base,
|
||||
+ cureqs = (int *) realloc (cureqs, alloc_lines * sizeof (*cureqs));
|
||||
+ linbuf = (char const **) realloc (linbuf + linbuf_base,
|
||||
(alloc_lines - linbuf_base)
|
||||
* sizeof (*linbuf))
|
||||
- linbuf_base;
|
||||
@@ -352,7 +352,7 @@ find_and_hash_each_line (current)
|
||||
{
|
||||
/* Double (alloc_lines - linbuf_base) by adding to alloc_lines. */
|
||||
alloc_lines = 2 * alloc_lines - linbuf_base;
|
||||
- linbuf = (char const **) GC_REALLOC (linbuf + linbuf_base,
|
||||
+ linbuf = (char const **) realloc (linbuf + linbuf_base,
|
||||
(alloc_lines - linbuf_base)
|
||||
* sizeof (*linbuf))
|
||||
- linbuf_base;
|
||||
@@ -566,7 +566,7 @@ find_identical_ends (filevec)
|
||||
}
|
||||
|
||||
lines = 0;
|
||||
- linbuf0 = (char const **) GC_MALLOC (alloc_lines0 * sizeof (*linbuf0));
|
||||
+ linbuf0 = (char const **) malloc (alloc_lines0 * sizeof (*linbuf0));
|
||||
|
||||
/* If the prefix is needed, find the prefix lines. */
|
||||
if (! (no_diff_means_no_output
|
||||
@@ -579,7 +579,7 @@ find_identical_ends (filevec)
|
||||
{
|
||||
int l = lines++ & prefix_mask;
|
||||
if (l == alloc_lines0)
|
||||
- linbuf0 = (char const **) GC_REALLOC (linbuf0, (alloc_lines0 *= 2)
|
||||
+ linbuf0 = (char const **) realloc (linbuf0, (alloc_lines0 *= 2)
|
||||
* sizeof(*linbuf0));
|
||||
linbuf0[l] = p0;
|
||||
while (*p0++ != '\n')
|
||||
@@ -595,7 +595,7 @@ find_identical_ends (filevec)
|
||||
= (buffered_prefix
|
||||
+ GUESS_LINES (lines, filevec[1].prefix_end - buffer1, tem)
|
||||
+ context);
|
||||
- linbuf1 = (char const **) GC_MALLOC (alloc_lines1 * sizeof (*linbuf1));
|
||||
+ linbuf1 = (char const **) malloc (alloc_lines1 * sizeof (*linbuf1));
|
||||
|
||||
if (buffered_prefix != lines)
|
||||
{
|
||||
@@ -687,7 +687,7 @@ read_files (filevec, pretend_binary)
|
||||
find_identical_ends (filevec);
|
||||
|
||||
equivs_alloc = filevec[0].alloc_lines + filevec[1].alloc_lines + 1;
|
||||
- equivs = (struct equivclass *) GC_MALLOC (equivs_alloc * sizeof (struct equivclass));
|
||||
+ equivs = (struct equivclass *) malloc (equivs_alloc * sizeof (struct equivclass));
|
||||
/* Equivalence class 0 is permanently safe for lines that were not
|
||||
hashed. Real equivalence classes start at 1. */
|
||||
equivs_index = 1;
|
||||
@@ -697,7 +697,7 @@ read_files (filevec, pretend_binary)
|
||||
abort ();
|
||||
nbuckets = primes[i];
|
||||
|
||||
- buckets = (int *) GC_MALLOC ((nbuckets + 1) * sizeof (*buckets));
|
||||
+ buckets = (int *) malloc ((nbuckets + 1) * sizeof (*buckets));
|
||||
bzero (buckets++, (nbuckets + 1) * sizeof (*buckets));
|
||||
|
||||
for (i = 0; i < 2; i++)
|
||||
@@ -705,8 +705,8 @@ read_files (filevec, pretend_binary)
|
||||
|
||||
filevec[0].equiv_max = filevec[1].equiv_max = equivs_index;
|
||||
|
||||
- GC_FREE (equivs);
|
||||
- GC_FREE (buckets - 1);
|
||||
+ free (equivs);
|
||||
+ free (buckets - 1);
|
||||
|
||||
return 0;
|
||||
}
|
57
devel/opencm/patches.nogc/patch-base_libgdiff_util_c
Normal file
57
devel/opencm/patches.nogc/patch-base_libgdiff_util_c
Normal file
@ -0,0 +1,57 @@
|
||||
$OpenBSD: patch-base_libgdiff_util_c,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/libgdiff/util.c.orig Sat Mar 29 16:15:27 2003
|
||||
+++ base/libgdiff/util.c Thu May 22 17:46:40 2003
|
||||
@@ -130,7 +130,7 @@ message5 (format, arg1, arg2, arg3, arg4
|
||||
{
|
||||
if (paginate_flag)
|
||||
{
|
||||
- struct msg *new = (struct msg *) GC_MALLOC (sizeof (struct msg));
|
||||
+ struct msg *new = (struct msg *) malloc (sizeof (struct msg));
|
||||
new->format = format;
|
||||
new->arg1 = concat (arg1, "", "");
|
||||
new->arg2 = concat (arg2, "", "");
|
||||
@@ -196,7 +196,7 @@ begin_output ()
|
||||
output_in_progress = 1;
|
||||
|
||||
/* Construct the header of this piece of diff. */
|
||||
- name = GC_MALLOC (strlen (current_name0) + strlen (current_name1)
|
||||
+ name = malloc (strlen (current_name0) + strlen (current_name1)
|
||||
+ strlen (switch_string) + 7);
|
||||
/* Posix.2 section 4.17.6.1.1 specifies this format. But there is a
|
||||
bug in the first printing (IEEE Std 1003.2-1992 p 251 l 3304):
|
||||
@@ -246,7 +246,7 @@ begin_output ()
|
||||
pfatal_with_name ("fdopen");
|
||||
}
|
||||
# else /* ! HAVE_FORK */
|
||||
- char *command = GC_MALLOC (4 * strlen (name) + strlen (PR_PROGRAM) + 10);
|
||||
+ char *command = malloc (4 * strlen (name) + strlen (PR_PROGRAM) + 10);
|
||||
char *p;
|
||||
char const *a = name;
|
||||
sprintf (command, "%s -f -h ", PR_PROGRAM);
|
||||
@@ -256,7 +256,7 @@ begin_output ()
|
||||
outfile = popen (command, "w");
|
||||
if (!outfile)
|
||||
pfatal_with_name (command);
|
||||
- GC_FREE (command);
|
||||
+ free (command);
|
||||
# endif /* ! HAVE_FORK */
|
||||
#else
|
||||
fatal ("This port does not support the --paginate option to diff.");
|
||||
@@ -273,7 +273,7 @@ begin_output ()
|
||||
printf_output ("%s\n", name);
|
||||
}
|
||||
|
||||
- GC_FREE (name);
|
||||
+ free (name);
|
||||
|
||||
/* A special header is needed at the beginning of context output. */
|
||||
switch (output_style)
|
||||
@@ -819,7 +819,7 @@ concat (s1, s2, s3)
|
||||
char const *s1, *s2, *s3;
|
||||
{
|
||||
size_t len = strlen (s1) + strlen (s2) + strlen (s3);
|
||||
- char *new = GC_MALLOC (len + 1);
|
||||
+ char *new = malloc (len + 1);
|
||||
sprintf (new, "%s%s%s", s1, s2, s3);
|
||||
return new;
|
||||
}
|
38
devel/opencm/patches.nogc/patch-base_src_Makefile_in
Normal file
38
devel/opencm/patches.nogc/patch-base_src_Makefile_in
Normal file
@ -0,0 +1,38 @@
|
||||
$OpenBSD: patch-base_src_Makefile_in,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/src/Makefile.in.orig Tue Apr 22 08:59:16 2003
|
||||
+++ base/src/Makefile.in Thu May 22 17:46:40 2003
|
||||
@@ -62,11 +62,11 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
|
||||
DEFS = @DEFS@
|
||||
LIBS = @LIBS@
|
||||
-CMLIBS += @SSL_LIBS@ @KRB5_LIBS@
|
||||
+CMLIBS += @SSL_LIBS@
|
||||
|
||||
CFLAGS = @CFLAGS@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
-CMLDFLAGS = @SSL_LDFLAGS@ @KRB5_LDFLAGS@
|
||||
+CMLDFLAGS = @SSL_LDFLAGS@
|
||||
|
||||
MAKEINFO = makeinfo
|
||||
TEXI2DVI = texi2dvi
|
||||
@@ -110,8 +110,7 @@ CMINCLUDE=@KRB5_INC@ @SSL_INC@
|
||||
# COMREADLINE=-DUSE_READLINE -I/usr/include/readline
|
||||
SESSIONTIMEOUT=-DCLIENT_TIMEOUT=1800
|
||||
LIBDIFF=$(TOPDIR)/../libgdiff/libgdiff.a
|
||||
-LIBZ=$(TOPDIR)/../zlib/libz.a
|
||||
-LIBGC=$(TOPDIR)/../gc6.1/.libs/libgc.a
|
||||
+LIBZ=-lz
|
||||
|
||||
XCFLAGS = -Wmissing-prototypes -Wall -Wreturn-type -DDATADIR=\"$(datadir)\"
|
||||
# XCFLAGS += -Wno-unused -Werror
|
||||
@@ -242,8 +241,8 @@ distclean: clean nodepend
|
||||
nodepend:
|
||||
find $(TOPDIR) -name '*.m' -exec rm {} \;
|
||||
|
||||
-$(OPENCM): $(OBJECTS) $(LIBDIFF) $(LIBZ) $(LIBGC)
|
||||
- $(CC) -o $(OPENCM) $(CFLAGS) $(OBJECTS) $(LDFLAGS) $(CMLDFLAGS) $(LIBDIFF) $(LIBZ) $(LIBGC) $(LIBS) $(CMLIBS)
|
||||
+$(OPENCM): $(OBJECTS) $(LIBDIFF) $(LIBZ)
|
||||
+ $(CC) -o $(OPENCM) $(CFLAGS) $(OBJECTS) $(LDFLAGS) $(CMLDFLAGS) $(LIBDIFF) $(LIBZ) $(LIBS) $(CMLIBS)
|
||||
|
||||
# Whenever we rebuild a .o file, we also need to rebuild the .m file:
|
||||
%.o: %.c
|
48
devel/opencm/patches.nogc/patch-base_src_client_FilterSet_c
Normal file
48
devel/opencm/patches.nogc/patch-base_src_client_FilterSet_c
Normal file
@ -0,0 +1,48 @@
|
||||
$OpenBSD: patch-base_src_client_FilterSet_c,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/src/client/FilterSet.c.orig Sat Mar 29 16:15:28 2003
|
||||
+++ base/src/client/FilterSet.c Thu May 22 17:46:40 2003
|
||||
@@ -68,7 +68,7 @@ FilterSet *GlobalFilters;
|
||||
void
|
||||
filterset_append(FilterSet *fs, Filter *f)
|
||||
{
|
||||
- fs->filters = (Filter **) GC_REALLOC(fs->filters,
|
||||
+ fs->filters = (Filter **) realloc(fs->filters,
|
||||
(fs->size + 1) * sizeof(Filter *));
|
||||
fs->filters[fs->size] = f;
|
||||
fs->size++;
|
||||
@@ -79,7 +79,7 @@ filterset_init(void)
|
||||
{
|
||||
Filter *list = global_filter_list;
|
||||
|
||||
- GlobalFilters = (FilterSet *) GC_MALLOC(sizeof(FilterSet));
|
||||
+ GlobalFilters = (FilterSet *) malloc(sizeof(FilterSet));
|
||||
GlobalFilters->filters = 0;
|
||||
GlobalFilters->size = 0;
|
||||
|
||||
@@ -111,7 +111,7 @@ filterset_LoadFrom(const char *dir)
|
||||
const char *filtfile;
|
||||
FILE *f = NULL;
|
||||
|
||||
- FilterSet *fs = (FilterSet *) GC_MALLOC(sizeof(FilterSet));
|
||||
+ FilterSet *fs = (FilterSet *) malloc(sizeof(FilterSet));
|
||||
fs->filters = 0;
|
||||
fs->size = 0;
|
||||
|
||||
@@ -126,7 +126,7 @@ filterset_LoadFrom(const char *dir)
|
||||
unsigned len = path_file_length(filtfile); /* upper bound if text */
|
||||
|
||||
/* buffer is used to hold file data, so use _ATOMIC */
|
||||
- char *buffer = (char *) GC_MALLOC_ATOMIC(len);
|
||||
+ char *buffer = (char *) malloc(len);
|
||||
char *bufend;
|
||||
char *bufp;
|
||||
Filter *filt;
|
||||
@@ -169,7 +169,7 @@ filterset_LoadFrom(const char *dir)
|
||||
|
||||
len = bufp - start;
|
||||
|
||||
- filt = (Filter *) GC_MALLOC(sizeof(Filter));
|
||||
+ filt = (Filter *) malloc(sizeof(Filter));
|
||||
filt->exclude = exclude;
|
||||
filt->pattern = xstrndup(start, len);
|
||||
|
21
devel/opencm/patches.nogc/patch-base_src_client_KeyGen_c
Normal file
21
devel/opencm/patches.nogc/patch-base_src_client_KeyGen_c
Normal file
@ -0,0 +1,21 @@
|
||||
$OpenBSD: patch-base_src_client_KeyGen_c,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/src/client/KeyGen.c.orig Wed Jan 1 01:53:19 2003
|
||||
+++ base/src/client/KeyGen.c Thu May 22 17:46:40 2003
|
||||
@@ -69,6 +69,7 @@ void Generate_X509_Key(const char* keyfi
|
||||
OC_bool encrypt_key, uint32_t days)
|
||||
{
|
||||
SubProcess *proc = subprocess_create();
|
||||
+ char *daystr = xunsigned_str(days);
|
||||
|
||||
subprocess_AddArg(proc, "openssl");
|
||||
subprocess_AddArg(proc, "req");
|
||||
@@ -79,7 +80,8 @@ void Generate_X509_Key(const char* keyfi
|
||||
subprocess_AddArg(proc, "-newkey");
|
||||
subprocess_AddArg(proc, opt_KeyType ? opt_KeyType : "rsa:1024");
|
||||
subprocess_AddArg(proc, "-days");
|
||||
- subprocess_AddArg(proc, xunsigned_str(days));
|
||||
+ subprocess_AddArg(proc, daystr);
|
||||
+ free(daystr);
|
||||
subprocess_AddArg(proc, "-x509");
|
||||
|
||||
/* -nodes means to not encrypt the secret key. Why -nodes? That option name
|
25
devel/opencm/patches.nogc/patch-base_src_client_Merge_c
Normal file
25
devel/opencm/patches.nogc/patch-base_src_client_Merge_c
Normal file
@ -0,0 +1,25 @@
|
||||
$OpenBSD: patch-base_src_client_Merge_c,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/src/client/Merge.c.orig Sat Mar 29 16:15:24 2003
|
||||
+++ base/src/client/Merge.c Thu May 22 17:46:41 2003
|
||||
@@ -554,7 +554,7 @@ mergetuple_create()
|
||||
|
||||
static unsigned mergeCount = 0;
|
||||
|
||||
- MergeTuple *tup = (MergeTuple *) GC_MALLOC(sizeof(MergeTuple));
|
||||
+ MergeTuple *tup = (MergeTuple *) malloc(sizeof(MergeTuple));
|
||||
|
||||
tup->ndx = mergeCount++;
|
||||
|
||||
@@ -719,9 +719,9 @@ build_merge_plan(PendingChange *pc, Repo
|
||||
&& rbtree_isEmpty(mergeEnts))
|
||||
{
|
||||
MergeTuple *tup = mergetuple_create();
|
||||
- tup->common = 0;
|
||||
- tup->ws = 0;
|
||||
- tup->merge = 0;
|
||||
+ tup->common = NULL;
|
||||
+ tup->ws = NULL;
|
||||
+ tup->merge = NULL;
|
||||
|
||||
if (!rbtree_isEmpty(commonEnts)) {
|
||||
rbnode *ceNode = commonEnts->root;
|
@ -0,0 +1,35 @@
|
||||
$OpenBSD: patch-base_src_client_PendingChange_c,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/src/client/PendingChange.c.orig Sat Mar 29 16:15:21 2003
|
||||
+++ base/src/client/PendingChange.c Thu May 22 17:46:42 2003
|
||||
@@ -55,7 +55,7 @@ pendingchange_create(Repository *r,
|
||||
Revision *rev;
|
||||
Change *chg;
|
||||
PendingChange *pc =
|
||||
- (PendingChange *) GC_MALLOC(sizeof(PendingChange));
|
||||
+ (PendingChange *) malloc(sizeof(PendingChange));
|
||||
|
||||
ser_init(pc, &PendingChange_SerType, PendingChange_SerType.ver);
|
||||
SER_MODIFIED(pc);
|
||||
@@ -328,10 +328,12 @@ pendingchange_show(const void *ob)
|
||||
{
|
||||
unsigned u;
|
||||
const PendingChange *pc = ob;
|
||||
+ char *nRev = xunsigned64_str(pc->nRevisions);
|
||||
|
||||
report(0, "Creator: %s\n", pc->creator);
|
||||
report(0, "Derived from: %s/%s\n",
|
||||
- pc->branchURI, xunsigned64_str(pc->nRevisions));
|
||||
+ pc->branchURI, nRev);
|
||||
+ free(nRev);
|
||||
report(0, "FilterSet: %s\n",
|
||||
pc->filterSet ? buffer_asString(pc->filterSet) : "<none>");
|
||||
report(0, "FilterSetName: %s\n", pc->filterSetName);
|
||||
@@ -370,7 +372,7 @@ void *
|
||||
pendingchange_deserialize(const DeserializeInfo *di, SDR_stream *strm)
|
||||
{
|
||||
PendingChange *pc = (PendingChange *)
|
||||
- GC_MALLOC(sizeof(PendingChange));
|
||||
+ malloc(sizeof(PendingChange));
|
||||
|
||||
ser_init(pc, &PendingChange_SerType, di->ver);
|
||||
SER_MODIFIED(pc);
|
149
devel/opencm/patches.nogc/patch-base_src_client_Resolver_c
Normal file
149
devel/opencm/patches.nogc/patch-base_src_client_Resolver_c
Normal file
@ -0,0 +1,149 @@
|
||||
$OpenBSD: patch-base_src_client_Resolver_c,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/src/client/Resolver.c.orig Sat Mar 29 16:15:28 2003
|
||||
+++ base/src/client/Resolver.c Thu May 22 17:46:42 2003
|
||||
@@ -66,7 +66,7 @@ resolve(Repository *repos, const char *a
|
||||
OC_bool progress;
|
||||
OC_bool no_matches = TRUE; /* until proven otherwise */
|
||||
|
||||
- r = (Resolution *)GC_MALLOC(sizeof(Resolution));
|
||||
+ r = (Resolution *)malloc(sizeof(Resolution));
|
||||
r->rest = xstrdup(arg);
|
||||
|
||||
log_trace(DBG_RESOLVER, "ARG is: %s\n", arg);
|
||||
@@ -162,10 +162,10 @@ resolve(Repository *repos, const char *a
|
||||
progress = FALSE;
|
||||
|
||||
for (u = 0; u < vec_size(vec); u++) {
|
||||
- const char *fragment;
|
||||
+ char *fragment;
|
||||
|
||||
r = vec_fetch(vec, u, Resolution *);
|
||||
- fragment = r->rest;
|
||||
+ fragment = (char *)r->rest;
|
||||
|
||||
if (fragment == 0 || r->tail == 0) {
|
||||
/* This one is done. */
|
||||
@@ -173,10 +173,12 @@ resolve(Repository *repos, const char *a
|
||||
no_matches = FALSE;
|
||||
continue;
|
||||
}
|
||||
+ fragment = xstrdup(r->rest);
|
||||
|
||||
pos = strchr(r->rest, '/');
|
||||
|
||||
if (pos) {
|
||||
+ free(fragment);
|
||||
fragment = xstrndup(r->rest, pos - r->rest);
|
||||
while (*pos == '/')
|
||||
pos++;
|
||||
@@ -211,6 +213,7 @@ resolve(Repository *repos, const char *a
|
||||
else if (nmequal(fragment, "top")) {
|
||||
first = last = r->m->nRevisions - 1;
|
||||
/* hack alert */
|
||||
+ free(fragment);
|
||||
fragment = xunsigned64_str(first);
|
||||
}
|
||||
|
||||
@@ -219,11 +222,13 @@ resolve(Repository *repos, const char *a
|
||||
DEFAULT(AnyException) {
|
||||
}
|
||||
END_CATCH;
|
||||
- if (revs == NULL)
|
||||
+ if (revs == NULL) {
|
||||
+ free(fragment);
|
||||
continue;
|
||||
+ }
|
||||
|
||||
for (w = 0; w < vec_size(revs); w++) {
|
||||
- const char *revno;
|
||||
+ char *revno;
|
||||
Resolution *nr;
|
||||
|
||||
rev = vec_fetch(revs, w, Revision *);
|
||||
@@ -233,10 +238,12 @@ resolve(Repository *repos, const char *a
|
||||
|
||||
revno = xunsigned64_str(rev->seq_number);
|
||||
|
||||
- if (!glob_match(revno, fragment, 0))
|
||||
+ if (!glob_match(revno, fragment, 0)) {
|
||||
+ free(revno);
|
||||
continue;
|
||||
+ }
|
||||
|
||||
- nr = (Resolution *)GC_MALLOC(sizeof(Resolution));
|
||||
+ nr = (Resolution *)malloc(sizeof(Resolution));
|
||||
|
||||
nr->fullPath = path_join(r->fullPath, revno);
|
||||
nr->fp_frag = revno;
|
||||
@@ -251,6 +258,7 @@ resolve(Repository *repos, const char *a
|
||||
progress = TRUE;
|
||||
|
||||
no_matches = FALSE;
|
||||
+ free(revno);
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -295,6 +303,7 @@ resolve(Repository *repos, const char *a
|
||||
DEFAULT(AnyException) {
|
||||
}
|
||||
END_CATCH;
|
||||
+ free(fragment);
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -362,8 +371,7 @@ resolve(Repository *repos, const char *a
|
||||
with entities immediately, handle directories in a
|
||||
second pass. */
|
||||
if (*rest == 0) {
|
||||
- Resolution *nr =
|
||||
- (Resolution *)GC_MALLOC(sizeof(Resolution));
|
||||
+ Resolution *nr = (Resolution *)malloc(sizeof(Resolution));
|
||||
const char *newPath = path_join(r->fullPath, path_tail(match));
|
||||
|
||||
log_trace(DBG_RESOLVER, "New ent path is %s\n", newPath);
|
||||
@@ -398,8 +406,7 @@ resolve(Repository *repos, const char *a
|
||||
last = vec_fetch(dirlist, i, const char *);
|
||||
|
||||
{
|
||||
- Resolution *nr =
|
||||
- (Resolution *)GC_MALLOC(sizeof(Resolution));
|
||||
+ Resolution *nr = (Resolution *)malloc(sizeof(Resolution));
|
||||
const char *newPath;
|
||||
|
||||
newPath = last;
|
||||
@@ -452,7 +459,7 @@ resolve(Repository *repos, const char *a
|
||||
break;
|
||||
}
|
||||
|
||||
- nr = (Resolution *)GC_MALLOC(sizeof(Resolution));
|
||||
+ nr = (Resolution *)malloc(sizeof(Resolution));
|
||||
|
||||
nr->fullPath = path_join(r->fullPath, "home");
|
||||
nr->fp_frag = xstrdup("home");
|
||||
@@ -478,7 +485,7 @@ resolve(Repository *repos, const char *a
|
||||
|
||||
|
||||
if (glob_match(de->key, fragment, 0)) {
|
||||
- Resolution *nr = (Resolution *)GC_MALLOC(sizeof(Resolution));
|
||||
+ Resolution *nr = (Resolution *)malloc(sizeof(Resolution));
|
||||
|
||||
/* FIX: This is SO broken!! */
|
||||
URI *uri = uri_create(de->value);
|
||||
@@ -540,7 +547,7 @@ resolve(Repository *repos, const char *a
|
||||
if (!glob_match(m->name, fragment, 0))
|
||||
continue;
|
||||
|
||||
- nr = (Resolution *)GC_MALLOC(sizeof(Resolution));
|
||||
+ nr = (Resolution *)malloc(sizeof(Resolution));
|
||||
|
||||
nr->fullPath = path_join(r->fullPath, m->name);
|
||||
nr->fp_frag = m->name;
|
||||
@@ -568,7 +575,7 @@ resolve(Repository *repos, const char *a
|
||||
to resurrect the glob match against the mutable name
|
||||
for various reasons.. */
|
||||
if (glob_match(uri, fragment, 0)) {
|
||||
- Resolution *nr = (Resolution *)GC_MALLOC(sizeof(Resolution));
|
||||
+ Resolution *nr = (Resolution *)malloc(sizeof(Resolution));
|
||||
|
||||
nr->fullPath = path_join(r->fullPath, fragment);
|
||||
nr->fp_frag = uri;
|
12
devel/opencm/patches.nogc/patch-base_src_client_WorkSpace_c
Normal file
12
devel/opencm/patches.nogc/patch-base_src_client_WorkSpace_c
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-base_src_client_WorkSpace_c,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/src/client/WorkSpace.c.orig Tue Apr 22 08:59:15 2003
|
||||
+++ base/src/client/WorkSpace.c Thu May 22 17:46:42 2003
|
||||
@@ -193,7 +193,7 @@ ws_Init(struct command *cmd, const char
|
||||
variables.
|
||||
*/
|
||||
|
||||
- WorkSpace *ws = GC_MALLOC(sizeof(WorkSpace));
|
||||
+ WorkSpace *ws = calloc(1, sizeof(WorkSpace));
|
||||
|
||||
/* Eventually we will support layered projects, and it will be
|
||||
possible for rootPath to be non-null. Until then, just barf if
|
39
devel/opencm/patches.nogc/patch-base_src_client_WsEntity_c
Normal file
39
devel/opencm/patches.nogc/patch-base_src_client_WsEntity_c
Normal file
@ -0,0 +1,39 @@
|
||||
$OpenBSD: patch-base_src_client_WsEntity_c,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/src/client/WsEntity.c.orig Sat Mar 29 16:15:24 2003
|
||||
+++ base/src/client/WsEntity.c Thu May 22 17:46:42 2003
|
||||
@@ -172,7 +172,7 @@ wsentity_addFromFile(PendingChange *pc,
|
||||
{
|
||||
portstat_t ps;
|
||||
|
||||
- WsEntity *wse = (WsEntity *) GC_MALLOC(sizeof(WsEntity));
|
||||
+ WsEntity *wse = (WsEntity *) malloc(sizeof(WsEntity));
|
||||
Buffer *content;
|
||||
|
||||
if (eType == '?')
|
||||
@@ -211,7 +211,7 @@ wsentity_addFromFile(PendingChange *pc,
|
||||
WsEntity *
|
||||
wsentity_fromEntity(const Entity *e)
|
||||
{
|
||||
- WsEntity *wse = (WsEntity *) GC_MALLOC(sizeof(WsEntity));
|
||||
+ WsEntity *wse = (WsEntity *) malloc(sizeof(WsEntity));
|
||||
|
||||
ser_init(wse, &WsEntity_SerType, WsEntity_SerType.ver);
|
||||
SER_MODIFIED(wse);
|
||||
@@ -348,7 +348,7 @@ wsentity_serialize(SDR_stream *strm, con
|
||||
void *
|
||||
wsentity_deserialize(const DeserializeInfo *di, SDR_stream *strm)
|
||||
{
|
||||
- WsEntity *wse = (WsEntity *) GC_MALLOC(sizeof(WsEntity));
|
||||
+ WsEntity *wse = (WsEntity *) malloc(sizeof(WsEntity));
|
||||
|
||||
ser_init(wse, &WsEntity_SerType, di->ver);
|
||||
SER_MODIFIED(wse);
|
||||
@@ -605,7 +605,7 @@ wsentity_dodiff(const WsEntity *wse, Rep
|
||||
WsEntity *
|
||||
wsentity_ShallowCopy(const WsEntity *wse)
|
||||
{
|
||||
- WsEntity *new_wse = GC_MALLOC(sizeof(*wse));
|
||||
+ WsEntity *new_wse = malloc(sizeof(*wse));
|
||||
|
||||
memcpy(new_wse, wse, sizeof(*wse));
|
||||
|
215
devel/opencm/patches.nogc/patch-base_src_client_browse_Browse_c
Normal file
215
devel/opencm/patches.nogc/patch-base_src_client_browse_Browse_c
Normal file
@ -0,0 +1,215 @@
|
||||
$OpenBSD: patch-base_src_client_browse_Browse_c,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/src/client/browse/Browse.c.orig Sat Mar 29 16:15:31 2003
|
||||
+++ base/src/client/browse/Browse.c Thu May 22 17:46:42 2003
|
||||
@@ -65,7 +65,7 @@ typedef struct FileEntry {
|
||||
OC_bool isDir;
|
||||
} FileEntry;
|
||||
|
||||
-static const char *
|
||||
+static char *
|
||||
uri_encode(const char *s)
|
||||
{
|
||||
const char *from;
|
||||
@@ -91,7 +91,7 @@ uri_encode(const char *s)
|
||||
|
||||
}
|
||||
|
||||
- out = to = GC_MALLOC_ATOMIC(to_len + 1);
|
||||
+ out = to = malloc(to_len + 1);
|
||||
|
||||
for (from = s; *from; from++) {
|
||||
if ( isalpha(*from) ||
|
||||
@@ -114,14 +114,14 @@ uri_encode(const char *s)
|
||||
return out;
|
||||
}
|
||||
|
||||
-static const char *
|
||||
+static char *
|
||||
uri_decode(const char *from)
|
||||
{
|
||||
size_t len = strlen(from);
|
||||
char *out;
|
||||
char *to;
|
||||
|
||||
- out = to = GC_MALLOC_ATOMIC(len + 1);
|
||||
+ out = to = malloc(len + 1);
|
||||
|
||||
for (; *from; from++) {
|
||||
unsigned value = *from;
|
||||
@@ -183,7 +183,7 @@ cmp_dirname(const void *v1, const void *
|
||||
return strcmp(de1->key, de2->key);
|
||||
}
|
||||
|
||||
-static const char *
|
||||
+static char *
|
||||
xlate_time(const char *tmISO)
|
||||
{
|
||||
char *time = xstrdup(tmISO);
|
||||
@@ -232,7 +232,7 @@ show_files(SDR_stream *out, Repository *
|
||||
glob_match(e->fsName, prefix, GM_FS_COMPONENT);
|
||||
|
||||
if (rest) {
|
||||
- FileEntry * fe = GC_MALLOC(sizeof(FileEntry));
|
||||
+ FileEntry * fe = malloc(sizeof(FileEntry));
|
||||
fe->e = e;
|
||||
fe->name = path_car(rest);
|
||||
fe->isDir = path_cdr(rest) ? 1 : 0;
|
||||
@@ -262,6 +262,8 @@ show_files(SDR_stream *out, Repository *
|
||||
|
||||
if (vec_size(ev) > 0) {
|
||||
const char *last = 0;
|
||||
+ char *xstr;
|
||||
+ char *uri;
|
||||
|
||||
stream_printf(out, "<table>");
|
||||
|
||||
@@ -287,13 +289,20 @@ show_files(SDR_stream *out, Repository *
|
||||
|
||||
fe = vec_fetch(ev,w,const FileEntry*);
|
||||
last = fe->name;
|
||||
+ uri = uri_encode(last);
|
||||
+ if (fe->isDir)
|
||||
+ xstr = xunsigned64_str(fe->e->length);
|
||||
+ else
|
||||
+ xstr = "";
|
||||
|
||||
stream_printf(out, "<tr valign=\"top\">");
|
||||
stream_printf(out, "<td>" "%s" "</td>", fe->isDir ? "[Dir]" : "[File]");
|
||||
stream_printf(out, "<td>" LINK("/opencm/%s/%s", "%s") "</td>",
|
||||
- thisPageURI, uri_encode(last), last);
|
||||
- stream_printf(out, "<td>" "%s" "</td>",
|
||||
- fe->isDir ? "" : xunsigned64_str(fe->e->length));
|
||||
+ thisPageURI, uri, last);
|
||||
+ free(uri);
|
||||
+ stream_printf(out, "<td>" "%s" "</td>", xstr);
|
||||
+ if (fe->isDir)
|
||||
+ free(xstr);
|
||||
stream_printf(out, "<td>" "%c" "</td>",
|
||||
fe->isDir ? ' ' : fe->e->entityType);
|
||||
stream_printf(out, "<td>" "%s" "</td>",
|
||||
@@ -301,6 +310,7 @@ show_files(SDR_stream *out, Repository *
|
||||
stream_printf(out, "<td>" "%s" "</td>", author);
|
||||
|
||||
stream_printf(out, "</tr>");
|
||||
+
|
||||
}
|
||||
|
||||
stream_printf(out, "</table>");
|
||||
@@ -455,6 +465,7 @@ show_html(SDR_stream *out, Repository *r
|
||||
stream_printf(out, "<hr>\n");
|
||||
|
||||
if (vec_size(dir->entries)) {
|
||||
+ char *uri;
|
||||
stream_printf(out, "<table>");
|
||||
|
||||
stream_printf(out, "<tr valign=\"top\">");
|
||||
@@ -492,19 +503,34 @@ show_html(SDR_stream *out, Repository *r
|
||||
(m && (m->flags & MF_FROZEN)) ? "F" : "",
|
||||
(m && (m->flags & MF_NOTRAIL)) ? "N" : "");
|
||||
|
||||
+ uri = uri_encode(de->key);
|
||||
stream_printf(out, "<td>" LINK("/opencm/%s/%s", CONTENT("%s")) "</td>\n",
|
||||
thisPageURI,
|
||||
- uri_encode(de->key), de->key);
|
||||
+ uri, de->key);
|
||||
+ free(uri);
|
||||
+
|
||||
if (s) {
|
||||
- const char *email = u ? pubkey_GetEmail(u->pubKey) : "???";
|
||||
- const char *author = email;
|
||||
- if (u)
|
||||
+ char *email;
|
||||
+ char *author;
|
||||
+ char *xstr;
|
||||
+ if (u) {
|
||||
+ email = pubkey_GetEmail(u->pubKey);
|
||||
author = format(LINK("/opencm/everyone/%s", CONTENT("%s")),
|
||||
email, email);
|
||||
- stream_printf(out, "<td>%s</td>", xunsigned64_str(m->nRevisions));
|
||||
+ } else
|
||||
+ author = email = "???";
|
||||
+ xstr = xunsigned64_str(m->nRevisions);
|
||||
+
|
||||
+ stream_printf(out, "<td>%s</td>", xstr);
|
||||
stream_printf(out, "<td>%s</td>", s->ser_type->tyName);
|
||||
stream_printf(out, "<td>%s</td>", xlate_time(rev->reviseTime));
|
||||
stream_printf(out, "<td>%s</td>", author);
|
||||
+
|
||||
+ free(xstr);
|
||||
+ if(u) {
|
||||
+ free(author);
|
||||
+ free(email);
|
||||
+ }
|
||||
}
|
||||
else {
|
||||
stream_printf(out, "<td colspan='5'><em>inaccessable</em></td>");
|
||||
@@ -550,16 +576,20 @@ show_html(SDR_stream *out, Repository *r
|
||||
|
||||
{
|
||||
const char *name = "<unknown>";
|
||||
+ char *uri;
|
||||
|
||||
if (s && GETTYPE(s) == TY_User)
|
||||
name = pubkey_GetEmail(((User *) s)->pubKey);
|
||||
else if (s && GETTYPE(s) == TY_Group)
|
||||
name = m->name;
|
||||
|
||||
+ uri = uri_encode(name);
|
||||
+
|
||||
stream_printf(out, "<tr valign=\"top\">");
|
||||
|
||||
stream_printf(out, "<td>" LINK("/opencm/%s/%s", "%s") "</td>",
|
||||
- thisPageURI, uri_encode(name), name);
|
||||
+ thisPageURI, uri, name);
|
||||
+ free(uri);
|
||||
|
||||
#if 0
|
||||
stream_printf(out, "<td>" LINK("/opencm/%s", "%s") "</td>", tn, name);
|
||||
@@ -640,7 +670,7 @@ show_html(SDR_stream *out, Repository *r
|
||||
w = vec_size(revs);
|
||||
|
||||
do {
|
||||
- const char *revno;
|
||||
+ char *revno;
|
||||
Revision *rev;
|
||||
User *u = 0;
|
||||
const char *userName = "<unavailable>";
|
||||
@@ -667,6 +697,7 @@ show_html(SDR_stream *out, Repository *r
|
||||
stream_printf(out, "<tr valign=\"top\">");
|
||||
stream_printf(out, "<td>" LINK("/opencm/%s/%s", "%s") "</td>",
|
||||
thisPageURI, revno, revno);
|
||||
+ free(revno);
|
||||
stream_printf(out, "<td>" CONTENT("%s") "</td>", xlate_time(rev->reviseTime));
|
||||
stream_printf(out, "<td>" CONTENT("%s") "</td>",
|
||||
userName);
|
||||
@@ -689,11 +720,13 @@ show_html(SDR_stream *out, Repository *r
|
||||
CommitInfo *ci =
|
||||
(CommitInfo *)repos_GetEntity(repos, res->m->uri,
|
||||
CMGET(chg,commitInfoTrueName));
|
||||
+ char *xstr = xunsigned64_str(ver->rev);
|
||||
|
||||
stream_printf(out, page_header(format("Commit %s", res->fp_frag)));
|
||||
stream_printf(out, BODY);
|
||||
stream_printf(out, "<center>\n");
|
||||
- stream_printf(out, "Commit %s (%s)\n", res->fp_frag, xunsigned64_str(ver->rev));
|
||||
+ stream_printf(out, "Commit %s (%s)\n", res->fp_frag, xstr);
|
||||
+ free(xstr);
|
||||
stream_printf(out, "</center>\n");
|
||||
stream_printf(out, "<hr>\n");
|
||||
|
||||
@@ -717,13 +750,14 @@ show_html(SDR_stream *out, Repository *r
|
||||
(CommitInfo *)repos_GetEntity(repos, res->m->uri,
|
||||
CMGET(chg,commitInfoTrueName));
|
||||
|
||||
- const char *revNo = xunsigned64_str(fsDir->rev);
|
||||
+ char *revNo = xunsigned64_str(fsDir->rev);
|
||||
|
||||
stream_printf(out, page_header(format("Commit %s, %s/",
|
||||
revNo, fsDir->path)));
|
||||
stream_printf(out, BODY);
|
||||
stream_printf(out, "<center>\n");
|
||||
stream_printf(out, "Commit %s, %s/\n", revNo, fsDir->path);
|
||||
+ free(revNo);
|
||||
stream_printf(out, "</center>\n");
|
||||
stream_printf(out, "<hr>\n");
|
||||
|
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-base_src_client_browse_show_c_l,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/src/client/browse/show_c.l.orig Sat Mar 29 16:15:32 2003
|
||||
+++ base/src/client/browse/show_c.l Thu May 22 17:46:42 2003
|
||||
@@ -48,8 +48,6 @@
|
||||
#define YY_NO_UNPUT
|
||||
|
||||
#define YY_MALLOC_DECL
|
||||
-#define malloc(x) GC_MALLOC_ATOMIC(x)
|
||||
-#define free(x)
|
||||
extern void exit(int);
|
||||
|
||||
/* Suppress compiler complaint about yy_flex_realloc: */
|
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-base_src_client_browse_show_make_l,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/src/client/browse/show_make.l.orig Sat Mar 29 16:15:29 2003
|
||||
+++ base/src/client/browse/show_make.l Thu May 22 17:46:42 2003
|
||||
@@ -48,8 +48,6 @@
|
||||
#define YY_NO_UNPUT
|
||||
|
||||
#define YY_MALLOC_DECL
|
||||
-#define malloc(x) GC_MALLOC_ATOMIC(x)
|
||||
-#define free(x)
|
||||
extern void exit(int);
|
||||
|
||||
/* Suppress compiler complaint about yy_flex_realloc: */
|
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-base_src_client_browse_show_shell_l,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/src/client/browse/show_shell.l.orig Sat Mar 29 16:15:23 2003
|
||||
+++ base/src/client/browse/show_shell.l Thu May 22 17:46:42 2003
|
||||
@@ -48,8 +48,6 @@
|
||||
#define YY_NO_UNPUT
|
||||
|
||||
#define YY_MALLOC_DECL
|
||||
-#define malloc(x) GC_MALLOC_ATOMIC(x)
|
||||
-#define free(x)
|
||||
extern void exit(int);
|
||||
|
||||
/* Suppress compiler complaint about yy_flex_realloc: */
|
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-base_src_client_browse_show_text_l,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/src/client/browse/show_text.l.orig Sat Mar 29 16:15:30 2003
|
||||
+++ base/src/client/browse/show_text.l Thu May 22 17:46:42 2003
|
||||
@@ -48,8 +48,6 @@
|
||||
#define YY_NO_UNPUT
|
||||
|
||||
#define YY_MALLOC_DECL
|
||||
-#define malloc(x) GC_MALLOC_ATOMIC(x)
|
||||
-#define free(x)
|
||||
extern void exit(int);
|
||||
|
||||
/* Suppress compiler complaint about yy_flex_realloc: */
|
63
devel/opencm/patches.nogc/patch-base_src_client_message_c
Normal file
63
devel/opencm/patches.nogc/patch-base_src_client_message_c
Normal file
@ -0,0 +1,63 @@
|
||||
$OpenBSD: patch-base_src_client_message_c,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/src/client/message.c.orig Sat Mar 29 16:15:27 2003
|
||||
+++ base/src/client/message.c Thu May 22 17:46:42 2003
|
||||
@@ -57,9 +57,12 @@ int
|
||||
opencm_confirm(const char *prompt, int dflt_yes)
|
||||
{
|
||||
char *check = opencm_readline(prompt, dflt_yes ? "yes" : "no");
|
||||
- if (strcasecmp(check, "y") == 0 || strcasecmp(check, "yes") == 0)
|
||||
+ if (strcasecmp(check, "y") == 0 || strcasecmp(check, "yes") == 0) {
|
||||
+ free(check);
|
||||
return 1;
|
||||
+ }
|
||||
|
||||
+ free(check);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -219,12 +222,12 @@ message_fixup(char *msgbuf)
|
||||
char *
|
||||
read_message_file(const char *fname, const char *leader)
|
||||
{
|
||||
- FILE *f = 0;
|
||||
+ FILE *f = NULL;
|
||||
|
||||
/* We now need to re-extract the file content, stripping it of the
|
||||
comment lines. Note extra character for trailing newline! */
|
||||
int len = path_file_length(fname); /* upper bound if text */
|
||||
- char *msgbuf = (char *) GC_MALLOC(sizeof(char) * (len + 2));
|
||||
+ char *msgbuf = (char *) malloc(sizeof(char) * (len + 2));
|
||||
|
||||
f = xfopen(fname, 'r', 't');
|
||||
|
||||
@@ -233,7 +236,7 @@ read_message_file(const char *fname, con
|
||||
|
||||
msgbuf[len] = 0;
|
||||
msgbuf[len+1] = 0;
|
||||
- fclose(f);
|
||||
+ xfclose(f);
|
||||
|
||||
strip_comments(msgbuf, leader);
|
||||
|
||||
@@ -243,10 +246,10 @@ read_message_file(const char *fname, con
|
||||
char *
|
||||
get_message(const char *msg, const char *leader, const char *dflt)
|
||||
{
|
||||
- FILE *f = 0;
|
||||
+ FILE *f = NULL;
|
||||
int len;
|
||||
const char *tmpname;
|
||||
- char *msgbuf = 0;
|
||||
+ char *msgbuf = NULL;
|
||||
char arg_nlines[20];
|
||||
int msg_lines = tmpmsg_nlines(msg);
|
||||
const char *contentHash;
|
||||
@@ -254,7 +257,7 @@ get_message(const char *msg, const char
|
||||
|
||||
if (opt_Message) {
|
||||
len = strlen(opt_Message);
|
||||
- msgbuf = (char *) GC_MALLOC(sizeof(char) * (len + 2));
|
||||
+ msgbuf = (char *) malloc(sizeof(char) * (len + 2));
|
||||
strcpy(msgbuf, opt_Message);
|
||||
msgbuf[len] = '\n';
|
||||
msgbuf[len+1] = '\0';
|
225
devel/opencm/patches.nogc/patch-base_src_client_opencm_c
Normal file
225
devel/opencm/patches.nogc/patch-base_src_client_opencm_c
Normal file
@ -0,0 +1,225 @@
|
||||
$OpenBSD: patch-base_src_client_opencm_c,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/src/client/opencm.c.orig Sun Apr 6 16:03:45 2003
|
||||
+++ base/src/client/opencm.c Thu May 22 17:46:42 2003
|
||||
@@ -1252,6 +1252,7 @@ static void
|
||||
display_log(Repository *r, const CommitInfo *ci)
|
||||
{
|
||||
Mutable *m = NULL;
|
||||
+ char *bVers;
|
||||
|
||||
/* Get human readable name of current branch (if not cached) */
|
||||
if (!nmequal(CMGET(ci,branchURI), logBranchURI)) {
|
||||
@@ -1267,9 +1268,11 @@ display_log(Repository *r, const CommitI
|
||||
modUserEmail = pubkey_GetEmail(modUser->pubKey);
|
||||
}
|
||||
|
||||
+ bVers = xunsigned64_str(CMGET(ci,branchVersion));
|
||||
+
|
||||
/* Pretty print it */
|
||||
- report(0, "Branch version: %s (%s)\n", xunsigned64_str(CMGET(ci,branchVersion)),
|
||||
- logBranchName);
|
||||
+ report(0, "Branch version: %s (%s)\n", bVers, logBranchName);
|
||||
+ free(bVers);
|
||||
report(0, "date: %s \nauthor: %s\n", CMGET(ci,time), modUserEmail);
|
||||
report(0, "%s\n", buffer_asString(CMGET(ci,descrip)));
|
||||
report(0, "----------------------------\n");
|
||||
@@ -1455,8 +1458,9 @@ opencm_log(WorkSpace *ws, int argc, char
|
||||
|
||||
const char *tmppath = NULL;
|
||||
const char *resolve_me = NULL;
|
||||
- const char *uri_prefix = path_join(ws->pc->branchURI,
|
||||
- xunsigned64_str(ws->pc->nRevisions - 1));
|
||||
+ char *nRevs = xunsigned64_str(ws->pc->nRevisions - 1);
|
||||
+ const char *uri_prefix = path_join(ws->pc->branchURI, nRevs);
|
||||
+ free(nRevs);
|
||||
|
||||
tmppath = ws_NormalizePath(ws, argv[0]);
|
||||
|
||||
@@ -2150,10 +2154,11 @@ opencm_logmail(WorkSpace *ws, int argc,
|
||||
(CommitInfo *)repos_GetEntity(r, res->m->uri,
|
||||
CMGET(chg,commitInfoTrueName));
|
||||
User *u = (User *) client_GetMutableContent(r, CMGET(ci,authorURI));
|
||||
+ char *bVers = xunsigned64_str(CMGET(ci,branchVersion));
|
||||
|
||||
fprintf(f, "Project: %s\n", res->m->name);
|
||||
- fprintf(f, "New version: %s/%s\n", CMGET(ci,branchURI),
|
||||
- xunsigned64_str(CMGET(ci,branchVersion)));
|
||||
+ fprintf(f, "New version: %s/%s\n", CMGET(ci,branchURI), bVers);
|
||||
+ free(bVers);
|
||||
|
||||
fprintf(f, "Author: %s\n", pubkey_GetEmail(u->pubKey));
|
||||
fprintf(f, "Time: %s\n", CMGET(ci,time));
|
||||
@@ -2384,14 +2389,17 @@ markfn(Repository *r, const char *tn, vo
|
||||
/* It's a mutable */
|
||||
Mutable *m = repos_GetMutable(r, tn);
|
||||
unsigned long long revno;
|
||||
+ char *nRevs = xunsigned64_str(m->nRevisions);
|
||||
|
||||
- report(0, "[%06d] %s has %s revisions\n", ms->depth, tn,
|
||||
- xunsigned64_str(m->nRevisions));
|
||||
+ report(0, "[%06d] %s has %s revisions\n", ms->depth, tn, nRevs);
|
||||
+ free(nRevs);
|
||||
|
||||
#if 1
|
||||
for (revno = 0; revno < m->nRevisions; revno++) {
|
||||
Revision *rev = repos_GetRevision(r, tn, revno);
|
||||
- report(0, "[%06d] revision %s \n", ms->depth+1, xunsigned64_str(revno));
|
||||
+ nRevs = xunsigned64_str(revno);
|
||||
+ report(0, "[%06d] revision %s \n", ms->depth+1, nRevs);
|
||||
+ free(nRevs);
|
||||
ms->depth += 2;
|
||||
ser_mark(r, rev, markfn, state);
|
||||
ms->depth -= 2;
|
||||
@@ -2400,7 +2408,9 @@ markfn(Repository *r, const char *tn, vo
|
||||
revno = m->nRevisions -1;
|
||||
for(;;) {
|
||||
Revision *rev = repos_GetRevision(r, tn, revno);
|
||||
- report(0, "[%06ds]revision %s \n", ms->depth+1, xunsigned64_str(revno));
|
||||
+ nRevs = xunsigned64_str(revno);
|
||||
+ report(0, "[%06ds]revision %s \n", ms->depth+1, nRevs);
|
||||
+ free(nRevs);
|
||||
ms->depth += 2;
|
||||
ser_mark(r, rev, markfn, state);
|
||||
ms->depth -= 2;
|
||||
@@ -2447,10 +2457,10 @@ mark_addmark(const void *container, stru
|
||||
report(2, "Add M %s -> %s\n", ((const Mutable *)container)->uri, tn);
|
||||
}
|
||||
else if (GETTYPE(container) == TY_Revision) {
|
||||
+ char *seq = xunsigned64_str( ((const Revision *)container)->seq_number );
|
||||
report(2, "Add R %s/%s -> %s\n",
|
||||
- ((const Revision *)container)->mutURI,
|
||||
- xunsigned64_str( ((const Revision *)container)->seq_number ),
|
||||
- tn);
|
||||
+ ((const Revision *)container)->mutURI, seq, tn );
|
||||
+ free(seq);
|
||||
}
|
||||
else {
|
||||
static const void *last_container = 0;
|
||||
@@ -2511,7 +2521,7 @@ mark_add_count(rbtree *mark_counts, Seri
|
||||
rbn = rbtree_find(mark_counts, &lookupKey);
|
||||
|
||||
if (rbn == TREE_NIL) {
|
||||
- unsigned *data = GC_MALLOC_ATOMIC(sizeof(unsigned));
|
||||
+ unsigned *data = malloc(sizeof(unsigned));
|
||||
*data = 0;
|
||||
|
||||
rbn = rbnode_create(lookupKey.vp, lookupKey.w, data);
|
||||
@@ -2582,6 +2592,7 @@ opencm_mark(WorkSpace *ws, int argc, cha
|
||||
while ((nd = rbtree_root(marks)) != TREE_NIL) {
|
||||
rbkey lookupKey;
|
||||
const char *tn = nd->value.vp;
|
||||
+ char *xstr;
|
||||
|
||||
assert (tn != 0);
|
||||
|
||||
@@ -2593,7 +2604,9 @@ opencm_mark(WorkSpace *ws, int argc, cha
|
||||
if (rbtree_find(visited, &lookupKey) != TREE_NIL)
|
||||
continue;
|
||||
|
||||
- report(1, "Mark %s %s\n", xunsigned64_str(count), tn);
|
||||
+ xstr = xunsigned64_str(count);
|
||||
+ report(1, "Mark %s %s\n", xstr, tn);
|
||||
+ free(xstr);
|
||||
count++;
|
||||
|
||||
rbtree_insert(visited, rbnode_create(tn, 0, 0));
|
||||
@@ -2620,8 +2633,9 @@ opencm_mark(WorkSpace *ws, int argc, cha
|
||||
ser_mark(r, m, m, newMarks);
|
||||
mark_add_count(mark_counts, (Serializable *) m);
|
||||
|
||||
- report(1, "Mark mutable %s (%s revisions)\n", tn,
|
||||
- xunsigned64_str(m->nRevisions));
|
||||
+ xstr = xunsigned64_str(m->nRevisions);
|
||||
+ report(1, "Mark mutable %s (%s revisions)\n", tn, xstr);
|
||||
+ free(xstr);
|
||||
|
||||
for (revno = 0; revno < m->nRevisions; revno++) {
|
||||
Revision *rev = 0;
|
||||
@@ -2633,7 +2647,9 @@ opencm_mark(WorkSpace *ws, int argc, cha
|
||||
} END_CATCH;
|
||||
|
||||
if (rev) {
|
||||
- report(1, "revision %s/%s \n", tn, xunsigned64_str(revno));
|
||||
+ xstr = xunsigned64_str(revno);
|
||||
+ report(1, "revision %s/%s \n", tn, xstr);
|
||||
+ free(xstr);
|
||||
ser_mark(r, rev, rev, newMarks);
|
||||
mark_add_count(mark_counts, (Serializable *) rev);
|
||||
}
|
||||
@@ -2728,7 +2744,7 @@ typedef struct config_files {
|
||||
static config_files *
|
||||
find_config_files(OC_bool needThem)
|
||||
{
|
||||
- config_files *cfg = GC_MALLOC(sizeof(*cfg));
|
||||
+ config_files *cfg = malloc(sizeof(*cfg));
|
||||
|
||||
const char *user_dir = path_join(opt_ConfigDir, CM_USER_SUBDIR);
|
||||
|
||||
@@ -2820,48 +2836,16 @@ process_environment()
|
||||
opt_user = CM_DEFAULT_USER;
|
||||
}
|
||||
|
||||
-static void* ssl_malloc(size_t howmuch)
|
||||
-{
|
||||
- return GC_MALLOC(howmuch);
|
||||
-}
|
||||
-
|
||||
-static void* ssl_realloc(void* ptr, size_t size)
|
||||
-{
|
||||
- return GC_REALLOC(ptr, size);
|
||||
-}
|
||||
-
|
||||
-static void ssl_free(void* ptr)
|
||||
-{
|
||||
-#if 1
|
||||
- /* do nothing; let the GC handle it */
|
||||
-#else
|
||||
- GC_FREE(ptr);
|
||||
-#endif
|
||||
-}
|
||||
-
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
int dummy;
|
||||
struct found_command fc;
|
||||
- WorkSpace *ws = 0;
|
||||
+ WorkSpace *ws = NULL;
|
||||
|
||||
/* Set up the initial logging rules immediately */
|
||||
log_set_verbosity(0);
|
||||
|
||||
- GC_expand_hp (8 * 1024 * 1024);
|
||||
- /* GC_use_entire_heap = 1; */
|
||||
- /* GC_enable_incremental(); */
|
||||
-
|
||||
- /*
|
||||
- OpenSSL has some leaks (and it looks like we hit them pretty hard at
|
||||
- times). But by having it use the GC instead of the standard libc
|
||||
- malloc/realloc/free, we can prevent the worst of it.
|
||||
- */
|
||||
-#if USE_SSL_GC
|
||||
- CRYPTO_set_mem_functions(ssl_malloc, ssl_realloc, ssl_free);
|
||||
-#endif
|
||||
-
|
||||
appInvokedName = argv[0];
|
||||
appName = CM_APPNAME;
|
||||
|
||||
@@ -2904,7 +2888,7 @@ main(int argc, char *argv[])
|
||||
! CMD_ISFLAG(fc.cmd, (CF_ADMIN)))
|
||||
ws = ws_Init(fc.cmd, 0);
|
||||
|
||||
- this_repos = 0;
|
||||
+ this_repos = NULL;
|
||||
|
||||
if (! CMD_ISFLAG(fc.cmd, CF_NOCONNECT)) {
|
||||
/* We will need the config files unless (a) there is no
|
||||
@@ -3056,7 +3040,7 @@ pendingchange_addNote(PendingChange *pc,
|
||||
unsigned msg_len = strlen(msg);
|
||||
|
||||
/* add 3 for intervening LF, trailing LF,trailing NUL */
|
||||
- s = GC_MALLOC_ATOMIC(notes_len + msg_len + 3);
|
||||
+ s = malloc(notes_len + msg_len + 3);
|
||||
if (pc->notes) {
|
||||
strcpy(s, pc->notes);
|
||||
s[notes_len++] = '\n';
|
84
devel/opencm/patches.nogc/patch-base_src_common_Buffer_c
Normal file
84
devel/opencm/patches.nogc/patch-base_src_common_Buffer_c
Normal file
@ -0,0 +1,84 @@
|
||||
$OpenBSD: patch-base_src_common_Buffer_c,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/src/common/Buffer.c.orig Sun Apr 6 16:03:43 2003
|
||||
+++ base/src/common/Buffer.c Fri May 23 07:50:43 2003
|
||||
@@ -38,6 +38,8 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
+#include <err.h>
|
||||
+
|
||||
#include <opencm.h>
|
||||
#include "../../zlib/zlib.h"
|
||||
|
||||
@@ -63,10 +65,15 @@ void
|
||||
buffer_show(const void *vp)
|
||||
{
|
||||
const Buffer *buf = vp;
|
||||
+ char *xstr;
|
||||
|
||||
report(0, "Frozen: %c\n", buf->frozen ? 'Y' : 'N');
|
||||
- report(0, "Bias: %s\n", xunsigned64_str(CMGET(buf,bias)));
|
||||
- report(0, "End: %s\n", xunsigned64_str(CMGET(buf,end)));
|
||||
+ xstr = xunsigned64_str(CMGET(buf,bias));
|
||||
+ report(0, "Bias: %s\n", xstr);
|
||||
+ free(xstr);
|
||||
+ xstr = xunsigned64_str(CMGET(buf,end));
|
||||
+ report(0, "End: %s\n", xstr);
|
||||
+ free(xstr);
|
||||
report(0, "Descrip: <omitted>\n");
|
||||
}
|
||||
|
||||
@@ -101,7 +108,10 @@ buffer_mark(Repository *r, const void *c
|
||||
Buffer *
|
||||
buffer_create(void)
|
||||
{
|
||||
- Buffer *buf = (Buffer *) GC_MALLOC(sizeof(Buffer));
|
||||
+ Buffer *buf = (Buffer *) calloc(1, sizeof(Buffer));
|
||||
+ if (buf == NULL)
|
||||
+ errx(1, "calloc failed in buffer_create");
|
||||
+
|
||||
ser_init(buf, &Buffer_SerType, Buffer_SerType.ver);
|
||||
SER_MODIFIED(buf);
|
||||
|
||||
@@ -155,7 +165,10 @@ buffer_append(Buffer *buf, const void *v
|
||||
unsigned char *bp = (unsigned char *) vp;
|
||||
|
||||
while (BLKNDX(end) >= vec_size(CMGET(buf,vec))) {
|
||||
- unsigned char* block = GC_MALLOC_ATOMIC(BUFFER_BLOCK_SIZE);
|
||||
+ unsigned char* block = calloc(1, BUFFER_BLOCK_SIZE);
|
||||
+ if (block == NULL)
|
||||
+ errx(1, "calloc failed in buffer_append");
|
||||
+
|
||||
obvec_append(CMCLOBBER(buf,vec), block);
|
||||
}
|
||||
|
||||
@@ -214,9 +227,14 @@ buffer_FromFilePtr(const char *name, FIL
|
||||
rewind(f);
|
||||
|
||||
for ( ;; ) {
|
||||
- unsigned char *block = GC_MALLOC_ATOMIC(BUFFER_BLOCK_SIZE);
|
||||
+ unsigned char *block = calloc(1, BUFFER_BLOCK_SIZE);
|
||||
+ size_t take;
|
||||
+
|
||||
+ if (block == NULL)
|
||||
+ errx(1, "calloc failed in buffer_FromFilePtr");
|
||||
+
|
||||
+ take = fread(block, 1, BUFFER_BLOCK_SIZE, f);
|
||||
|
||||
- size_t take = fread(block, 1, BUFFER_BLOCK_SIZE, f);
|
||||
if (take == 0 && feof(f))
|
||||
break;
|
||||
else if (take == 0)
|
||||
@@ -338,7 +356,11 @@ char *
|
||||
buffer_asString(const Buffer *buf)
|
||||
{
|
||||
ocmoff_t len = buffer_length(buf);
|
||||
- char *s = GC_MALLOC_ATOMIC(len+1);
|
||||
+ char *s = calloc(1, len+1);
|
||||
+ if (s == NULL) {
|
||||
+ errx(1, "calloc failed in buffer_asString");
|
||||
+ }
|
||||
+
|
||||
s[len] = 0;
|
||||
|
||||
buffer_read(buf, s, 0, len);
|
21
devel/opencm/patches.nogc/patch-base_src_common_Change_c
Normal file
21
devel/opencm/patches.nogc/patch-base_src_common_Change_c
Normal file
@ -0,0 +1,21 @@
|
||||
$OpenBSD: patch-base_src_common_Change_c,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/src/common/Change.c.orig Sat Mar 29 16:15:31 2003
|
||||
+++ base/src/common/Change.c Thu May 22 17:46:42 2003
|
||||
@@ -43,7 +43,7 @@
|
||||
Change *
|
||||
change_create(const char *parent, CommitInfo *ci)
|
||||
{
|
||||
- Change *chg = (Change *) GC_MALLOC(sizeof(Change));
|
||||
+ Change *chg = (Change *) malloc(sizeof(Change));
|
||||
|
||||
ser_init(chg, &Change_SerType, Change_SerType.ver);
|
||||
SER_MODIFIED(chg);
|
||||
@@ -142,7 +142,7 @@ change_serialize(SDR_stream *strm, const
|
||||
void *
|
||||
change_deserialize(const DeserializeInfo *di, SDR_stream *strm)
|
||||
{
|
||||
- Change *chg = (Change *) GC_MALLOC(sizeof(Change));
|
||||
+ Change *chg = (Change *) malloc(sizeof(Change));
|
||||
|
||||
ser_init(chg, &Change_SerType, di->ver);
|
||||
|
70
devel/opencm/patches.nogc/patch-base_src_common_ChannelSSL_c
Normal file
70
devel/opencm/patches.nogc/patch-base_src_common_ChannelSSL_c
Normal file
@ -0,0 +1,70 @@
|
||||
$OpenBSD: patch-base_src_common_ChannelSSL_c,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/src/common/ChannelSSL.c.orig Wed Apr 23 14:50:38 2003
|
||||
+++ base/src/common/ChannelSSL.c Thu May 22 17:46:42 2003
|
||||
@@ -400,7 +400,17 @@ ssl_flush(Channel *c, OC_bool blocking)
|
||||
}
|
||||
default:
|
||||
{
|
||||
- c->writeQueue = 0;
|
||||
+ while(c->writeQueue->next) {
|
||||
+ PendingWrite *tmp, *q = c->writeQueue;
|
||||
+ while (q->next) {
|
||||
+ tmp = q;
|
||||
+ q = q->next;
|
||||
+ }
|
||||
+ free(tmp->next);
|
||||
+ tmp->next = NULL;
|
||||
+ }
|
||||
+ free(c->writeQueue);
|
||||
+ c->writeQueue = NULL;
|
||||
c->aclose(c);
|
||||
return;
|
||||
}
|
||||
@@ -423,6 +433,7 @@ ssl_flush(Channel *c, OC_bool blocking)
|
||||
pw->callback = NULL;
|
||||
fn(c);
|
||||
c->writeQueue = pw->next;
|
||||
+ free(pw);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -518,7 +529,7 @@ ssl_pull(Channel *c, OC_bool blocking)
|
||||
static void
|
||||
ssl_send(Channel *c, const void *buf, size_t len, ChannelCompletionFn fn)
|
||||
{
|
||||
- PendingWrite *pw = (PendingWrite *)GC_MALLOC(sizeof(PendingWrite));
|
||||
+ PendingWrite *pw = (PendingWrite *)malloc(sizeof(PendingWrite));
|
||||
|
||||
if (!fn) fn = NullChannelCallback;
|
||||
|
||||
@@ -526,6 +537,7 @@ ssl_send(Channel *c, const void *buf, si
|
||||
pw->len = len;
|
||||
pw->sent = 0;
|
||||
pw->callback = fn;
|
||||
+ pw->next = NULL;
|
||||
|
||||
if (c->writeQueue == 0) {
|
||||
c->writeQueue = pw;
|
||||
@@ -555,18 +567,16 @@ ssl_receive(Channel *c, size_t len, Chan
|
||||
static void
|
||||
ssl_aclose(Channel *c)
|
||||
{
|
||||
- log_trace(TRC_COMM,
|
||||
- "Closing (async) SSL connection (connection id=%d, heap=%d)\n",
|
||||
- c->connection_id, GC_get_heap_size());
|
||||
+ log_trace(TRC_COMM, "Closing (async) SSL connection (connection id=%d)\n",
|
||||
+ c->connection_id);
|
||||
c->closed = TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
ssl_close(Channel *c)
|
||||
{
|
||||
- log_trace(TRC_COMM,
|
||||
- "Shutting down SSL connection (connection id=%d, heap=%d)\n",
|
||||
- c->connection_id, GC_get_heap_size());
|
||||
+ log_trace(TRC_COMM, "Shutting down SSL connection (connection id=%d)\n",
|
||||
+ c->connection_id);
|
||||
c->rCallback = NULL;
|
||||
|
||||
TRY {
|
33
devel/opencm/patches.nogc/patch-base_src_common_ChannelTCP_c
Normal file
33
devel/opencm/patches.nogc/patch-base_src_common_ChannelTCP_c
Normal file
@ -0,0 +1,33 @@
|
||||
$OpenBSD: patch-base_src_common_ChannelTCP_c,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/src/common/ChannelTCP.c.orig Sat Mar 29 16:15:24 2003
|
||||
+++ base/src/common/ChannelTCP.c Thu May 22 17:46:42 2003
|
||||
@@ -295,7 +295,7 @@ tcp_pull(Channel *c, OC_bool blocking)
|
||||
static void
|
||||
tcp_send(Channel *c, const void *buf, size_t len, ChannelCompletionFn fn)
|
||||
{
|
||||
- PendingWrite *pw = (PendingWrite *)GC_MALLOC(sizeof(PendingWrite));
|
||||
+ PendingWrite *pw = (PendingWrite *)malloc(sizeof(PendingWrite));
|
||||
|
||||
if (!fn) fn = NullChannelCallback;
|
||||
|
||||
@@ -332,16 +332,16 @@ tcp_receive(Channel *c, size_t len, Chan
|
||||
static void
|
||||
tcp_aclose(Channel *c)
|
||||
{
|
||||
- log_trace(TRC_COMM, "Closing (async) TCP connection (connection id=%d, heap=%d)\n",
|
||||
- c->connection_id, GC_get_heap_size());
|
||||
+ log_trace(TRC_COMM, "Closing (async) TCP connection (connection id=%d)\n",
|
||||
+ c->connection_id);
|
||||
c->closed = TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
tcp_close(Channel *c)
|
||||
{
|
||||
- log_trace(TRC_COMM, "Shutting down TCP connection (connection id=%d, heap=%d)\n",
|
||||
- c->connection_id, GC_get_heap_size());
|
||||
+ log_trace(TRC_COMM, "Shutting down TCP connection (connection id=%d)\n",
|
||||
+ c->connection_id);
|
||||
c->rCallback = NULL;
|
||||
c->writeQueue = NULL;
|
||||
TRY {
|
71
devel/opencm/patches.nogc/patch-base_src_common_Channel_c
Normal file
71
devel/opencm/patches.nogc/patch-base_src_common_Channel_c
Normal file
@ -0,0 +1,71 @@
|
||||
$OpenBSD: patch-base_src_common_Channel_c,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/src/common/Channel.c.orig Sat Mar 29 16:15:25 2003
|
||||
+++ base/src/common/Channel.c Fri May 23 07:41:27 2003
|
||||
@@ -38,6 +38,8 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
+#include <err.h>
|
||||
+
|
||||
#include <opencm.h>
|
||||
|
||||
static unsigned int global_connection_counter = 0;
|
||||
@@ -271,8 +273,8 @@ chan_select(Channel **chanset, int maxfd
|
||||
|
||||
/* Remove and close any Channels that were aclosed: */
|
||||
if (chanset[u]->closed) {
|
||||
- log_trace(TRC_COMM, "Connection dropped (connection id=%d, heap=%d)\n",
|
||||
- chanset[u]->connection_id, GC_get_heap_size());
|
||||
+ log_trace(TRC_COMM, "Connection dropped (connection id=%d)\n",
|
||||
+ chanset[u]->connection_id);
|
||||
chanset[u]->close(chanset[u]);
|
||||
chanset[u] = NULL;
|
||||
num_active_clients--;
|
||||
@@ -349,12 +351,15 @@ chan_select(Channel **chanset, int maxfd
|
||||
Channel *
|
||||
chan_create(void)
|
||||
{
|
||||
- Channel *c = (Channel *)GC_MALLOC(sizeof(Channel));
|
||||
+ Channel *c = (Channel *) calloc(1, sizeof(Channel));
|
||||
+ if (c == NULL)
|
||||
+ errx(1, "calloc failed in chan_create");
|
||||
|
||||
c->pendingRead = FALSE;
|
||||
c->pendingWrite = FALSE;
|
||||
|
||||
c->rCallback = NULL;
|
||||
+ c->hCallback = NULL;
|
||||
|
||||
c->send = NULL;
|
||||
c->receive = NULL;
|
||||
@@ -363,9 +368,13 @@ chan_create(void)
|
||||
c->close = NULL;
|
||||
c->aclose = NULL;
|
||||
c->closed = FALSE;
|
||||
+ c->shake = NULL;
|
||||
|
||||
c->read_buf = 0;
|
||||
- c->read_scratch = GC_MALLOC_ATOMIC(CHAN_RDBOUND);
|
||||
+ c->read_scratch = calloc(1, CHAN_RDBOUND);
|
||||
+ if (c->read_scratch == NULL)
|
||||
+ errx(1, "second calloc failed in chan_create");
|
||||
+
|
||||
c->read_so_far = 0;
|
||||
c->read_wanted = 0;
|
||||
c->rbuf_limit = 0;
|
||||
@@ -374,11 +383,11 @@ chan_create(void)
|
||||
|
||||
c->uri = NULL;
|
||||
|
||||
- c->ctx = 0;
|
||||
- c->ssl = 0;
|
||||
- c->sbio = 0;
|
||||
+ c->ctx = NULL;
|
||||
+ c->ssl = NULL;
|
||||
+ c->sbio = NULL;
|
||||
c->peerCert = 0;
|
||||
- c->xinfo = 0;
|
||||
+ c->xinfo = NULL;
|
||||
|
||||
c->check_idleness = FALSE;
|
||||
c->max_idle_time = 0;
|
37
devel/opencm/patches.nogc/patch-base_src_common_CommitInfo_c
Normal file
37
devel/opencm/patches.nogc/patch-base_src_common_CommitInfo_c
Normal file
@ -0,0 +1,37 @@
|
||||
$OpenBSD: patch-base_src_common_CommitInfo_c,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/src/common/CommitInfo.c.orig Sat Mar 29 16:15:32 2003
|
||||
+++ base/src/common/CommitInfo.c Thu May 22 17:46:42 2003
|
||||
@@ -74,12 +74,13 @@ void
|
||||
commitinfo_show(const void *vp)
|
||||
{
|
||||
const CommitInfo *ci = vp;
|
||||
+ char *xstr;
|
||||
|
||||
report(0, "Date: %s\n", CMGET(ci,time));
|
||||
report(0, "AuthorURI: %s\n", CMGET(ci,authorURI));
|
||||
report(0, "BranchURI: %s\n", CMGET(ci,branchURI));
|
||||
- report(0, "Branch Version: %s\n",
|
||||
- xunsigned64_str(CMGET(ci,branchVersion)));
|
||||
+ xstr = xunsigned64_str(CMGET(ci,branchVersion));
|
||||
+ report(0, "Branch Version: %s\n", xstr);
|
||||
report(0, "Descrip:\n%s\n", buffer_asString(CMGET(ci,descrip)));
|
||||
}
|
||||
|
||||
@@ -98,7 +99,7 @@ commitinfo_serialize(SDR_stream *strm, c
|
||||
void *
|
||||
commitinfo_deserialize(const DeserializeInfo *di, SDR_stream *strm)
|
||||
{
|
||||
- CommitInfo *ci = (CommitInfo *) GC_MALLOC(sizeof(CommitInfo));
|
||||
+ CommitInfo *ci = (CommitInfo *) malloc(sizeof(CommitInfo));
|
||||
|
||||
ser_init(ci, &CommitInfo_SerType, di->ver);
|
||||
SER_MODIFIED(ci);
|
||||
@@ -130,7 +131,7 @@ CommitInfo *
|
||||
commitinfo_create(const Buffer *descrip, const char *authorURI,
|
||||
const char *branchURI, uint64_t rev)
|
||||
{
|
||||
- CommitInfo *ci = (CommitInfo *) GC_MALLOC(sizeof(CommitInfo));
|
||||
+ CommitInfo *ci = (CommitInfo *) malloc(sizeof(CommitInfo));
|
||||
|
||||
assert(authorURI);
|
||||
|
21
devel/opencm/patches.nogc/patch-base_src_common_Directory_c
Normal file
21
devel/opencm/patches.nogc/patch-base_src_common_Directory_c
Normal file
@ -0,0 +1,21 @@
|
||||
$OpenBSD: patch-base_src_common_Directory_c,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/src/common/Directory.c.orig Sat Mar 29 16:15:27 2003
|
||||
+++ base/src/common/Directory.c Thu May 22 17:46:42 2003
|
||||
@@ -43,7 +43,7 @@
|
||||
Directory *
|
||||
directory_create(void)
|
||||
{
|
||||
- Directory *n = (Directory *)GC_MALLOC(sizeof(Directory));
|
||||
+ Directory *n = (Directory *)malloc(sizeof(Directory));
|
||||
|
||||
ser_init(n, &Directory_SerType, Directory_SerType.ver);
|
||||
SER_MODIFIED(n);
|
||||
@@ -149,7 +149,7 @@ directory_mark(Repository *r, const void
|
||||
void *
|
||||
directory_deserialize(const DeserializeInfo *di, SDR_stream *strm)
|
||||
{
|
||||
- Directory * ns = (Directory *)GC_MALLOC(sizeof(Directory));
|
||||
+ Directory * ns = (Directory *)malloc(sizeof(Directory));
|
||||
|
||||
ser_init(ns, &Directory_SerType, di->ver);
|
||||
SER_MODIFIED(ns);
|
21
devel/opencm/patches.nogc/patch-base_src_common_Dirent_c
Normal file
21
devel/opencm/patches.nogc/patch-base_src_common_Dirent_c
Normal file
@ -0,0 +1,21 @@
|
||||
$OpenBSD: patch-base_src_common_Dirent_c,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/src/common/Dirent.c.orig Sat Mar 29 16:15:25 2003
|
||||
+++ base/src/common/Dirent.c Thu May 22 17:46:42 2003
|
||||
@@ -43,7 +43,7 @@
|
||||
Dirent *
|
||||
dirent_create(const char *key, const char *value)
|
||||
{
|
||||
- Dirent *z = (Dirent *)GC_MALLOC(sizeof(Dirent));
|
||||
+ Dirent *z = (Dirent *)malloc(sizeof(Dirent));
|
||||
|
||||
ser_init(z, &Dirent_SerType, Dirent_SerType.ver);
|
||||
SER_MODIFIED(z);
|
||||
@@ -74,7 +74,7 @@ dirent_serialize(SDR_stream *strm, const
|
||||
void *
|
||||
dirent_deserialize(const DeserializeInfo *di, SDR_stream *strm)
|
||||
{
|
||||
- Dirent *z = (Dirent *)GC_MALLOC(sizeof(Dirent));
|
||||
+ Dirent *z = (Dirent *)malloc(sizeof(Dirent));
|
||||
|
||||
ser_init(z, &Dirent_SerType, di->ver);
|
||||
SER_MODIFIED(z);
|
48
devel/opencm/patches.nogc/patch-base_src_common_EntityBits_c
Normal file
48
devel/opencm/patches.nogc/patch-base_src_common_EntityBits_c
Normal file
@ -0,0 +1,48 @@
|
||||
$OpenBSD: patch-base_src_common_EntityBits_c,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/src/common/EntityBits.c.orig Sat Mar 29 16:15:22 2003
|
||||
+++ base/src/common/EntityBits.c Thu May 22 17:46:42 2003
|
||||
@@ -60,7 +60,7 @@ ebits_serialize(SDR_stream *strm, const
|
||||
void *
|
||||
ebits_deserialize(SDR_stream *strm)
|
||||
{
|
||||
- EntityBits *eb = (EntityBits *) GC_MALLOC(sizeof(EntityBits));
|
||||
+ EntityBits *eb = (EntityBits *) malloc(sizeof(EntityBits));
|
||||
|
||||
eb->serType = &EntityBits_SerType;
|
||||
SER_MODIFIED(eb);
|
||||
@@ -73,7 +73,7 @@ ebits_deserialize(SDR_stream *strm)
|
||||
EntityBits *
|
||||
ebits_create(void)
|
||||
{
|
||||
- EntityBits *eb = (EntityBits *) GC_MALLOC(sizeof(EntityBits));
|
||||
+ EntityBits *eb = (EntityBits *) malloc(sizeof(EntityBits));
|
||||
|
||||
eb->serType = &EntityBits_SerType;
|
||||
SER_MODIFIED(eb);
|
||||
@@ -92,7 +92,7 @@ ebits_FromStream(SDR_stream *s, unsigned
|
||||
stream_reread(s);
|
||||
eb->length = stream_length(s);
|
||||
|
||||
- buf = GC_MALLOC_ATOMIC(eb->length);
|
||||
+ buf = malloc(eb->length);
|
||||
stream_read(s, buf, eb->length);
|
||||
eb->content = buf;
|
||||
|
||||
@@ -105,7 +105,7 @@ ebits_ReadFrom(const char *fileName, uns
|
||||
{
|
||||
FILE *f = NULL;
|
||||
char *buf;
|
||||
- EntityBits *eb = (EntityBits *) GC_MALLOC(sizeof(EntityBits));
|
||||
+ EntityBits *eb = (EntityBits *) malloc(sizeof(EntityBits));
|
||||
|
||||
/* For the moment, we only handle text or binary content. No
|
||||
symlinks or directories yet... */
|
||||
@@ -118,7 +118,7 @@ ebits_ReadFrom(const char *fileName, uns
|
||||
|
||||
eb->length = path_file_length(fileName);
|
||||
|
||||
- buf = (char *) GC_MALLOC_ATOMIC(sizeof(char) * (eb->length + 1));
|
||||
+ buf = (char *) malloc(sizeof(char) * (eb->length + 1));
|
||||
buf[eb->length] = 0;
|
||||
|
||||
TRY {
|
@ -0,0 +1,21 @@
|
||||
$OpenBSD: patch-base_src_common_EntityCache_c,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/src/common/EntityCache.c.orig Wed Jan 1 01:53:23 2003
|
||||
+++ base/src/common/EntityCache.c Thu May 22 17:46:42 2003
|
||||
@@ -110,7 +110,7 @@ ecache_dolink(EntityCache *ec, EcacheNod
|
||||
EntityCache *
|
||||
ecache_create(uint32_t max)
|
||||
{
|
||||
- EntityCache *ec = GC_MALLOC(sizeof(EntityCache));
|
||||
+ EntityCache *ec = malloc(sizeof(EntityCache));
|
||||
ec->oldest = 0;
|
||||
ec->sz = 0;
|
||||
ec->max = max;
|
||||
@@ -156,7 +156,7 @@ ecache_insert(EntityCache *ec, const cha
|
||||
}
|
||||
|
||||
{
|
||||
- EcacheNode *nd = GC_MALLOC(sizeof(EcacheNode));
|
||||
+ EcacheNode *nd = malloc(sizeof(EcacheNode));
|
||||
|
||||
nd->rbn.value.vp = tn;
|
||||
nd->rbn.value.w = truename_hash(tn);
|
30
devel/opencm/patches.nogc/patch-base_src_common_Entity_c
Normal file
30
devel/opencm/patches.nogc/patch-base_src_common_Entity_c
Normal file
@ -0,0 +1,30 @@
|
||||
$OpenBSD: patch-base_src_common_Entity_c,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/src/common/Entity.c.orig Sat Mar 29 16:15:22 2003
|
||||
+++ base/src/common/Entity.c Thu May 22 17:46:42 2003
|
||||
@@ -64,7 +64,7 @@ entity_serialize(SDR_stream *strm, const
|
||||
void *
|
||||
entity_deserialize(const DeserializeInfo *di, SDR_stream *strm)
|
||||
{
|
||||
- Entity *e = (Entity *) GC_MALLOC(sizeof(Entity));
|
||||
+ Entity *e = (Entity *) malloc(sizeof(Entity));
|
||||
|
||||
ser_init(e, &Entity_SerType, di->ver);
|
||||
SER_MODIFIED(e);
|
||||
@@ -137,7 +137,7 @@ entity_show(const void *v)
|
||||
Entity *
|
||||
entity_dup(const Entity *ent)
|
||||
{
|
||||
- Entity *e = (Entity *) GC_MALLOC(sizeof(Entity));
|
||||
+ Entity *e = (Entity *) malloc(sizeof(Entity));
|
||||
|
||||
ser_init(e, &Entity_SerType, Entity_SerType.ver);
|
||||
SER_MODIFIED(e);
|
||||
@@ -170,7 +170,7 @@ entity_CreateFamNID(void)
|
||||
Entity *
|
||||
entity_create(char eType, const char *famNID)
|
||||
{
|
||||
- Entity *e = (Entity *) GC_MALLOC(sizeof(Entity));
|
||||
+ Entity *e = (Entity *) malloc(sizeof(Entity));
|
||||
|
||||
ser_init(e, &Entity_SerType, Entity_SerType.ver);
|
||||
SER_MODIFIED(e);
|
22
devel/opencm/patches.nogc/patch-base_src_common_FsDir_c
Normal file
22
devel/opencm/patches.nogc/patch-base_src_common_FsDir_c
Normal file
@ -0,0 +1,22 @@
|
||||
$OpenBSD: patch-base_src_common_FsDir_c,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/src/common/FsDir.c.orig Sat Mar 29 16:15:22 2003
|
||||
+++ base/src/common/FsDir.c Thu May 22 17:46:42 2003
|
||||
@@ -43,7 +43,7 @@
|
||||
FsDir *
|
||||
fsdir_create(uint64_t rev, Change *cfg, const char *path)
|
||||
{
|
||||
- FsDir *f = (FsDir *) GC_MALLOC(sizeof(FsDir));
|
||||
+ FsDir *f = (FsDir *) malloc(sizeof(FsDir));
|
||||
|
||||
ser_init(f, &FsDir_SerType, FsDir_SerType.ver);
|
||||
SER_MODIFIED(f);
|
||||
@@ -59,7 +59,8 @@ void
|
||||
fsdir_show(const void *vp)
|
||||
{
|
||||
const FsDir *f = vp;
|
||||
- report(0, "Revisions: %s\n", xunsigned64_str(f->rev));
|
||||
+ char *xstr = xunsigned64_str(f->rev);
|
||||
+ report(0, "Revisions: %s\n", xstr);
|
||||
report(0, "Config name: %s\n", ser_getTrueName(f->cfg));
|
||||
report(0, "Path: %s\n", f->path);
|
||||
|
21
devel/opencm/patches.nogc/patch-base_src_common_Group_c
Normal file
21
devel/opencm/patches.nogc/patch-base_src_common_Group_c
Normal file
@ -0,0 +1,21 @@
|
||||
$OpenBSD: patch-base_src_common_Group_c,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/src/common/Group.c.orig Sat Mar 29 16:15:21 2003
|
||||
+++ base/src/common/Group.c Thu May 22 17:46:42 2003
|
||||
@@ -43,7 +43,7 @@
|
||||
Group *
|
||||
group_create(void)
|
||||
{
|
||||
- Group *g = (Group *) GC_MALLOC(sizeof(Group));
|
||||
+ Group *g = (Group *) malloc(sizeof(Group));
|
||||
|
||||
/* FiX: Make sure nickname doesn't contain spaces. Replace all spaces
|
||||
* with underline??? */
|
||||
@@ -82,7 +82,7 @@ group_serialize(SDR_stream *strm, const
|
||||
void *
|
||||
group_deserialize(const DeserializeInfo *di, SDR_stream *strm)
|
||||
{
|
||||
- Group *g = (Group *) GC_MALLOC(sizeof(Group));
|
||||
+ Group *g = (Group *) malloc(sizeof(Group));
|
||||
|
||||
ser_init(g, &Group_SerType, di->ver);
|
||||
SER_MODIFIED(g);
|
38
devel/opencm/patches.nogc/patch-base_src_common_Mutable_c
Normal file
38
devel/opencm/patches.nogc/patch-base_src_common_Mutable_c
Normal file
@ -0,0 +1,38 @@
|
||||
$OpenBSD: patch-base_src_common_Mutable_c,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/src/common/Mutable.c.orig Sat Mar 29 16:15:29 2003
|
||||
+++ base/src/common/Mutable.c Thu May 22 17:46:42 2003
|
||||
@@ -43,7 +43,7 @@
|
||||
Mutable *
|
||||
mutable_create(const char *name, const char *desc)
|
||||
{
|
||||
- Mutable *m = (Mutable *) GC_MALLOC(sizeof(Mutable));
|
||||
+ Mutable *m = (Mutable *) malloc(sizeof(Mutable));
|
||||
|
||||
ser_init(m, &Mutable_SerType, Mutable_SerType.ver);
|
||||
SER_MODIFIED(m);
|
||||
@@ -134,10 +134,14 @@ void
|
||||
mutable_show(const void *ob)
|
||||
{
|
||||
const Mutable *m = ob;
|
||||
+ char *xstr;
|
||||
|
||||
report(0, "URI: %s\n", m->uri);
|
||||
- report(0, "Sequence No: %s\n", xunsigned64_str(m->seqNo));
|
||||
- report(0, "nRevisions: %s\n", xunsigned64_str(m->nRevisions));
|
||||
+ xstr = xunsigned64_str(m->seqNo);
|
||||
+ report(0, "Sequence No: %s\n", xstr);
|
||||
+ free(xstr);
|
||||
+ xstr = xunsigned64_str(m->nRevisions);
|
||||
+ report(0, "nRevisions: %s\n", xstr);
|
||||
report(0, "Read Group: %s\n", m->readGroupURI);
|
||||
report(0, "Mod Group: %s\n", m->modGroupURI);
|
||||
report(0, "Notify: %s\n", m->notify);
|
||||
@@ -174,7 +178,7 @@ mutable_deserialize(const DeserializeInf
|
||||
{
|
||||
URI *uri;
|
||||
const char *temp;
|
||||
- Mutable *m = (Mutable *) GC_MALLOC(sizeof(Mutable));
|
||||
+ Mutable *m = (Mutable *) malloc(sizeof(Mutable));
|
||||
|
||||
ser_init(m, &Mutable_SerType, di->ver);
|
||||
|
12
devel/opencm/patches.nogc/patch-base_src_common_OS_unix-os_c
Normal file
12
devel/opencm/patches.nogc/patch-base_src_common_OS_unix-os_c
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-base_src_common_OS_unix-os_c,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/src/common/OS/unix-os.c.orig Wed Dec 4 15:22:30 2002
|
||||
+++ base/src/common/OS/unix-os.c Thu May 22 17:46:42 2003
|
||||
@@ -352,7 +352,7 @@ os_validate_local_lockfile(const char *p
|
||||
path, errno));
|
||||
}
|
||||
|
||||
- buf = GC_MALLOC_ATOMIC(statbuf.st_size + 1);
|
||||
+ buf = malloc(statbuf.st_size + 1);
|
||||
read(lfd, buf, statbuf.st_size);
|
||||
buf[statbuf.st_size] = 0;
|
||||
|
@ -0,0 +1,21 @@
|
||||
$OpenBSD: patch-base_src_common_OS_unix-path_c,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/src/common/OS/unix-path.c.orig Fri Feb 7 12:40:19 2003
|
||||
+++ base/src/common/OS/unix-path.c Thu May 22 17:46:42 2003
|
||||
@@ -166,7 +166,7 @@ path_canonical(const char *path)
|
||||
|
||||
len++; /* for trailing null */
|
||||
|
||||
- s = (char *) GC_MALLOC_ATOMIC (sizeof(char) * len);
|
||||
+ s = (char *) malloc (sizeof(char) * len);
|
||||
|
||||
sptr = s;
|
||||
p = path;
|
||||
@@ -372,7 +372,7 @@ struct OC_DIR_st
|
||||
|
||||
OC_DIR* path_opendir(const char* dir_name, OC_bool must_exist)
|
||||
{
|
||||
- OC_DIR* dir = GC_MALLOC(sizeof(OC_DIR));
|
||||
+ OC_DIR* dir = malloc(sizeof(OC_DIR));
|
||||
dir->dir = opendir(dir_name);
|
||||
|
||||
if(!dir->dir)
|
21
devel/opencm/patches.nogc/patch-base_src_common_ObDict_c
Normal file
21
devel/opencm/patches.nogc/patch-base_src_common_ObDict_c
Normal file
@ -0,0 +1,21 @@
|
||||
$OpenBSD: patch-base_src_common_ObDict_c,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/src/common/ObDict.c.orig Wed Jan 1 01:53:25 2003
|
||||
+++ base/src/common/ObDict.c Thu May 22 17:46:42 2003
|
||||
@@ -67,7 +67,7 @@ obdict_check(ObDict *dict)
|
||||
ObDictEntry *
|
||||
ode_create(const char *tn, void *vp, unsigned w)
|
||||
{
|
||||
- ObDictEntry *ode = GC_MALLOC(sizeof(ObDictEntry));
|
||||
+ ObDictEntry *ode = malloc(sizeof(ObDictEntry));
|
||||
ode->trueName = tn;
|
||||
|
||||
ode->tnHash = truename_hash(tn);
|
||||
@@ -82,7 +82,7 @@ ode_create(const char *tn, void *vp, uns
|
||||
ObDict *
|
||||
obdict_create(void)
|
||||
{
|
||||
- ObDict *dict = GC_MALLOC(sizeof(ObDict));
|
||||
+ ObDict *dict = malloc(sizeof(ObDict));
|
||||
return dict;
|
||||
}
|
||||
|
75
devel/opencm/patches.nogc/patch-base_src_common_PtrArray_c
Normal file
75
devel/opencm/patches.nogc/patch-base_src_common_PtrArray_c
Normal file
@ -0,0 +1,75 @@
|
||||
$OpenBSD: patch-base_src_common_PtrArray_c,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/src/common/PtrArray.c.orig Sat Mar 29 16:15:21 2003
|
||||
+++ base/src/common/PtrArray.c Thu May 22 17:46:42 2003
|
||||
@@ -70,7 +70,7 @@ block_fetch(const ObVec* vec, uint32_t i
|
||||
if(((void**)ptr)[block_index] == 0 && h != 1)
|
||||
{
|
||||
uint32_t j;
|
||||
- ((void**)ptr)[block_index] = GC_MALLOC(sizeof(void*) * BLOCK_SIZE);
|
||||
+ ((void**)ptr)[block_index] = malloc(sizeof(void*) * BLOCK_SIZE);
|
||||
for(j = 0; j != BLOCK_SIZE; j++)
|
||||
((void***)ptr)[block_index][j] = 0;
|
||||
}
|
||||
@@ -101,7 +101,7 @@ vec_MaybeGrow(ObVec *vec)
|
||||
if(vec->size == (1 << (L2BS * vec->height)))
|
||||
{
|
||||
uint32_t j;
|
||||
- const void** elem = GC_MALLOC(sizeof(void*) * BLOCK_SIZE);
|
||||
+ const void** elem = malloc(sizeof(void*) * BLOCK_SIZE);
|
||||
|
||||
for(j = 1; j != BLOCK_SIZE; j++)
|
||||
elem[j] = 0;
|
||||
@@ -117,7 +117,7 @@ vvec_fetch(const ObVec* vec, uint32_t in
|
||||
{
|
||||
return block_fetch(vec, index, 0);
|
||||
}
|
||||
-
|
||||
+
|
||||
void
|
||||
obvec_append(ObVec *vec, const void *vp)
|
||||
{
|
||||
@@ -149,7 +149,7 @@ vec_sort_using(void *vec_ptr, int (*cmp)
|
||||
const uint32_t last_used = vec_size(vec) % BLOCK_SIZE;
|
||||
const uint32_t total_blocks = full_blocks + (last_used ? 1 : 0);
|
||||
|
||||
- uint32_t* leaf_index = GC_MALLOC_ATOMIC(sizeof(uint32_t) * total_blocks);
|
||||
+ uint32_t* leaf_index = malloc(sizeof(uint32_t) * total_blocks);
|
||||
|
||||
for(j = 0; j != total_blocks; j++)
|
||||
leaf_index[j] = 0;
|
||||
@@ -336,7 +336,7 @@ init_vector(void *vec_ptr)
|
||||
StrVec *
|
||||
strvec_create(void)
|
||||
{
|
||||
- StrVec *vec = (StrVec *) GC_MALLOC(sizeof(StrVec));
|
||||
+ StrVec *vec = (StrVec *) malloc(sizeof(StrVec));
|
||||
|
||||
ser_init(vec, &StrVec_SerType, StrVec_SerType.ver);
|
||||
SER_MODIFIED(vec);
|
||||
@@ -349,7 +349,7 @@ strvec_create(void)
|
||||
TnVec *
|
||||
tnvec_create(void)
|
||||
{
|
||||
- TnVec *vec = (TnVec *) GC_MALLOC(sizeof(TnVec));
|
||||
+ TnVec *vec = (TnVec *) malloc(sizeof(TnVec));
|
||||
|
||||
ser_init(vec, &TnVec_SerType, TnVec_SerType.ver);
|
||||
SER_MODIFIED(vec);
|
||||
@@ -362,7 +362,7 @@ tnvec_create(void)
|
||||
ObVec *
|
||||
obvec_create()
|
||||
{
|
||||
- ObVec *vec = (ObVec *) GC_MALLOC(sizeof(ObVec));
|
||||
+ ObVec *vec = (ObVec *) malloc(sizeof(ObVec));
|
||||
|
||||
ser_init(vec, &ObVec_SerType, ObVec_SerType.ver);
|
||||
SER_MODIFIED(vec);
|
||||
@@ -564,7 +564,7 @@ strvec_flatten(StrVec *vec)
|
||||
|
||||
cumlen += 1; /* for trailing null */
|
||||
|
||||
- s = GC_MALLOC_ATOMIC(cumlen);
|
||||
+ s = malloc(cumlen);
|
||||
cumlen = 0;
|
||||
|
||||
for (i = 0; i < size; i++) {
|
75
devel/opencm/patches.nogc/patch-base_src_common_PubKey_c
Normal file
75
devel/opencm/patches.nogc/patch-base_src_common_PubKey_c
Normal file
@ -0,0 +1,75 @@
|
||||
$OpenBSD: patch-base_src_common_PubKey_c,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/src/common/PubKey.c.orig Sat Mar 29 16:15:29 2003
|
||||
+++ base/src/common/PubKey.c Thu May 22 17:46:42 2003
|
||||
@@ -78,7 +78,7 @@ pubkey_serialize(SDR_stream *strm, const
|
||||
if ((num = BIO_get_mem_data(inMem, &tmpbuf)) == 0)
|
||||
THROW(ExTruncated, "Cannot recover cert from memory BIO");
|
||||
|
||||
- data = (char *)GC_MALLOC_ATOMIC(sizeof(char) * (num + 1));
|
||||
+ data = (char *)malloc(sizeof(char) * (num + 1));
|
||||
memcpy(data, tmpbuf, num);
|
||||
data[num] = 0;
|
||||
|
||||
@@ -94,7 +94,7 @@ pubkey_serialize(SDR_stream *strm, const
|
||||
void *
|
||||
pubkey_deserialize(const DeserializeInfo *di, SDR_stream *strm)
|
||||
{
|
||||
- PubKey *p = (PubKey *) GC_MALLOC(sizeof(User));
|
||||
+ PubKey *p = (PubKey *) malloc(sizeof(User));
|
||||
|
||||
ser_init(p, &PubKey_SerType, di->ver);
|
||||
SER_MODIFIED(p);
|
||||
@@ -167,7 +167,7 @@ pubkey_isvalid(PubKey *pk)
|
||||
PubKey *
|
||||
pubkey_from_X509(X509 *cert)
|
||||
{
|
||||
- PubKey *p = (PubKey *) GC_MALLOC(sizeof(User));
|
||||
+ PubKey *p = (PubKey *) malloc(sizeof(User));
|
||||
|
||||
ser_init(p, &PubKey_SerType, PubKey_SerType.ver);
|
||||
SER_MODIFIED(p);
|
||||
@@ -202,7 +202,7 @@ pubkey_getid(PubKey *pk)
|
||||
ERR_reason_error_string(ERR_get_error())));
|
||||
|
||||
/* Now allocate enough space for a string-ified version of tmpbuf*/
|
||||
- data = (char *)GC_MALLOC_ATOMIC(sizeof(char) * (num + 1));
|
||||
+ data = (char *)malloc(sizeof(char) * (num + 1));
|
||||
memcpy(data, tmpbuf, num);
|
||||
data[num] = 0; /* null-terminate the string */
|
||||
|
||||
@@ -218,7 +218,7 @@ PubKey *
|
||||
pubkey_from_PemFile(const char *fileName)
|
||||
{
|
||||
FILE *f = NULL;
|
||||
- PubKey *p = (PubKey *) GC_MALLOC(sizeof(User));
|
||||
+ PubKey *p = (PubKey *) malloc(sizeof(User));
|
||||
TRY {
|
||||
f = xfopen(fileName, 'r', 't');
|
||||
|
||||
@@ -255,7 +255,7 @@ pubkey_GetExpiration(PubKey *pk)
|
||||
ASN1_TIME_print(inMem, X509_get_notAfter(pk->keys.x509_cert));
|
||||
num = BIO_get_mem_data(inMem, &tmpbuf);
|
||||
|
||||
- expires = (char *)GC_MALLOC_ATOMIC(sizeof(char) * (num + 1));
|
||||
+ expires = (char *)malloc(sizeof(char) * (num + 1));
|
||||
memcpy(expires, tmpbuf, num);
|
||||
expires[num] = 0;
|
||||
|
||||
@@ -273,7 +273,7 @@ pubkey_GetExpiration(PubKey *pk)
|
||||
}
|
||||
}
|
||||
|
||||
-const char *
|
||||
+char *
|
||||
pubkey_GetEmail(PubKey *pk)
|
||||
{
|
||||
if(pk == 0)
|
||||
@@ -284,7 +284,7 @@ pubkey_GetEmail(PubKey *pk)
|
||||
{
|
||||
X509 *x = pk->keys.x509_cert;
|
||||
STACK* emails;
|
||||
- const char* email = 0;
|
||||
+ char* email = 0;
|
||||
|
||||
emails = X509_get1_email(x);
|
||||
|
11
devel/opencm/patches.nogc/patch-base_src_common_PubKey_h
Normal file
11
devel/opencm/patches.nogc/patch-base_src_common_PubKey_h
Normal file
@ -0,0 +1,11 @@
|
||||
$OpenBSD: patch-base_src_common_PubKey_h,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/src/common/PubKey.h.orig Wed Jan 1 01:53:25 2003
|
||||
+++ base/src/common/PubKey.h Thu May 22 17:46:42 2003
|
||||
@@ -65,6 +65,6 @@ const char *pubkey_GetExpiration(PubKey
|
||||
#if 0
|
||||
const char *pubkey_GetName(PubKey *pk, const char *fallback);
|
||||
#endif
|
||||
-const char *pubkey_GetEmail(PubKey *pk);
|
||||
+char *pubkey_GetEmail(PubKey *pk);
|
||||
|
||||
#endif /* COMMON_PUBKEY_H */
|
21
devel/opencm/patches.nogc/patch-base_src_common_Revision_c
Normal file
21
devel/opencm/patches.nogc/patch-base_src_common_Revision_c
Normal file
@ -0,0 +1,21 @@
|
||||
$OpenBSD: patch-base_src_common_Revision_c,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/src/common/Revision.c.orig Sat Mar 29 16:15:29 2003
|
||||
+++ base/src/common/Revision.c Thu May 22 17:46:42 2003
|
||||
@@ -71,7 +71,7 @@ revision_serialize(SDR_stream *strm, con
|
||||
void *
|
||||
revision_deserialize(const DeserializeInfo *di, SDR_stream *strm)
|
||||
{
|
||||
- Revision *r = (Revision *) GC_MALLOC(sizeof(Revision));
|
||||
+ Revision *r = (Revision *) malloc(sizeof(Revision));
|
||||
|
||||
ser_init(r, &Revision_SerType, di->ver);
|
||||
|
||||
@@ -103,7 +103,7 @@ Revision *
|
||||
revision_create(const char *mutURI, const char *userName,
|
||||
const char *trueName)
|
||||
{
|
||||
- Revision *r = (Revision *)GC_MALLOC(sizeof(Revision));
|
||||
+ Revision *r = (Revision *)malloc(sizeof(Revision));
|
||||
|
||||
ser_init(r, &Revision_SerType, Revision_SerType.ver);
|
||||
|
254
devel/opencm/patches.nogc/patch-base_src_common_SDR_c
Normal file
254
devel/opencm/patches.nogc/patch-base_src_common_SDR_c
Normal file
@ -0,0 +1,254 @@
|
||||
$OpenBSD: patch-base_src_common_SDR_c,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/src/common/SDR.c.orig Sun Apr 6 16:03:43 2003
|
||||
+++ base/src/common/SDR.c Thu May 22 17:46:42 2003
|
||||
@@ -100,13 +100,14 @@ static ocmoff_t file_stream_gets(SDR_str
|
||||
static Buffer *file_stream_asBuffer(SDR_stream *s);
|
||||
static void file_stream_reread(SDR_stream *s);
|
||||
static void file_stream_close(SDR_stream *s);
|
||||
+typedef uintptr_t * GC_PTR;
|
||||
static void file_stream_finalizer(GC_PTR obj, GC_PTR data);
|
||||
|
||||
static SDR_stream*
|
||||
stream_openfile(const char *fileName, uint32_t mode, uint32_t format)
|
||||
{
|
||||
FILE *f;
|
||||
- SDR_stream *strm = (SDR_stream *) GC_MALLOC(sizeof(SDR_stream));
|
||||
+ SDR_stream *strm = (SDR_stream *) malloc(sizeof(SDR_stream));
|
||||
|
||||
assert(mode == MODE_RSTREAM || mode == MODE_WSTREAM);
|
||||
|
||||
@@ -129,7 +130,7 @@ stream_openfile(const char *fileName, ui
|
||||
strm->state = f;
|
||||
|
||||
#ifdef NEW_FILE_STREAM
|
||||
- strm->rwbuf = GC_MALLOC_ATOMIC(RWBUFSZ);
|
||||
+ strm->rwbuf = malloc(RWBUFSZ);
|
||||
if (mode == MODE_WSTREAM) {
|
||||
strm->rwlim = strm->rwbuf + RWBUFSZ;
|
||||
strm->rwptr = strm->rwbuf;
|
||||
@@ -154,8 +155,6 @@ stream_openfile(const char *fileName, ui
|
||||
strm->reread = file_stream_reread;
|
||||
strm->close = file_stream_close;
|
||||
|
||||
- GC_REGISTER_FINALIZER(strm, file_stream_finalizer, 0, 0, 0);
|
||||
-
|
||||
return strm;
|
||||
}
|
||||
|
||||
@@ -352,7 +351,7 @@ static void mem_stream_close(SDR_stream
|
||||
SDR_stream*
|
||||
stream_createMemory(uint32_t format)
|
||||
{
|
||||
- SDR_stream *strm = (SDR_stream *) GC_MALLOC(sizeof(SDR_stream));
|
||||
+ SDR_stream *strm = (SDR_stream *) malloc(sizeof(SDR_stream));
|
||||
|
||||
strm->name = "<memory (out)>";
|
||||
strm->mode = MODE_WSTREAM;
|
||||
@@ -366,7 +365,7 @@ stream_createMemory(uint32_t format)
|
||||
strm->state = 0;
|
||||
|
||||
#ifdef NEW_MEMORY_STREAM
|
||||
- strm->rwbuf = GC_MALLOC_ATOMIC(RWBUFSZ);
|
||||
+ strm->rwbuf = malloc(RWBUFSZ);
|
||||
strm->rwlim = strm->rwbuf + RWBUFSZ;
|
||||
strm->rwptr = strm->rwbuf;
|
||||
|
||||
@@ -400,7 +399,7 @@ stream_createMemory(uint32_t format)
|
||||
SDR_stream*
|
||||
stream_fromMemory(const char *buffer, uint32_t len, uint32_t format)
|
||||
{
|
||||
- SDR_stream *strm = (SDR_stream *) GC_MALLOC(sizeof(SDR_stream));
|
||||
+ SDR_stream *strm = (SDR_stream *) malloc(sizeof(SDR_stream));
|
||||
|
||||
strm->name = "<memory (in)>";
|
||||
strm->mode = MODE_RSTREAM;
|
||||
@@ -416,7 +415,7 @@ stream_fromMemory(const char *buffer, ui
|
||||
strm->state = 0;
|
||||
|
||||
#ifdef NEW_MEMORY_STREAM
|
||||
- strm->rwbuf = GC_MALLOC_ATOMIC(RWBUFSZ);
|
||||
+ strm->rwbuf = malloc(RWBUFSZ);
|
||||
strm->rwlim = strm->rwbuf + len;
|
||||
strm->rwptr = strm->rwbuf;
|
||||
|
||||
@@ -461,9 +460,9 @@ mem_stream_wflush(SDR_stream *s)
|
||||
assert(bufLen > 0);
|
||||
|
||||
if (s->state)
|
||||
- s->state = GC_REALLOC(s->state, s->len + bufLen);
|
||||
+ s->state = realloc(s->state, s->len + bufLen);
|
||||
else
|
||||
- s->state = GC_MALLOC_ATOMIC(RWBUFSZ);
|
||||
+ s->state = malloc(RWBUFSZ);
|
||||
|
||||
memcpy(((char *)s->state) + s->len, s->rwbuf, bufLen);
|
||||
|
||||
@@ -498,9 +497,9 @@ mem_stream_putc(SDR_stream *s, int c)
|
||||
if (s->bound == s->len) {
|
||||
s->bound += RWBUFSZ;
|
||||
if (bp)
|
||||
- bp = GC_REALLOC(bp, s->bound);
|
||||
+ bp = realloc(bp, s->bound);
|
||||
else
|
||||
- bp = GC_MALLOC_ATOMIC(s->bound);
|
||||
+ bp = malloc(s->bound);
|
||||
}
|
||||
bp[s->len] = c;
|
||||
|
||||
@@ -529,9 +528,9 @@ mem_stream_puts(SDR_stream *s, const voi
|
||||
while (s->bound < s->len + len)
|
||||
s->bound += RWBUFSZ;
|
||||
if (bp)
|
||||
- bp = GC_REALLOC(bp, s->bound);
|
||||
+ bp = realloc(bp, s->bound);
|
||||
else
|
||||
- bp = GC_MALLOC_ATOMIC(s->bound);
|
||||
+ bp = malloc(s->bound);
|
||||
}
|
||||
|
||||
memcpy(&bp[s->pos], vp, len);
|
||||
@@ -649,7 +648,7 @@ static Buffer *buf_stream_asBuffer(SDR_s
|
||||
SDR_stream*
|
||||
stream_createBuffer(uint32_t format)
|
||||
{
|
||||
- SDR_stream *strm = (SDR_stream *) GC_MALLOC(sizeof(SDR_stream));
|
||||
+ SDR_stream *strm = (SDR_stream *) malloc(sizeof(SDR_stream));
|
||||
|
||||
strm->name = "<buffer (in)>";
|
||||
strm->mode = MODE_WSTREAM;
|
||||
@@ -663,7 +662,7 @@ stream_createBuffer(uint32_t format)
|
||||
strm->state = buffer_create();
|
||||
|
||||
#ifdef NEW_BUFFERED_STREAM
|
||||
- strm->rwbuf = GC_MALLOC_ATOMIC(RWBUFSZ);
|
||||
+ strm->rwbuf = malloc(RWBUFSZ);
|
||||
strm->rwlim = strm->rwbuf + RWBUFSZ;
|
||||
strm->rwptr = strm->rwbuf;
|
||||
|
||||
@@ -697,7 +696,7 @@ stream_createBuffer(uint32_t format)
|
||||
SDR_stream*
|
||||
stream_fromBuffer(Buffer *buffer, uint32_t format)
|
||||
{
|
||||
- SDR_stream *strm = (SDR_stream *) GC_MALLOC(sizeof(SDR_stream));
|
||||
+ SDR_stream *strm = (SDR_stream *) malloc(sizeof(SDR_stream));
|
||||
|
||||
strm->name = "<buffer (in)>";
|
||||
strm->mode = MODE_RSTREAM;
|
||||
@@ -712,7 +711,7 @@ stream_fromBuffer(Buffer *buffer, uint32
|
||||
strm->rwbuf = strm->rwlim = strm->rwptr = 0;
|
||||
|
||||
#ifdef NEW_BUFFERED_STREAM
|
||||
- strm->rwbuf = GC_MALLOC_ATOMIC(RWBUFSZ);
|
||||
+ strm->rwbuf = malloc(RWBUFSZ);
|
||||
strm->rwlim = strm->rwptr = strm->rwbuf; /* force rfill */
|
||||
|
||||
strm->wflush = buf_stream_wflush;
|
||||
@@ -899,7 +898,7 @@ static void sha1_stream_close(SDR_stream
|
||||
SDR_stream*
|
||||
stream_create_sha1(void)
|
||||
{
|
||||
- SDR_stream *strm = (SDR_stream *) GC_MALLOC(sizeof(SDR_stream));
|
||||
+ SDR_stream *strm = (SDR_stream *) malloc(sizeof(SDR_stream));
|
||||
|
||||
strm->name = "<sha1 (out)>";
|
||||
strm->mode = MODE_WSTREAM;
|
||||
@@ -916,7 +915,7 @@ stream_create_sha1(void)
|
||||
#endif
|
||||
|
||||
#ifdef NEW_MEMORY_STREAM
|
||||
- strm->rwbuf = GC_MALLOC_ATOMIC(RWBUFSZ);
|
||||
+ strm->rwbuf = malloc(RWBUFSZ);
|
||||
strm->rwlim = strm->rwbuf + RWBUFSZ;
|
||||
strm->rwptr = strm->rwbuf;
|
||||
|
||||
@@ -1390,10 +1389,10 @@ stream_printf(SDR_stream *s, const char
|
||||
return output_count;
|
||||
}
|
||||
|
||||
-const char *
|
||||
+char *
|
||||
format(const char *fmt, ...)
|
||||
{
|
||||
- const char *str;
|
||||
+ char *str;
|
||||
|
||||
SDR_stream *s = stream_createMemory(SDR_RAW);
|
||||
|
||||
@@ -1984,7 +1983,7 @@ bin_w_bytes(const char *elem, SDR_stream
|
||||
static void *
|
||||
bin_r_bytes(const char *elem, SDR_stream *strm, uint32_t len)
|
||||
{
|
||||
- char * s = (char *) GC_MALLOC_ATOMIC(sizeof(char) * (len+1));
|
||||
+ char * s = (char *) malloc(sizeof(char) * (len+1));
|
||||
s[len] = 0;
|
||||
|
||||
if (stream_read(strm, s, len) < len)
|
||||
@@ -2032,7 +2031,7 @@ bin_r_string(const char *elem, SDR_strea
|
||||
if (len == 0)
|
||||
return 0;
|
||||
else {
|
||||
- char * s = (char *) GC_MALLOC_ATOMIC (sizeof(char) * len);
|
||||
+ char * s = (char *) malloc (sizeof(char) * len);
|
||||
s[len-1] = 0;
|
||||
|
||||
if (stream_read(strm, s, len) < len)
|
||||
@@ -2068,7 +2067,7 @@ bin_r_obname(const char *elem, SDR_strea
|
||||
if (len == 0)
|
||||
return 0;
|
||||
else {
|
||||
- char * s = (char *) GC_MALLOC_ATOMIC (sizeof(char) * len);
|
||||
+ char * s = (char *) malloc (sizeof(char) * len);
|
||||
s[len-1] = 0;
|
||||
|
||||
if (stream_read(strm, s, len) < len)
|
||||
@@ -2179,7 +2178,7 @@ static texty_field*
|
||||
texty_get_field(const char *name, char ty, SDR_stream *strm)
|
||||
{
|
||||
int c;
|
||||
- texty_field* fld = (texty_field *) GC_MALLOC(sizeof(texty_field));
|
||||
+ texty_field* fld = (texty_field *) malloc(sizeof(texty_field));
|
||||
|
||||
/* Skip leading whitespace: */
|
||||
while(stream_peekc(strm) == ' ')
|
||||
@@ -2352,8 +2351,9 @@ texty_r_u32(const char *elem, SDR_stream
|
||||
static void
|
||||
texty_w_u64(const char *elem, SDR_stream *strm, uint64_t num)
|
||||
{
|
||||
+ char *nstr = xunsigned64_str(num);
|
||||
texty_do_indent(strm);
|
||||
- stream_printf(strm, "%s L %s\n", elem, xunsigned64_str(num));
|
||||
+ stream_printf(strm, "%s L %s\n", elem, nstr);
|
||||
}
|
||||
|
||||
static uint64_t
|
||||
@@ -2387,9 +2387,11 @@ static void
|
||||
texty_w_buffer(const char *elem, SDR_stream *strm, const Buffer *buf)
|
||||
{
|
||||
ocmoff_t len = buffer_length(buf);
|
||||
+ char *lstr = xunsigned64_str(len + 1);
|
||||
texty_do_indent(strm);
|
||||
|
||||
- stream_printf(strm, "%s X %s", elem, xunsigned64_str(len + 1));
|
||||
+ stream_printf(strm, "%s X %s", elem, lstr);
|
||||
+ free(lstr);
|
||||
stream_putc(strm, '\n');
|
||||
|
||||
if (len) {
|
||||
@@ -2542,7 +2544,7 @@ encodeString(const void *vp, ocmoff_t le
|
||||
{
|
||||
ocmoff_t u;
|
||||
unsigned const char *bp = vp;
|
||||
- unsigned char *ostring = GC_MALLOC_ATOMIC(encodedLen + 1);
|
||||
+ unsigned char *ostring = malloc(encodedLen + 1);
|
||||
unsigned char *op = ostring;
|
||||
|
||||
ostring[encodedLen] = 0;
|
||||
@@ -2661,7 +2663,7 @@ dtexty_get_field(const char *name, char
|
||||
if(ty == 'S' || ty == 'B' || ty == 'N' || ty == 'O')
|
||||
{
|
||||
/* The decoded length cannot possibly be longer than the encoded length */
|
||||
- char* decoded_rep = GC_MALLOC_ATOMIC(fld->value);
|
||||
+ char* decoded_rep = malloc(fld->value);
|
||||
char* start_of_decoded_rep = decoded_rep;
|
||||
char* encoded_rep = fld->rep;
|
||||
|
11
devel/opencm/patches.nogc/patch-base_src_common_SDR_h
Normal file
11
devel/opencm/patches.nogc/patch-base_src_common_SDR_h
Normal file
@ -0,0 +1,11 @@
|
||||
$OpenBSD: patch-base_src_common_SDR_h,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/src/common/SDR.h.orig Sun Apr 6 16:03:43 2003
|
||||
+++ base/src/common/SDR.h Thu May 22 17:46:42 2003
|
||||
@@ -224,6 +224,6 @@ void sdr_nshow(const void *);
|
||||
/* Format the print-style arguments into a dynamically allocated
|
||||
string. This is a wrapper for stream_vprintf(), intended for use
|
||||
with the exceptions package to format the explanation string. */
|
||||
-const char *format(const char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
|
||||
+char *format(const char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
|
||||
|
||||
#endif /* COMMON_SDR_H */
|
@ -0,0 +1,21 @@
|
||||
$OpenBSD: patch-base_src_common_ServerReply_c,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/src/common/ServerReply.c.orig Sat Mar 29 16:15:20 2003
|
||||
+++ base/src/common/ServerReply.c Thu May 22 17:46:42 2003
|
||||
@@ -85,7 +85,7 @@ reply_serialize(SDR_stream *strm, const
|
||||
void *
|
||||
reply_deserialize(const DeserializeInfo *di, SDR_stream *strm)
|
||||
{
|
||||
- Reply *r = (Reply *) GC_MALLOC(sizeof(Reply));
|
||||
+ Reply *r = (Reply *) malloc(sizeof(Reply));
|
||||
|
||||
ser_init(r, &Reply_SerType, di->ver);
|
||||
r->reqID = sdr_r_u32("reqid", strm);
|
||||
@@ -106,7 +106,7 @@ reply_mark(Repository *r, const void *co
|
||||
Reply *
|
||||
reply_create(uint32_t reqid, Serializable *s)
|
||||
{
|
||||
- Reply *r = (Reply *) GC_MALLOC(sizeof(Reply));
|
||||
+ Reply *r = (Reply *) malloc(sizeof(Reply));
|
||||
|
||||
ser_init(r, &Reply_SerType, Reply_SerType.ver);
|
||||
|
@ -0,0 +1,21 @@
|
||||
$OpenBSD: patch-base_src_common_ServerRequest_c,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/src/common/ServerRequest.c.orig Sat Mar 29 16:15:31 2003
|
||||
+++ base/src/common/ServerRequest.c Thu May 22 17:46:42 2003
|
||||
@@ -56,7 +56,7 @@ request_serialize(SDR_stream *strm, cons
|
||||
void *
|
||||
request_deserialize(const DeserializeInfo *di, SDR_stream *strm)
|
||||
{
|
||||
- Request *p = (Request *) GC_MALLOC(sizeof(Request));
|
||||
+ Request *p = (Request *) malloc(sizeof(Request));
|
||||
|
||||
ser_init(p, &Request_SerType, di->ver);
|
||||
p->opcode = sdr_r_u32("opcode", strm);
|
||||
@@ -78,7 +78,7 @@ request_mark(Repository *r, const void *
|
||||
Request *
|
||||
request_create(uint32_t ocode, uint32_t reqid)
|
||||
{
|
||||
- Request *p = (Request *) GC_MALLOC(sizeof(Request));
|
||||
+ Request *p = (Request *) malloc(sizeof(Request));
|
||||
|
||||
ser_init(p, &Request_SerType, Request_SerType.ver);
|
||||
|
20
devel/opencm/patches.nogc/patch-base_src_common_SubProcess_c
Normal file
20
devel/opencm/patches.nogc/patch-base_src_common_SubProcess_c
Normal file
@ -0,0 +1,20 @@
|
||||
$OpenBSD: patch-base_src_common_SubProcess_c,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/src/common/SubProcess.c.orig Sat Mar 29 16:15:30 2003
|
||||
+++ base/src/common/SubProcess.c Thu May 22 17:46:42 2003
|
||||
@@ -47,14 +47,14 @@ maybe_grow_argv(SubProcess *proc)
|
||||
{
|
||||
if (proc->narg == proc->maxarg) {
|
||||
proc->maxarg += 64;
|
||||
- proc->argv = GC_REALLOC(proc->argv, sizeof(char *) * proc->maxarg);
|
||||
+ proc->argv = realloc(proc->argv, sizeof(char *) * proc->maxarg);
|
||||
}
|
||||
}
|
||||
|
||||
SubProcess *
|
||||
subprocess_create(void)
|
||||
{
|
||||
- SubProcess *proc = GC_MALLOC(sizeof(SubProcess));
|
||||
+ SubProcess *proc = malloc(sizeof(SubProcess));
|
||||
|
||||
proc->narg = 0;
|
||||
proc->maxarg = 0;
|
12
devel/opencm/patches.nogc/patch-base_src_common_URI_c
Normal file
12
devel/opencm/patches.nogc/patch-base_src_common_URI_c
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-base_src_common_URI_c,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/src/common/URI.c.orig Mon Jan 13 23:42:07 2003
|
||||
+++ base/src/common/URI.c Thu May 22 17:46:42 2003
|
||||
@@ -60,7 +60,7 @@ uri_create(const char *uri_str)
|
||||
{
|
||||
char *s;
|
||||
|
||||
- URI *uri = (URI *) GC_MALLOC(sizeof(URI));
|
||||
+ URI *uri = (URI *) malloc(sizeof(URI));
|
||||
|
||||
uri->URI = xstrdup(uri_str);
|
||||
|
48
devel/opencm/patches.nogc/patch-base_src_common_User_c
Normal file
48
devel/opencm/patches.nogc/patch-base_src_common_User_c
Normal file
@ -0,0 +1,48 @@
|
||||
$OpenBSD: patch-base_src_common_User_c,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/src/common/User.c.orig Sat Mar 29 16:15:30 2003
|
||||
+++ base/src/common/User.c Thu May 22 17:46:42 2003
|
||||
@@ -61,7 +61,7 @@ user_serialize(SDR_stream *strm, const v
|
||||
void *
|
||||
user_deserialize(const DeserializeInfo *di, SDR_stream *strm)
|
||||
{
|
||||
- User *u = (User *) GC_MALLOC(sizeof(User));
|
||||
+ User *u = (User *) malloc(sizeof(User));
|
||||
|
||||
ser_init(u, &User_SerType, di->ver);
|
||||
|
||||
@@ -86,7 +86,7 @@ user_mark(Repository *r, const void *con
|
||||
User *
|
||||
user_create(PubKey *pk, const char *dirURI)
|
||||
{
|
||||
- User *u = (User *) GC_MALLOC(sizeof(User));
|
||||
+ User *u = (User *) malloc(sizeof(User));
|
||||
|
||||
ser_init(u, &User_SerType, User_SerType.ver);
|
||||
|
||||
@@ -100,7 +100,7 @@ user_create(PubKey *pk, const char *dirU
|
||||
User *
|
||||
user_dup(User *u)
|
||||
{
|
||||
- User *newU = (User *) GC_MALLOC(sizeof(User));
|
||||
+ User *newU = (User *) malloc(sizeof(User));
|
||||
memcpy(newU, u, sizeof(*u));
|
||||
|
||||
return newU;
|
||||
@@ -113,7 +113,7 @@ user_create(X509 *x)
|
||||
long num = 0;
|
||||
void *tmpbuf = NULL;
|
||||
char *data;
|
||||
- User *p = (User *) GC_MALLOC(sizeof(User));
|
||||
+ User *p = (User *) malloc(sizeof(User));
|
||||
BIO *inMem = BIO_new(BIO_s_mem());
|
||||
|
||||
if (x == NULL)
|
||||
@@ -125,7 +125,7 @@ user_create(X509 *x)
|
||||
if ((num = BIO_get_mem_data(inMem, &tmpbuf)) == 0)
|
||||
return NULL;
|
||||
|
||||
- data = (char *)GC_MALLOC_ATOMIC(sizeof(char) * (num + 1));
|
||||
+ data = (char *)malloc(sizeof(char) * (num + 1));
|
||||
memcpy(data, tmpbuf, num);
|
||||
data[num] = 0;
|
||||
|
12
devel/opencm/patches.nogc/patch-base_src_common_Version_c
Normal file
12
devel/opencm/patches.nogc/patch-base_src_common_Version_c
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-base_src_common_Version_c,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/src/common/Version.c.orig Sat Mar 29 16:15:21 2003
|
||||
+++ base/src/common/Version.c Thu May 22 17:46:42 2003
|
||||
@@ -43,7 +43,7 @@
|
||||
Version *
|
||||
version_create(const char *cfgName, uint64_t rev)
|
||||
{
|
||||
- Version *v = (Version *) GC_MALLOC(sizeof(Version));
|
||||
+ Version *v = (Version *) malloc(sizeof(Version));
|
||||
|
||||
ser_init(v, &Version_SerType, Version_SerType.ver);
|
||||
v->cfgName = cfgName;
|
21
devel/opencm/patches.nogc/patch-base_src_common_WireDelta_c
Normal file
21
devel/opencm/patches.nogc/patch-base_src_common_WireDelta_c
Normal file
@ -0,0 +1,21 @@
|
||||
$OpenBSD: patch-base_src_common_WireDelta_c,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/src/common/WireDelta.c.orig Sat Mar 29 16:15:33 2003
|
||||
+++ base/src/common/WireDelta.c Thu May 22 17:46:42 2003
|
||||
@@ -53,7 +53,7 @@ void *
|
||||
wireDelta_deserialize(const DeserializeInfo *di, SDR_stream *strm)
|
||||
{
|
||||
WireDelta *wdl =
|
||||
- (WireDelta *) GC_MALLOC(sizeof(WireDelta));
|
||||
+ (WireDelta *) malloc(sizeof(WireDelta));
|
||||
|
||||
ser_init(wdl, &WireDelta_SerType, di->ver);
|
||||
wdl->baseTrueName = sdr_r_obname("baseTrueName", strm);
|
||||
@@ -76,7 +76,7 @@ WireDelta *
|
||||
wireDelta_create(const char *baseTN, Buffer *b)
|
||||
{
|
||||
WireDelta *wdl =
|
||||
- (WireDelta *) GC_MALLOC(sizeof(WireDelta));
|
||||
+ (WireDelta *) malloc(sizeof(WireDelta));
|
||||
|
||||
ser_init(wdl, &WireDelta_SerType, WireDelta_SerType.ver);
|
||||
wdl->baseTrueName = baseTN;
|
@ -0,0 +1,21 @@
|
||||
$OpenBSD: patch-base_src_common_WireException_c,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/src/common/WireException.c.orig Sat Mar 29 16:15:25 2003
|
||||
+++ base/src/common/WireException.c Thu May 22 17:46:42 2003
|
||||
@@ -56,7 +56,7 @@ void *
|
||||
wireExcpt_deserialize(const DeserializeInfo *di, SDR_stream *strm)
|
||||
{
|
||||
WireException *ex =
|
||||
- (WireException *) GC_MALLOC(sizeof(WireException));
|
||||
+ (WireException *) malloc(sizeof(WireException));
|
||||
|
||||
ser_init(ex, &WireException_SerType, di->ver);
|
||||
ex->name = sdr_r_string("name", strm);
|
||||
@@ -82,7 +82,7 @@ wireExcpt_create(Exception excpt, const
|
||||
uint32_t line, const char *str)
|
||||
{
|
||||
WireException *ex =
|
||||
- (WireException *) GC_MALLOC(sizeof(WireException));
|
||||
+ (WireException *) malloc(sizeof(WireException));
|
||||
|
||||
ser_init(ex, &WireException_SerType, WireException_SerType.ver);
|
||||
|
21
devel/opencm/patches.nogc/patch-base_src_common_WireString_c
Normal file
21
devel/opencm/patches.nogc/patch-base_src_common_WireString_c
Normal file
@ -0,0 +1,21 @@
|
||||
$OpenBSD: patch-base_src_common_WireString_c,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/src/common/WireString.c.orig Sat Mar 29 16:15:26 2003
|
||||
+++ base/src/common/WireString.c Thu May 22 17:46:42 2003
|
||||
@@ -52,7 +52,7 @@ wires_serialize(SDR_stream *strm, const
|
||||
void *
|
||||
wires_deserialize(const DeserializeInfo *di, SDR_stream *strm)
|
||||
{
|
||||
- WireString *p = (WireString *) GC_MALLOC(sizeof(WireString));
|
||||
+ WireString *p = (WireString *) malloc(sizeof(WireString));
|
||||
|
||||
ser_init(p, &WireString_SerType, di->ver);
|
||||
p->value = sdr_r_string("value", strm);
|
||||
@@ -73,7 +73,7 @@ wires_mark(Repository *r, const void *co
|
||||
WireString *
|
||||
wires_create(const char *argument)
|
||||
{
|
||||
- WireString *p = (WireString *) GC_MALLOC(sizeof(WireString));
|
||||
+ WireString *p = (WireString *) malloc(sizeof(WireString));
|
||||
|
||||
ser_init(p, &WireString_SerType, WireString_SerType.ver);
|
||||
|
@ -0,0 +1,21 @@
|
||||
$OpenBSD: patch-base_src_common_WireUnsigned_c,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/src/common/WireUnsigned.c.orig Sat Mar 29 16:15:19 2003
|
||||
+++ base/src/common/WireUnsigned.c Thu May 22 17:46:42 2003
|
||||
@@ -52,7 +52,7 @@ wireu_serialize(SDR_stream *strm, const
|
||||
void *
|
||||
wireu_deserialize(const DeserializeInfo *di, SDR_stream *strm)
|
||||
{
|
||||
- WireUnsigned *p = (WireUnsigned *) GC_MALLOC(sizeof(WireUnsigned));
|
||||
+ WireUnsigned *p = (WireUnsigned *) malloc(sizeof(WireUnsigned));
|
||||
|
||||
ser_init(p, &WireUnsigned_SerType, di->ver);
|
||||
p->value = sdr_r_u64("value", strm);
|
||||
@@ -71,7 +71,7 @@ wireu_mark(Repository *r, const void *co
|
||||
WireUnsigned *
|
||||
wireu_create(uint64_t argument)
|
||||
{
|
||||
- WireUnsigned *p = (WireUnsigned *) GC_MALLOC(sizeof(WireUnsigned));
|
||||
+ WireUnsigned *p = (WireUnsigned *) malloc(sizeof(WireUnsigned));
|
||||
|
||||
ser_init(p, &WireUnsigned_SerType, WireUnsigned_SerType.ver);
|
||||
p->value = argument;
|
39
devel/opencm/patches.nogc/patch-base_src_common_encode_c
Normal file
39
devel/opencm/patches.nogc/patch-base_src_common_encode_c
Normal file
@ -0,0 +1,39 @@
|
||||
$OpenBSD: patch-base_src_common_encode_c,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/src/common/encode.c.orig Wed Jan 1 01:53:28 2003
|
||||
+++ base/src/common/encode.c Thu May 22 17:46:42 2003
|
||||
@@ -68,7 +68,7 @@ b64_decode(const char *s, uint32_t *inle
|
||||
{
|
||||
uint32_t len = *inlen;
|
||||
uint32_t outlen = (len * 6) / 8;
|
||||
- unsigned char *outbuf = GC_MALLOC_ATOMIC(outlen);
|
||||
+ unsigned char *outbuf = malloc(outlen);
|
||||
char *pBuf = outbuf;
|
||||
|
||||
while (len) {
|
||||
@@ -123,7 +123,7 @@ b64_encode(const void *vp, uint32_t len)
|
||||
{
|
||||
unsigned const char *cp = vp;
|
||||
uint32_t outlen = (len*8 + 5) / 6;
|
||||
- char *outbuf = GC_MALLOC_ATOMIC(outlen + 1);
|
||||
+ char *outbuf = malloc(outlen + 1);
|
||||
char *pBuf = outbuf;
|
||||
|
||||
while (len) {
|
||||
@@ -184,7 +184,7 @@ hex_decode(const char *s, uint32_t *len)
|
||||
THROW(ExMalformed, "Hexadecimal strings must be even length");
|
||||
|
||||
*len = z / 2;
|
||||
- b = GC_MALLOC_ATOMIC(*len);
|
||||
+ b = malloc(*len);
|
||||
|
||||
w = 0;
|
||||
for (u = 0; u < z; u=u+2) {
|
||||
@@ -207,7 +207,7 @@ hex_encode(const void *vp, uint32_t len)
|
||||
static char *hex_digits = "0123456789abcdef";
|
||||
uint32_t u, w;
|
||||
const unsigned char *buf = vp;
|
||||
- char *b = GC_MALLOC_ATOMIC(2*len+1);
|
||||
+ char *b = malloc(2*len+1);
|
||||
|
||||
w = 0;
|
||||
for (u = 0; u < len; u++) {
|
12
devel/opencm/patches.nogc/patch-base_src_common_except_c
Normal file
12
devel/opencm/patches.nogc/patch-base_src_common_except_c
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-base_src_common_except_c,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/src/common/except.c.orig Sat Mar 29 16:15:23 2003
|
||||
+++ base/src/common/except.c Thu May 22 17:46:42 2003
|
||||
@@ -103,7 +103,7 @@ _throw(catch_t *_cb, const char *fname,
|
||||
void
|
||||
onthrow_remove(const char *path)
|
||||
{
|
||||
- excpt_unwind *uw = GC_MALLOC(sizeof(excpt_unwind));
|
||||
+ excpt_unwind *uw = malloc(sizeof(excpt_unwind));
|
||||
uw->isArmed = TRUE;
|
||||
uw->path = xstrdup(path);
|
||||
|
30
devel/opencm/patches.nogc/patch-base_src_common_path_c
Normal file
30
devel/opencm/patches.nogc/patch-base_src_common_path_c
Normal file
@ -0,0 +1,30 @@
|
||||
$OpenBSD: patch-base_src_common_path_c,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/src/common/path.c.orig Mon Mar 31 10:29:20 2003
|
||||
+++ base/src/common/path.c Thu May 22 17:46:42 2003
|
||||
@@ -137,7 +137,7 @@ path_join(const char *dir, const char *t
|
||||
THROW(ExNullArg, "no tail to path_join()");
|
||||
|
||||
s =
|
||||
- (char *) GC_MALLOC_ATOMIC(sizeof(char) * (strlen(dir) + strlen(tail) + 2));
|
||||
+ (char *) malloc(sizeof(char) * (strlen(dir) + strlen(tail) + 2));
|
||||
|
||||
strcpy(s, dir);
|
||||
strcat(s, "/");
|
||||
@@ -318,7 +318,7 @@ path_current_directory()
|
||||
#else
|
||||
int len = 255; /* POSIX guarantees this (or does it?) */
|
||||
#endif
|
||||
- char * dir = (char *) GC_MALLOC_ATOMIC(sizeof(char) * len);
|
||||
+ char * dir = (char *) malloc(sizeof(char) * len);
|
||||
char *cwd;
|
||||
|
||||
do {
|
||||
@@ -326,7 +326,7 @@ path_current_directory()
|
||||
if (cwd == NULL) {
|
||||
if (errno == ERANGE) {
|
||||
len *= 2;
|
||||
- dir = (char *) GC_MALLOC_ATOMIC(sizeof(char) * len);
|
||||
+ dir = (char *) malloc(sizeof(char) * len);
|
||||
}
|
||||
else
|
||||
return NULL;
|
21
devel/opencm/patches.nogc/patch-base_src_common_rbtree_c
Normal file
21
devel/opencm/patches.nogc/patch-base_src_common_rbtree_c
Normal file
@ -0,0 +1,21 @@
|
||||
$OpenBSD: patch-base_src_common_rbtree_c,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/src/common/rbtree.c.orig Sat Mar 29 16:15:31 2003
|
||||
+++ base/src/common/rbtree.c Thu May 22 17:46:42 2003
|
||||
@@ -101,7 +101,7 @@ rbtree_s_cmpkey(const rbnode *rn1, const
|
||||
rbnode *
|
||||
rbnode_create(const void *kvp, uint32_t kw, const void *data)
|
||||
{
|
||||
- rbnode *rbn = GC_MALLOC(sizeof(rbnode));
|
||||
+ rbnode *rbn = malloc(sizeof(rbnode));
|
||||
rbn->left = TREE_NIL;
|
||||
rbn->right = TREE_NIL;
|
||||
rbn->parent = TREE_NIL;
|
||||
@@ -117,7 +117,7 @@ rbtree_create(int (*cmp)(const rbnode *,
|
||||
int (*cmpkey)(const rbnode *, const rbkey *),
|
||||
OC_bool multiKey)
|
||||
{
|
||||
- rbtree *rbt = GC_MALLOC(sizeof(rbtree));
|
||||
+ rbtree *rbt = malloc(sizeof(rbtree));
|
||||
|
||||
rbt->seqNo = 0;
|
||||
rbt->multiKey = multiKey;
|
18
devel/opencm/patches.nogc/patch-base_src_common_sha1_c
Normal file
18
devel/opencm/patches.nogc/patch-base_src_common_sha1_c
Normal file
@ -0,0 +1,18 @@
|
||||
$OpenBSD: patch-base_src_common_sha1_c,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/src/common/sha1.c.orig Sat Mar 29 16:15:28 2003
|
||||
+++ base/src/common/sha1.c Thu May 22 17:46:42 2003
|
||||
@@ -75,12 +75,12 @@ struct OPENCM_SHA {
|
||||
OPENCM_SHA *
|
||||
sha_create()
|
||||
{
|
||||
- OPENCM_SHA *sha = (OPENCM_SHA *) GC_MALLOC(sizeof(OPENCM_SHA));
|
||||
+ OPENCM_SHA *sha = (OPENCM_SHA *) malloc(sizeof(OPENCM_SHA));
|
||||
|
||||
SHA1_Init(&sha->context);
|
||||
|
||||
#ifdef BLKCHARS
|
||||
- sha->buf = GC_MALLOC_ATOMIC(BLKCHARS);
|
||||
+ sha->buf = malloc(BLKCHARS);
|
||||
sha->buflen = 0;
|
||||
#endif
|
||||
sha->totlen = 0;
|
61
devel/opencm/patches.nogc/patch-base_src_common_sxdelta_c
Normal file
61
devel/opencm/patches.nogc/patch-base_src_common_sxdelta_c
Normal file
@ -0,0 +1,61 @@
|
||||
$OpenBSD: patch-base_src_common_sxdelta_c,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/src/common/sxdelta.c.orig Sat Mar 29 16:15:25 2003
|
||||
+++ base/src/common/sxdelta.c Thu May 22 17:46:42 2003
|
||||
@@ -130,7 +130,7 @@
|
||||
SXDelta *
|
||||
sxdelta_create(Buffer *cmd, Buffer *ins)
|
||||
{
|
||||
- SXDelta *xd = (SXDelta *) GC_MALLOC(sizeof(SXDelta));
|
||||
+ SXDelta *xd = (SXDelta *) malloc(sizeof(SXDelta));
|
||||
ser_init(xd, &SXDelta_SerType, SXDelta_SerType.ver);
|
||||
SER_MODIFIED(xd);
|
||||
|
||||
@@ -152,7 +152,7 @@ sxdelta_serialize(SDR_stream *strm, cons
|
||||
void *
|
||||
sxdelta_deserialize(const DeserializeInfo *di, SDR_stream *strm)
|
||||
{
|
||||
- SXDelta *sxd = (SXDelta *) GC_MALLOC(sizeof(SXDelta));
|
||||
+ SXDelta *sxd = (SXDelta *) malloc(sizeof(SXDelta));
|
||||
ser_init(sxd, &SXDelta_SerType, di->ver);
|
||||
|
||||
sxd->cmd = sdr_read("cmd", strm);
|
||||
@@ -237,10 +237,10 @@ compute_base_hashes(Buffer *buf)
|
||||
|
||||
assert(SKIPSZ >= CHUNKSZ);
|
||||
|
||||
- bh = GC_MALLOC(sizeof(hashvec_t));
|
||||
+ bh = malloc(sizeof(hashvec_t));
|
||||
bh->nhash = bufLen - (bufLen % CHUNKSZ); /* chop residual */
|
||||
bh->nhash = bufLen / SKIPSZ;
|
||||
- bh->hash = GC_MALLOC_ATOMIC(sizeof(hashpos_t) * bh->nhash);
|
||||
+ bh->hash = malloc(sizeof(hashpos_t) * bh->nhash);
|
||||
|
||||
if (bh->nhash == 0)
|
||||
return bh;
|
||||
@@ -536,7 +536,7 @@ XDeltaArchive_t *
|
||||
xda_fromStream(SDR_stream *s)
|
||||
{
|
||||
unsigned u;
|
||||
- XDeltaArchive_t *xda = GC_MALLOC(sizeof(XDeltaArchive_t));
|
||||
+ XDeltaArchive_t *xda = malloc(sizeof(XDeltaArchive_t));
|
||||
|
||||
if (s == 0 || stream_length(s) == 0) {
|
||||
xda->magic = "sxd2";
|
||||
@@ -548,7 +548,7 @@ xda_fromStream(SDR_stream *s)
|
||||
/* We allocate an EXTRA directory slot. This is because the insert
|
||||
operation adds at most one object, and it is cheaper to avoid
|
||||
reallocating the array later. */
|
||||
- xda->dir = GC_MALLOC(sizeof(xdirent_t) * xda->maxDirent);
|
||||
+ xda->dir = malloc(sizeof(xdirent_t) * xda->maxDirent);
|
||||
return xda;
|
||||
}
|
||||
|
||||
@@ -561,7 +561,7 @@ xda_fromStream(SDR_stream *s)
|
||||
/* We allocate an EXTRA directory slot. This is because the insert
|
||||
operation adds at most one object, and it is cheaper to avoid
|
||||
reallocating the array later. */
|
||||
- xda->dir = GC_MALLOC(sizeof(xdirent_t) * xda->maxDirent);
|
||||
+ xda->dir = malloc(sizeof(xdirent_t) * xda->maxDirent);
|
||||
|
||||
/* For each dirent, read in its values */
|
||||
for (u = 0; u < xda->nDirent; u++) {
|
39
devel/opencm/patches.nogc/patch-base_src_common_util_c
Normal file
39
devel/opencm/patches.nogc/patch-base_src_common_util_c
Normal file
@ -0,0 +1,39 @@
|
||||
$OpenBSD: patch-base_src_common_util_c,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/src/common/util.c.orig Sat Mar 29 16:15:31 2003
|
||||
+++ base/src/common/util.c Thu May 22 17:46:42 2003
|
||||
@@ -69,7 +69,7 @@ validate_pet_name(const char *s)
|
||||
char *
|
||||
xstrcat(const char *s1, const char *s2)
|
||||
{
|
||||
- char *news = (char *) GC_MALLOC_ATOMIC(strlen(s1) + strlen(s2) + 1);
|
||||
+ char *news = (char *) malloc(strlen(s1) + strlen(s2) + 1);
|
||||
strcpy(news, s1);
|
||||
strcat(news, s2);
|
||||
return news;
|
||||
@@ -92,7 +92,7 @@ xstrdowncase(const char *s)
|
||||
char *
|
||||
xstrdup(const char *s)
|
||||
{
|
||||
- char *news = (char *) GC_MALLOC_ATOMIC(strlen(s) + 1);
|
||||
+ char *news = (char *) malloc(strlen(s) + 1);
|
||||
strcpy(news, s);
|
||||
return news;
|
||||
}
|
||||
@@ -105,7 +105,7 @@ xstrndup(const char *s, int len)
|
||||
if (strlen(s) < len)
|
||||
return xstrdup(s);
|
||||
|
||||
- news = (char *)GC_MALLOC_ATOMIC(len + 1);
|
||||
+ news = (char *)malloc(len + 1);
|
||||
|
||||
strncpy(news, s, len);
|
||||
news[len] = 0;
|
||||
@@ -115,7 +115,7 @@ xstrndup(const char *s, int len)
|
||||
char *xchardup(const char theChar, size_t len)
|
||||
{
|
||||
size_t i;
|
||||
- char *s = (char *) GC_MALLOC_ATOMIC(len + 1);
|
||||
+ char *s = (char *) malloc(len + 1);
|
||||
|
||||
for (i = 0; i < len; i++)
|
||||
s[i] = theChar;
|
61
devel/opencm/patches.nogc/patch-base_src_libdiff_diff2_c
Normal file
61
devel/opencm/patches.nogc/patch-base_src_libdiff_diff2_c
Normal file
@ -0,0 +1,61 @@
|
||||
$OpenBSD: patch-base_src_libdiff_diff2_c,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/src/libdiff/diff2.c.orig Sat Mar 29 16:15:25 2003
|
||||
+++ base/src/libdiff/diff2.c Thu May 22 17:46:42 2003
|
||||
@@ -50,7 +50,7 @@ diff_extract_lines(Buffer *buf)
|
||||
|
||||
while((nl = strnchr(bc.ptr, (size_t) bc.len, '\n'))) {
|
||||
ocmoff_t lineLen = nl - bc.ptr;
|
||||
- DiffLine *dl = GC_MALLOC(sizeof(DiffLine));
|
||||
+ DiffLine *dl = malloc(sizeof(DiffLine));
|
||||
|
||||
curHash = psum_incremental(curHash, bc.ptr, lineLen);
|
||||
|
||||
@@ -59,7 +59,7 @@ diff_extract_lines(Buffer *buf)
|
||||
dl->base = lastLineStart;
|
||||
dl->bound = pos + lineLen;
|
||||
{
|
||||
- char *lineBuf = GC_MALLOC_ATOMIC(lineLen + 1);
|
||||
+ char *lineBuf = malloc(lineLen + 1);
|
||||
lineBuf[lineLen] = 0;
|
||||
buffer_read(buf, lineBuf, dl->base, dl->bound - dl->base);
|
||||
dl->content = lineBuf;
|
||||
@@ -86,7 +86,7 @@ diff_extract_lines(Buffer *buf)
|
||||
/* Deal with residual line that may not have been newline
|
||||
terminated, if any: */
|
||||
if (lastLineStart != end) {
|
||||
- DiffLine *dl = GC_MALLOC(sizeof(DiffLine));
|
||||
+ DiffLine *dl = malloc(sizeof(DiffLine));
|
||||
ocmoff_t lineLen = end - lastLineStart;
|
||||
|
||||
dl->lineNo = line++;
|
||||
@@ -94,7 +94,7 @@ diff_extract_lines(Buffer *buf)
|
||||
dl->base = lastLineStart;
|
||||
dl->bound = end;
|
||||
{
|
||||
- char *lineBuf = GC_MALLOC_ATOMIC(lineLen + 1);
|
||||
+ char *lineBuf = malloc(lineLen + 1);
|
||||
lineBuf[lineLen] = 0;
|
||||
buffer_read(buf, lineBuf, dl->base, dl->bound - dl->base);
|
||||
dl->content = lineBuf;
|
||||
@@ -214,10 +214,10 @@ calc_ses_len(DiffRegion *a, DiffRegion *
|
||||
long MAX = M+N; /* search limit */
|
||||
long D;
|
||||
|
||||
- long *Vf_base = GC_MALLOC_ATOMIC(MAX*2 + 1);
|
||||
+ long *Vf_base = malloc(MAX*2 + 1);
|
||||
long *Vf = Vf_base + MAX;
|
||||
|
||||
- long *Vb_base = GC_MALLOC_ATOMIC(MAX*2 + 1);
|
||||
+ long *Vb_base = malloc(MAX*2 + 1);
|
||||
long *Vb = Vb_base + MAX;
|
||||
|
||||
long delta = N - M;
|
||||
@@ -295,7 +295,7 @@ calc_ses_len(DiffRegion *a, DiffRegion *
|
||||
|
||||
/* V is a vector indexed from [-MAX..MAX}. Keep Vbase alive so that
|
||||
the GC algorithm won't loose track of it. */
|
||||
- long *Vbase = GC_MALLOC_ATOMIC(MAX*2 + 1);
|
||||
+ long *Vbase = malloc(MAX*2 + 1);
|
||||
long *V = Vbase + MAX;
|
||||
|
||||
V[1] = 0;
|
@ -0,0 +1,30 @@
|
||||
$OpenBSD: patch-base_src_obspace_LocalObSpace_c,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/src/obspace/LocalObSpace.c.orig Sat Mar 29 16:15:28 2003
|
||||
+++ base/src/obspace/LocalObSpace.c Thu May 22 17:46:42 2003
|
||||
@@ -102,7 +102,7 @@ validate_x509_cert(const char *reposName
|
||||
if ((num = BIO_get_mem_data(saved_cert_mem, &vbuf)) == 0)
|
||||
return FALSE;
|
||||
|
||||
- saved_cert_data = (char *)GC_MALLOC_ATOMIC(sizeof(char) * (num + 1));
|
||||
+ saved_cert_data = (char *)malloc(sizeof(char) * (num + 1));
|
||||
memcpy(saved_cert_data, vbuf, num);
|
||||
saved_cert_data[num] = 0;
|
||||
|
||||
@@ -112,7 +112,7 @@ validate_x509_cert(const char *reposName
|
||||
if ((num = BIO_get_mem_data(cert_mem, &vbuf)) == 0)
|
||||
return FALSE;
|
||||
|
||||
- cert_data = (char *)GC_MALLOC_ATOMIC(sizeof(char) * (num + 1));
|
||||
+ cert_data = (char *)malloc(sizeof(char) * (num + 1));
|
||||
memcpy(cert_data, vbuf, num);
|
||||
cert_data[num] = 0;
|
||||
|
||||
@@ -169,7 +169,7 @@ ReadOneLineFile(const char *path)
|
||||
size_t len = path_file_length(path);
|
||||
FILE *f = xfopen(path, 'r', 't');
|
||||
|
||||
- buf = GC_MALLOC_ATOMIC(len + 1);
|
||||
+ buf = malloc(len + 1);
|
||||
|
||||
/* Length may get truncated if this is a WIN32 text file */
|
||||
len = fread(buf, 1, len, f);
|
12
devel/opencm/patches.nogc/patch-base_src_opencm_h
Normal file
12
devel/opencm/patches.nogc/patch-base_src_opencm_h
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-base_src_opencm_h,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/src/opencm.h.orig Sat Mar 29 16:15:28 2003
|
||||
+++ base/src/opencm.h Thu May 22 17:46:42 2003
|
||||
@@ -77,8 +77,6 @@
|
||||
#include <paths.h>
|
||||
#endif
|
||||
|
||||
-#include "../gc6.1/include/gc.h"
|
||||
-
|
||||
/* #define USE_BASE16 */
|
||||
|
||||
#define CM_APPNAME "opencm"
|
12
devel/opencm/patches.nogc/patch-base_src_repos_AuthRepos_c
Normal file
12
devel/opencm/patches.nogc/patch-base_src_repos_AuthRepos_c
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-base_src_repos_AuthRepos_c,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/src/repos/AuthRepos.c.orig Mon Mar 31 10:29:19 2003
|
||||
+++ base/src/repos/AuthRepos.c Thu May 22 17:46:42 2003
|
||||
@@ -495,7 +495,7 @@ authrepository_init(Repository *r)
|
||||
Repository *
|
||||
authrepository_wrap(Repository *r, PubKey *pk)
|
||||
{
|
||||
- Repository *authR = (Repository *) GC_MALLOC(sizeof(Repository));
|
||||
+ Repository *authR = (Repository *) malloc(sizeof(Repository));
|
||||
|
||||
authR->uri = r->uri;
|
||||
authR->authMutable = 0;
|
39
devel/opencm/patches.nogc/patch-base_src_repos_FSRepos_c
Normal file
39
devel/opencm/patches.nogc/patch-base_src_repos_FSRepos_c
Normal file
@ -0,0 +1,39 @@
|
||||
$OpenBSD: patch-base_src_repos_FSRepos_c,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/src/repos/FSRepos.c.orig Sun Apr 6 16:03:44 2003
|
||||
+++ base/src/repos/FSRepos.c Thu May 22 17:46:42 2003
|
||||
@@ -88,7 +88,7 @@ ReadOneLineFile(const char *path)
|
||||
size_t len = path_file_length(path);
|
||||
FILE *f = xfopen(path, 'r', 't');
|
||||
|
||||
- buf = GC_MALLOC_ATOMIC(len + 1);
|
||||
+ buf = malloc(len + 1);
|
||||
|
||||
/* Length may get truncated if this is a WIN32 text file */
|
||||
len = fread(buf, 1, len, f);
|
||||
@@ -149,7 +149,7 @@ sign_this(Repository *r, Buffer *buf, un
|
||||
EVP_MD_CTX ctx;
|
||||
int result = 0;
|
||||
EVP_PKEY *private_key = get_private_key(r);
|
||||
- unsigned char *signature = GC_MALLOC_ATOMIC(EVP_PKEY_size(private_key));
|
||||
+ unsigned char *signature = malloc(EVP_PKEY_size(private_key));
|
||||
|
||||
/* Now use EVP library to sign content */
|
||||
EVP_SignInit(&ctx, EVP_sha1());
|
||||
@@ -174,7 +174,7 @@ sign_this(Repository *r, Buffer *buf, un
|
||||
format("Signing error [%s]",
|
||||
ERR_reason_error_string(ERR_get_error())));
|
||||
|
||||
- retval = GC_MALLOC_ATOMIC(*sign_len);
|
||||
+ retval = malloc(*sign_len);
|
||||
memcpy(retval, signature, *sign_len);
|
||||
|
||||
return retval;
|
||||
@@ -605,7 +605,7 @@ fsrepos_create(const char *path, const c
|
||||
const char *typefile;
|
||||
const char *lockPath;
|
||||
|
||||
- Repository *r = (Repository *)GC_MALLOC(sizeof(Repository));
|
||||
+ Repository *r = (Repository *)malloc(sizeof(Repository));
|
||||
|
||||
/* Check for valid fstype */
|
||||
if (
|
@ -0,0 +1,21 @@
|
||||
$OpenBSD: patch-base_src_repos_NetRepository_c,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/src/repos/NetRepository.c.orig Tue Apr 15 22:04:17 2003
|
||||
+++ base/src/repos/NetRepository.c Thu May 22 17:46:43 2003
|
||||
@@ -74,7 +74,7 @@ netrepository_connect(Repository *r, Pub
|
||||
WireUnsigned *svr_protoVersion;
|
||||
ObVec *ret;
|
||||
Request *sr = make_request(StartSession);
|
||||
- NetConnInfo *nci = GC_MALLOC(sizeof(NetConnInfo));
|
||||
+ NetConnInfo *nci = malloc(sizeof(NetConnInfo));
|
||||
|
||||
/* First arg is what client thinks the repos path is */
|
||||
pathArg = wires_create(r->uri->path);
|
||||
@@ -706,7 +706,7 @@ invoke_server (Repository *r, Request *r
|
||||
if (total == 0)
|
||||
THROW(ExIoError, "Client forced to read zero-length reply.");
|
||||
|
||||
- rawReply = (void *)GC_MALLOC_ATOMIC(total);
|
||||
+ rawReply = (void *)malloc(total);
|
||||
memset(rawReply, 0, total);
|
||||
|
||||
TRY {
|
39
devel/opencm/patches.nogc/patch-base_src_repos_Repository_c
Normal file
39
devel/opencm/patches.nogc/patch-base_src_repos_Repository_c
Normal file
@ -0,0 +1,39 @@
|
||||
$OpenBSD: patch-base_src_repos_Repository_c,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/src/repos/Repository.c.orig Mon Mar 31 10:29:20 2003
|
||||
+++ base/src/repos/Repository.c Thu May 22 17:46:43 2003
|
||||
@@ -50,7 +50,7 @@ Repository *
|
||||
repository_open(const char *argURI)
|
||||
{
|
||||
URI *uri;
|
||||
- Repository *r = (Repository *) GC_MALLOC(sizeof(Repository));
|
||||
+ Repository *r = (Repository *) malloc(sizeof(Repository));
|
||||
|
||||
r->uri = uri = uri_create(argURI);
|
||||
r->storeType = NULL;
|
||||
@@ -115,7 +115,7 @@ repository_open(const char *argURI)
|
||||
Repository *
|
||||
repository_dup(Repository *r)
|
||||
{
|
||||
- Repository *newR = (Repository *) GC_MALLOC(sizeof(Repository));
|
||||
+ Repository *newR = (Repository *) malloc(sizeof(Repository));
|
||||
memcpy(newR, r, sizeof(*r));
|
||||
|
||||
return newR;
|
||||
@@ -148,7 +148,7 @@ repos_validate_x509_cert(const char *rep
|
||||
if ((num = BIO_get_mem_data(saved_cert_mem, &vbuf)) == 0)
|
||||
return FALSE;
|
||||
|
||||
- saved_cert_data = (char *)GC_MALLOC_ATOMIC(sizeof(char) * (num + 1));
|
||||
+ saved_cert_data = (char *)malloc(sizeof(char) * (num + 1));
|
||||
memcpy(saved_cert_data, vbuf, num);
|
||||
saved_cert_data[num] = 0;
|
||||
|
||||
@@ -158,7 +158,7 @@ repos_validate_x509_cert(const char *rep
|
||||
if ((num = BIO_get_mem_data(cert_mem, &vbuf)) == 0)
|
||||
return FALSE;
|
||||
|
||||
- cert_data = (char *)GC_MALLOC_ATOMIC(sizeof(char) * (num + 1));
|
||||
+ cert_data = (char *)malloc(sizeof(char) * (num + 1));
|
||||
memcpy(cert_data, vbuf, num);
|
||||
cert_data[num] = 0;
|
||||
|
21
devel/opencm/patches.nogc/patch-base_src_server_DoRequest_c
Normal file
21
devel/opencm/patches.nogc/patch-base_src_server_DoRequest_c
Normal file
@ -0,0 +1,21 @@
|
||||
$OpenBSD: patch-base_src_server_DoRequest_c,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/src/server/DoRequest.c.orig Mon Mar 31 10:29:19 2003
|
||||
+++ base/src/server/DoRequest.c Thu May 22 17:46:43 2003
|
||||
@@ -100,7 +100,7 @@ svr_SendInfoGram(Channel *c, const char
|
||||
/* Make one message containing the net-order of the size followed
|
||||
* by the actual bytes of the message: */
|
||||
total = htonl(total);
|
||||
- message = (void *)GC_MALLOC_ATOMIC(sizeof(total) + reply_strm->len);
|
||||
+ message = (void *)malloc(sizeof(total) + reply_strm->len);
|
||||
memcpy(message, &total, sizeof(total));
|
||||
memcpy(message+sizeof(total), reply_strm->data, reply_strm->len);
|
||||
chan_awrite(c, message, sizeof(total)+reply_strm->len, NULL);
|
||||
@@ -500,7 +500,7 @@ svr_DoRequest(Channel *c, Request *req)
|
||||
/* Make sure this buffer is malloc'd: chan_awrite() relies
|
||||
* on the buffer pointer's validity well beyond the scope of this
|
||||
* local declaration block. */
|
||||
- char *totbuf = (char *)GC_MALLOC_ATOMIC(sizeof(reqlen_t));
|
||||
+ char *totbuf = (char *)malloc(sizeof(reqlen_t));
|
||||
|
||||
Buffer *buf = stream_asBuffer(reply_strm);
|
||||
ocmoff_t end, pos;
|
12
devel/opencm/patches.nogc/patch-base_src_server_Session_c
Normal file
12
devel/opencm/patches.nogc/patch-base_src_server_Session_c
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-base_src_server_Session_c,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/src/server/Session.c.orig Wed Dec 18 14:16:45 2002
|
||||
+++ base/src/server/Session.c Thu May 22 17:46:43 2003
|
||||
@@ -45,7 +45,7 @@
|
||||
Session *
|
||||
session_create(Repository *r)
|
||||
{
|
||||
- Session *s = (Session *) GC_MALLOC(sizeof(Session));
|
||||
+ Session *s = (Session *) malloc(sizeof(Session));
|
||||
|
||||
s->repos = r;
|
||||
s->compressionLevel = 0; /* until client says otherwise */
|
113
devel/opencm/patches.nogc/patch-base_src_server_opencmserver_c
Normal file
113
devel/opencm/patches.nogc/patch-base_src_server_opencmserver_c
Normal file
@ -0,0 +1,113 @@
|
||||
$OpenBSD: patch-base_src_server_opencmserver_c,v 1.1 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/src/server/opencmserver.c.orig Tue Apr 22 10:28:07 2003
|
||||
+++ base/src/server/opencmserver.c Thu May 22 17:46:43 2003
|
||||
@@ -54,35 +54,6 @@ static int max_fd_so_far;
|
||||
/* defined in globals.h: */
|
||||
int num_active_clients = 0;
|
||||
|
||||
-static void
|
||||
-report_gc_statistics()
|
||||
-{
|
||||
- static size_t last_stats[5] = { 0 };
|
||||
- size_t stats_now[4];
|
||||
- int j, stats_changed = 0;
|
||||
-
|
||||
- stats_now[0] = GC_get_heap_size();
|
||||
- stats_now[1] = GC_get_free_bytes();
|
||||
- stats_now[2] = GC_get_total_bytes();
|
||||
- stats_now[3] = GC_get_bytes_since_gc();
|
||||
-
|
||||
- last_stats[4] += GC_get_bytes_since_gc();
|
||||
-
|
||||
- for(j = 0; j != 4; j++)
|
||||
- if(stats_now[j] != last_stats[j])
|
||||
- stats_changed = 1;
|
||||
-
|
||||
- for(j = 0; j != 4; j++)
|
||||
- last_stats[j] = stats_now[j];
|
||||
-
|
||||
- /* Only make a report if something has changed since the last report */
|
||||
- if(!stats_changed)
|
||||
- return;
|
||||
-
|
||||
- log_trace(DBG_GC, "GC: heap=%d free=%d tot_alloc=%d tot_free=%d since_last_gc=%d\n",
|
||||
- stats_now[0], stats_now[1], stats_now[2], last_stats[4], stats_now[3]);
|
||||
-}
|
||||
-
|
||||
static void
|
||||
dump_channels(int sigid)
|
||||
{
|
||||
@@ -302,12 +273,8 @@ svr_GetRequest(Channel *c)
|
||||
}
|
||||
|
||||
svr_DoRequest(c, request);
|
||||
- strm = 0; /* GC */
|
||||
- request = 0; /* GC */
|
||||
-
|
||||
- /* Make sure to disable this if you're using reporting, since the GC free
|
||||
- statistics will get lost -JL */
|
||||
- GC_gcollect();
|
||||
+ free(strm);
|
||||
+ free(request);
|
||||
|
||||
/* Restore the Channel's read callback
|
||||
* because the client is probably going to have
|
||||
@@ -327,7 +294,7 @@ send_reply(Channel *c, Reply *reply)
|
||||
/* Make sure this buffer is malloc'd: chan_awrite() relies
|
||||
* on the buffer pointer's validity well beyond the scope of this
|
||||
* local declaration block. */
|
||||
- char *totbuf = (char *)GC_MALLOC_ATOMIC(sizeof(reqlen_t));
|
||||
+ char *totbuf = (char *)malloc(sizeof(reqlen_t));
|
||||
|
||||
reply_strm = stream_createBuffer(SDR_WIRE);
|
||||
sdr_write(SERVERREPLY, reply_strm, reply);
|
||||
@@ -581,10 +548,9 @@ svr_DoClientSetup(Channel *c)
|
||||
return;
|
||||
}
|
||||
|
||||
- log_trace(TRC_COMM, "%s: Accepted connect from %s (connection id=%d, heap=%d)\n",
|
||||
+ log_trace(TRC_COMM, "%s: Accepted connect from %s (connection id=%d)\n",
|
||||
os_GetISOTime(),
|
||||
- pubkey_GetEmail(c->peerCert), c->connection_id,
|
||||
- GC_get_heap_size());
|
||||
+ pubkey_GetEmail(c->peerCert), c->connection_id);
|
||||
|
||||
chan_aread(c, sizeof(reqlen_t), svr_StartSession);
|
||||
}
|
||||
@@ -612,7 +578,6 @@ opencm_server(WorkSpace *ws, int argc, c
|
||||
int u;
|
||||
Channel *listenChan;
|
||||
struct timeval tv;
|
||||
- size_t heap_size;
|
||||
|
||||
/* Become a daemon unless debugging has been requested: */
|
||||
if (opt_Foreground)
|
||||
@@ -702,28 +667,6 @@ opencm_server(WorkSpace *ws, int argc, c
|
||||
tv.tv_sec = 0;
|
||||
tv.tv_usec = 250000;
|
||||
(void) chan_select(activeChannels, max_fd_so_far, &tv);
|
||||
-
|
||||
- report_gc_statistics();
|
||||
-
|
||||
- GC_gcollect();
|
||||
-
|
||||
-#ifdef MEMLEAK_PATCH
|
||||
- /* Temporary: if GC_get_heap_size() > HEAPLIMIT then terminate
|
||||
- svr as long as there are no active channels
|
||||
- */
|
||||
- heap_size = GC_get_heap_size();
|
||||
- svr_memory_error = heap_size > HEAP_LIMIT;
|
||||
-
|
||||
- if (svr_memory_error) {
|
||||
- log_trace(ERR_GC, "** GC heap exceeded: limit = 0x%08x current = 0x%08x "
|
||||
- " active clients = %d\n", HEAP_LIMIT, heap_size,
|
||||
- num_active_clients);
|
||||
-
|
||||
- /* If no outstanding requests, terminate: */
|
||||
- if (num_active_clients <= 0)
|
||||
- svr_Cleanup();
|
||||
- }
|
||||
-#endif
|
||||
|
||||
}
|
||||
DEFAULT(ex) {
|
@ -1,12 +1,12 @@
|
||||
$OpenBSD: patch-base_libgdiff_diff3_c,v 1.2 2002/10/11 12:27:00 todd Exp $
|
||||
--- base/libgdiff/diff3.c.orig Fri Oct 11 06:45:08 2002
|
||||
+++ base/libgdiff/diff3.c Fri Oct 11 06:45:20 2002
|
||||
@@ -16,7 +16,7 @@
|
||||
/* Written by Randy Smith */
|
||||
$OpenBSD: patch-base_libgdiff_diff3_c,v 1.3 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/libgdiff/diff3.c.orig Fri May 23 08:08:11 2003
|
||||
+++ base/libgdiff/diff3.c Fri May 23 08:08:26 2003
|
||||
@@ -17,7 +17,7 @@
|
||||
/* Librarification by Tim Pierce */
|
||||
|
||||
#include "../config.h"
|
||||
-#include "../gc6.1/include/gc.h"
|
||||
+#include <gc.h>
|
||||
|
||||
#include "system.h"
|
||||
#include <stdio.h>
|
||||
#include <setjmp.h>
|
||||
|
@ -1,12 +1,12 @@
|
||||
$OpenBSD: patch-base_libgdiff_diff_h,v 1.2 2002/10/11 12:27:00 todd Exp $
|
||||
--- base/libgdiff/diff.h.orig Fri Oct 11 06:45:32 2002
|
||||
+++ base/libgdiff/diff.h Fri Oct 11 06:45:43 2002
|
||||
@@ -15,7 +15,7 @@ GNU General Public License for more deta
|
||||
|
||||
$OpenBSD: patch-base_libgdiff_diff_h,v 1.3 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/libgdiff/diff.h.orig Fri May 23 08:07:51 2003
|
||||
+++ base/libgdiff/diff.h Fri May 23 08:08:03 2003
|
||||
@@ -16,7 +16,7 @@ GNU General Public License for more deta
|
||||
*/
|
||||
|
||||
#include "../config.h"
|
||||
-#include "../gc6.1/include/gc.h"
|
||||
+#include <gc.h>
|
||||
|
||||
#include "system.h"
|
||||
#include <stdio.h>
|
||||
#include <setjmp.h>
|
||||
|
31
devel/opencm/patches/patch-base_src_Makefile_in
Normal file
31
devel/opencm/patches/patch-base_src_Makefile_in
Normal file
@ -0,0 +1,31 @@
|
||||
$OpenBSD: patch-base_src_Makefile_in,v 1.3 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/src/Makefile.in.orig Tue Apr 22 08:59:16 2003
|
||||
+++ base/src/Makefile.in Sun May 18 06:00:43 2003
|
||||
@@ -62,7 +62,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
|
||||
DEFS = @DEFS@
|
||||
LIBS = @LIBS@
|
||||
-CMLIBS += @SSL_LIBS@ @KRB5_LIBS@
|
||||
+CMLIBS += @SSL_LIBS@
|
||||
|
||||
CFLAGS = @CFLAGS@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
@@ -110,8 +110,7 @@ CMINCLUDE=@KRB5_INC@ @SSL_INC@
|
||||
# COMREADLINE=-DUSE_READLINE -I/usr/include/readline
|
||||
SESSIONTIMEOUT=-DCLIENT_TIMEOUT=1800
|
||||
LIBDIFF=$(TOPDIR)/../libgdiff/libgdiff.a
|
||||
-LIBZ=$(TOPDIR)/../zlib/libz.a
|
||||
-LIBGC=$(TOPDIR)/../gc6.1/.libs/libgc.a
|
||||
+LIBZ=-lz
|
||||
|
||||
XCFLAGS = -Wmissing-prototypes -Wall -Wreturn-type -DDATADIR=\"$(datadir)\"
|
||||
# XCFLAGS += -Wno-unused -Werror
|
||||
@@ -242,7 +241,7 @@ distclean: clean nodepend
|
||||
nodepend:
|
||||
find $(TOPDIR) -name '*.m' -exec rm {} \;
|
||||
|
||||
-$(OPENCM): $(OBJECTS) $(LIBDIFF) $(LIBZ) $(LIBGC)
|
||||
+$(OPENCM): $(OBJECTS) $(LIBDIFF)
|
||||
$(CC) -o $(OPENCM) $(CFLAGS) $(OBJECTS) $(LDFLAGS) $(CMLDFLAGS) $(LIBDIFF) $(LIBZ) $(LIBGC) $(LIBS) $(CMLIBS)
|
||||
|
||||
# Whenever we rebuild a .o file, we also need to rebuild the .m file:
|
@ -1,11 +0,0 @@
|
||||
$OpenBSD: patch-base_src_client_FilterSet_c,v 1.1 2002/11/04 16:01:32 todd Exp $
|
||||
--- base/src/client/FilterSet.c.orig Mon Nov 4 09:53:21 2002
|
||||
+++ base/src/client/FilterSet.c Mon Nov 4 09:47:31 2002
|
||||
@@ -57,6 +57,7 @@ static Filter global_filter_list[] = {
|
||||
{ TRUE, "#*" }, /* ... or other emacs editor buffer turds */
|
||||
{ TRUE, "CVS" }, /* Ignore CVS subdirs */
|
||||
{ TRUE, ".cvsignore" }, /* Ignore .cvsignore files */
|
||||
+ { TRUE, ".*.swp" }, /* no vim swap files */
|
||||
{ TRUE, CM_CONFIG_DIR }, /* no OpenCM turds either */
|
||||
|
||||
{ TRUE, 0 }, /* END MARKER */
|
@ -1,53 +1,13 @@
|
||||
$OpenBSD: patch-base_src_client_opencm_c,v 1.4 2002/11/04 16:01:32 todd Exp $
|
||||
--- base/src/client/opencm.c.orig Wed Oct 23 11:59:05 2002
|
||||
+++ base/src/client/opencm.c Mon Nov 4 09:56:43 2002
|
||||
@@ -46,6 +46,9 @@
|
||||
#include <opencm-version.h>
|
||||
#include <opencm-editor.h>
|
||||
$OpenBSD: patch-base_src_client_opencm_c,v 1.5 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/src/client/opencm.c.orig Sat Mar 29 16:15:30 2003
|
||||
+++ base/src/client/opencm.c Tue Apr 1 07:28:01 2003
|
||||
@@ -48,6 +48,9 @@
|
||||
|
||||
OC_bool do_Upgrade = FALSE;
|
||||
|
||||
+#include <sys/types.h>
|
||||
+#include <sys/time.h>
|
||||
+
|
||||
SSL_CTX *ssl_ctx = NULL;
|
||||
int opencmport = IANAPORT; /* unless proven otherwise */
|
||||
int opencmport = OPENCM_PORT; /* unless proven otherwise */
|
||||
PubKey *this_user = NULL;
|
||||
@@ -2103,14 +2106,21 @@ opencm_logmail(WorkSpace *ws, int argc,
|
||||
chg->commitInfoTrueName);
|
||||
User *u = (User *) client_GetMutableContent(r, ci->authorURI);
|
||||
|
||||
- fprintf(f, "Project: %s\n", res->m->name);
|
||||
- fprintf(f, "New version: %s/%s\n", ci->branchURI,
|
||||
- xunsigned64_str(ci->branchVersion));
|
||||
+ fprintf(f, "Project : %s\n", res->m->name);
|
||||
+ fprintf(f, "Author : %s\t", pubkey_GetEmail(u->pubKey));
|
||||
+ {
|
||||
+ char buf[64];
|
||||
+ time_t t;
|
||||
+ struct tm *tm;
|
||||
+ t = os_FromISO(ci->time);
|
||||
+
|
||||
+ tm = gmtime(&t);
|
||||
+
|
||||
+ strftime(buf, 64, "%Y%m%d %H:%M:%S", tm);
|
||||
+ fprintf(f, "%s\n",buf);
|
||||
+ }
|
||||
|
||||
- fprintf(f, "Author: %s\n", pubkey_GetEmail(u->pubKey));
|
||||
- fprintf(f, "Time: %s\n", ci->time);
|
||||
- fprintf(f, "Truename: %s\n", ver->cfgName);
|
||||
- fprintf(f, "Description:\n");
|
||||
+ fprintf(f, "\nDescription:\n");
|
||||
|
||||
{
|
||||
ocmoff_t pos = 0;
|
||||
@@ -2123,6 +2133,10 @@ opencm_logmail(WorkSpace *ws, int argc,
|
||||
}
|
||||
}
|
||||
|
||||
+ fprintf(f, "\n-------\n");
|
||||
+ fprintf(f, "Version: %s/%s\n", ci->branchURI,
|
||||
+ xunsigned64_str(ci->branchVersion));
|
||||
+ fprintf(f, "Truename: %s\n", ver->cfgName);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
@ -1,10 +1,10 @@
|
||||
$OpenBSD: patch-base_src_opencm_h,v 1.5 2002/10/11 12:34:20 todd Exp $
|
||||
--- base/src/opencm.h.orig Fri Oct 11 06:47:29 2002
|
||||
+++ base/src/opencm.h Fri Oct 11 06:46:19 2002
|
||||
@@ -78,7 +78,7 @@
|
||||
$OpenBSD: patch-base_src_opencm_h,v 1.6 2003/05/23 13:22:14 todd Exp $
|
||||
--- base/src/opencm.h.orig Sat Mar 29 16:15:28 2003
|
||||
+++ base/src/opencm.h Tue Apr 1 07:30:18 2003
|
||||
@@ -77,7 +77,7 @@
|
||||
#include <paths.h>
|
||||
#endif
|
||||
|
||||
/* #define GC_DEBUG */
|
||||
-#include "../gc6.1/include/gc.h"
|
||||
+#include <gc.h>
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
@comment $OpenBSD: PLIST,v 1.3 2002/10/11 12:27:00 todd Exp $
|
||||
@comment $OpenBSD: PLIST,v 1.4 2003/05/23 13:22:14 todd Exp $
|
||||
bin/cm
|
||||
@comment info/dir
|
||||
info/opencm.info.gz
|
||||
share/opencm/help/add.help
|
||||
share/opencm/help/adduser.help
|
||||
share/opencm/help/bind.help
|
||||
@ -23,6 +25,7 @@ share/opencm/help/mv.help
|
||||
share/opencm/help/note.help
|
||||
share/opencm/help/notes.help
|
||||
share/opencm/help/opt-basic.help
|
||||
share/opencm/help/opt-debugging.help
|
||||
share/opencm/help/opt-obscure.help
|
||||
share/opencm/help/opt-server.help
|
||||
share/opencm/help/rebind.help
|
||||
@ -43,6 +46,7 @@ share/opencm/help/status.help
|
||||
share/opencm/help/tag.help
|
||||
share/opencm/help/unbind.help
|
||||
share/opencm/help/update.help
|
||||
share/opencm/help/upgrade.help
|
||||
share/opencm/help/version.help
|
||||
share/opencm/help/whoami.help
|
||||
share/opencm/tools/cvsconvert.py
|
||||
|
Loading…
Reference in New Issue
Block a user