[librep] remove our alloca



commit 8fd5d3f8d4c493c9ff533c7715554e26be48b1ba
Author: Christopher Roy Bratusek <chris nanolx org>
Date:   Wed Jan 6 23:37:11 2010 +0100

    remove our alloca

 ChangeLog       |    9 +
 Makedefs.in     |    1 -
 config.h.in     |   15 --
 configure.in    |    2 -
 man/news.texi   |    3 +
 src/Makefile.in |    2 +-
 src/alloca.c    |  492 -------------------------------------------------------
 src/main.c      |    6 -
 src/unix_main.c |    6 -
 9 files changed, 13 insertions(+), 523 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index de9e41e..37cc5bd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2010-01-06  Christopher Bratusek <zanghar freenet de>
+	* src/alloca.c
+	* config.h.in
+	* configure.in
+	* src/Makefile.in
+	* src/main.c
+	* src/unix_main.c: removed our own implementation of alloca, use libcs instead
+	                   -- [Kim B. Heino]
+
 2010-01-05  Christopher Bratusek <zanghar freenet de>
 	* man/lang.texi: doc for file-uid-p file-gid-p
 
diff --git a/Makedefs.in b/Makedefs.in
index cc03270..b2dbcb2 100644
--- a/Makedefs.in
+++ b/Makedefs.in
@@ -60,7 +60,6 @@ READLINE_LIBS= READLINE_LIBS@
 GMP_LIBS= GMP_LIBS@
 GDBM_LIBS= GDBM_LIBS@
 LIBFFI_LIBS= LIBFFI_LIBS@
-ALLOCA= ALLOCA@
 
 DESTDIR=
 INSTALL= INSTALL@
diff --git a/config.h.in b/config.h.in
index d40fabe..cf30ab3 100644
--- a/config.h.in
+++ b/config.h.in
@@ -6,14 +6,6 @@
 /* Broken rtld global */
 #undef BROKEN_RTLD_GLOBAL
 
-/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
-   systems. This function is required for `alloca.c' support on those systems.
-   */
-#undef CRAY_STACKSEG_END
-
-/* Define to 1 if using `alloca.c'. */
-#undef C_ALLOCA
-
 /* DB resolve symbols */
 #undef DB_RESOLVE_SYMBOLS
 
@@ -32,13 +24,6 @@
 /* Have Fullname Terminator */
 #undef FULL_NAME_TERMINATOR
 
-/* Define to 1 if you have `alloca', as a function or macro. */
-#undef HAVE_ALLOCA
-
-/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
-   */
-#undef HAVE_ALLOCA_H
-
 /* Define to 1 if you have the <argz.h> header file. */
 #undef HAVE_ARGZ_H
 
diff --git a/configure.in b/configure.in
index 1c2c8c7..c3c39ad 100644
--- a/configure.in
+++ b/configure.in
@@ -287,9 +287,7 @@ AC_TYPE_SIZE_T
 AC_TYPE_SIGNAL
 
 dnl Checks for library functions.
-AC_FUNC_ALLOCA
 AC_FUNC_MMAP
-AC_FUNC_MEMCMP
 AC_FUNC_VPRINTF
 AC_CHECK_FUNCS(getcwd gethostname select socket strcspn strerror strstr stpcpy strtol psignal strsignal snprintf grantpt lrand48 getpagesize setitimer dladdr dlerror munmap putenv setenv setlocale strchr strcasecmp strncasecmp strdup __argz_count __argz_stringify __argz_next siginterrupt gettimeofday strtoll strtoq)
 AC_REPLACE_FUNCS(realpath)
diff --git a/man/news.texi b/man/news.texi
index 428d126..7cbb5e2 100644
--- a/man/news.texi
+++ b/man/news.texi
@@ -27,6 +27,9 @@ Sawfish and emacs' sawfish-mode.
 librep on several architectures. From this version on, we don't ship it.
 [Kim B. Heino]
 
+ item Our own implementation of alloca is not needed, rely on libcs instead.
+[Kim B. Heino]
+
 @item Majorly improved the debian and rpm packaging scripts
 [Christopher Bratusek] [Kim B. Heino]
 
diff --git a/src/Makefile.in b/src/Makefile.in
index f611927..fd59d3c 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -56,7 +56,7 @@ INTL_OBJS=$(INTL_OBJS_ USE_INCLUDED_LIBINTL@)
 
 all : librep.la $(DL_OBJS) check-dl rep rep-remote rep-xgettext .libexec
 
-librep.la : $(OBJS) $(LIBOBJS) $(ALLOCA)
+librep.la : $(OBJS) $(LIBOBJS)
 	$(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) \
 	  -version-info $(libversion) -export-symbols $(srcdir)/librep.sym \
 	  -o $@ $^ -rpath $(libdir) $(LIBS) $(GMP_LIBS)
diff --git a/src/main.c b/src/main.c
index a078289..60f75af 100644
--- a/src/main.c
+++ b/src/main.c
@@ -493,12 +493,6 @@ Enter a new recursive-edit.
     ret = (*rep_event_loop_fun)();
     rep_recurse_depth--;
 
-#ifdef C_ALLOCA
-    /* Using the C implementation of alloca. So garbage collect
-       anything below the current stack depth. */
-    alloca(0);
-#endif
-
     return ret;
 }
 
diff --git a/src/unix_main.c b/src/unix_main.c
index dd37ef7..1ea5018 100644
--- a/src/unix_main.c
+++ b/src/unix_main.c
@@ -559,12 +559,6 @@ rep_event_loop(void)
 
 	if(refreshp && rep_redisplay_fun != 0)
 	    (*rep_redisplay_fun)();
-
-#ifdef C_ALLOCA
-	/* Using the C implementation of alloca. So garbage collect
-	   anything below the current stack depth. */
-	alloca(0);
-#endif
     }
 
     return result;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]