1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-12 23:10:51 +00:00

Removed --with-gc and CONFIG_GC related code.

CONFIG_GC was added with SEE, but SEE support was removed, so
I don't see the reason to keep gc.
This commit is contained in:
witekfl 2013-05-14 15:36:32 +02:00
parent 7dd4d9b737
commit 91515990c8
6 changed files with 0 additions and 77 deletions

View File

@ -126,7 +126,6 @@ CONFIG_FINGER = @CONFIG_FINGER@
CONFIG_FORMHIST = @CONFIG_FORMHIST@
CONFIG_FSP = @CONFIG_FSP@
CONFIG_FTP = @CONFIG_FTP@
CONFIG_GC = @CONFIG_GC@
CONFIG_GLOBHIST = @CONFIG_GLOBHIST@
CONFIG_GNUTLS = @CONFIG_GNUTLS@
CONFIG_GNUTLS_OPENSSL_COMPAT = @CONFIG_GNUTLS_OPENSSL_COMPAT@

View File

@ -484,11 +484,6 @@ EL_CONFIG_OPTIONAL_LIBRARY(CONFIG_BZIP2, bzlib, bzlib.h, bz2, BZ2_bzReadOpen,
EL_CONFIG_OPTIONAL_LIBRARY(CONFIG_IDN, idn, idna.h, idn, stringprep_check_version,
[ --without-idn disable international domain names support])
if test "x${with_gc}" != xno; then
EL_CONFIG_OPTIONAL_LIBRARY(CONFIG_GC, gc, gc.h, gc, GC_init,
[ --with-gc enable Boehm's garbage collector])
fi
# LZMA disabled by default, because of little usability and compilation problems
# with new xz
EL_CONFIG_OPTIONAL_LIBRARY(CONFIG_LZMA, lzma, lzma.h, lzma, lzma_code,

View File

@ -332,21 +332,9 @@ check_if_root(void)
#define check_if_root()
#endif
#ifdef CONFIG_GC
static void
gc_warning(char *msg, GC_word arg)
{
}
#endif
int
main(int argc, char *argv[])
{
#ifdef CONFIG_GC
GC_INIT();
GC_set_warn_proc(gc_warning);
#endif
check_if_root();
program.terminate = 0;

View File

@ -320,11 +320,7 @@ debug_mem_alloc(const unsigned char *file, int line, size_t size)
true_size = SIZE_BASE2AH(size);
do {
#ifdef CONFIG_GC
ah = GC_MALLOC(true_size);
#else
ah = malloc(true_size);
#endif
if (ah) break;
} while (patience(file, line, "malloc"));
if (!ah) return NULL;
@ -373,11 +369,7 @@ debug_mem_calloc(const unsigned char *file, int line, size_t eltcount, size_t el
true_size = SIZE_BASE2AH(size);
do {
#ifdef CONFIG_GC
ah = GC_MALLOC(true_size);
#else
ah = calloc(1, true_size);
#endif
if (ah) break;
} while (patience(file, line, "calloc"));
if (!ah) return NULL;
@ -459,11 +451,7 @@ debug_mem_free(const unsigned char *file, int line, void *ptr)
if (ah->comment) {
mem_stats.true_amount -= strlen(ah->comment) + 1;
#ifdef CONFIG_GC
ah->comment = NULL;
#else
free(ah->comment);
#endif
}
del_from_list(ah);
@ -477,12 +465,7 @@ debug_mem_free(const unsigned char *file, int line, void *ptr)
#ifdef CHECK_DOUBLE_FREE
ah->magic = AH_FREE_MAGIC;
#endif
#ifdef CONFIG_GC
ah = NULL;
#else
free(ah);
#endif
}
void *
@ -519,11 +502,7 @@ debug_mem_realloc(const unsigned char *file, int line, void *ptr, size_t size)
true_size = SIZE_BASE2AH(size);
do {
#ifdef CONFIG_GC
ah2 = GC_REALLOC(ah, true_size);
#else
ah2 = realloc(ah, true_size);
#endif
if (ah2) {
ah = ah2;
break;
@ -567,17 +546,9 @@ set_mem_comment(void *ptr, const unsigned char *str, int len)
if (ah->comment) {
mem_stats.true_amount -= strlen(ah->comment) + 1;
#ifdef CONFIG_GC
ah->comment = NULL;
#else
free(ah->comment);
#endif
}
#ifdef CONFIG_GC
ah->comment = GC_MALLOC(len + 1);
#else
ah->comment = malloc(len + 1);
#endif
if (ah->comment) {
memcpy(ah->comment, str, len);
ah->comment[len] = 0;

View File

@ -56,11 +56,7 @@ mem_alloc(size_t size)
{
if (size)
do {
#ifdef CONFIG_GC
void *p = GC_MALLOC(size);
#else
void *p = malloc(size);
#endif
if (p) return p;
} while (patience("malloc"));
@ -72,11 +68,7 @@ mem_calloc(size_t count, size_t eltsize)
{
if (eltsize && count)
do {
#ifdef CONFIG_GC
void *p = GC_MALLOC(count * eltsize);
#else
void *p = calloc(count, eltsize);
#endif
if (p) return p;
} while (patience("calloc"));
@ -90,11 +82,7 @@ mem_free(void *p)
INTERNAL("mem_free(NULL)");
return;
}
#ifdef CONFIG_GC
p = NULL;
#else
free(p);
#endif
}
void *
@ -104,11 +92,7 @@ mem_realloc(void *p, size_t size)
if (size)
do {
#ifdef CONFIG_GC
void *p2 = GC_REALLOC(p, size);
#else
void *p2 = realloc(p, size);
#endif
if (p2) return p2;
} while (patience("realloc"));
else

View File

@ -20,10 +20,6 @@
#include <sys/types.h>
#include <stddef.h>
#ifdef CONFIG_GC
#include <gc.h>
#endif
#ifdef HAVE_MMAP
void *mem_mmap_alloc(size_t size);
void mem_mmap_free(void *p, size_t size);
@ -66,21 +62,11 @@ void *mem_realloc(void *, size_t);
* For these we need some replacement functions.
* This should not be an issue on most modern systems.
*/
#ifdef CONFIG_GC
# define mem_alloc(size) GC_MALLOC(size)
# define mem_calloc(count, size) GC_MALLOC((count) * (size))
# define mem_free(p) (p) = NULL
# define mem_realloc(p, size) GC_REALLOC(p, size)
#else
# define mem_alloc(size) malloc(size)
# define mem_calloc(count, size) calloc(count, size)
# define mem_free(p) free(p)
# define mem_realloc(p, size) realloc(p, size)
#endif
/* fmem_* functions should be use for allocation and freeing of memory
* inside a function.
* See alloca(3) manpage. */