> > The oldest glibc version in ftp.gnu.org is 1.09.1 from year
> > 1994. It supports alloca().
> > 
> > I'll rephrase: alloca.c is not needed with glibc or uClibc.
> 
> Kill it.

This patch kills references to alloca.c and memcmp.c. Please delete
those files from git repository.

You can download this patch from http://b.bbbs.net/sawfish/alloca.patch
as there are some long lines. Does my email client work correctly?


diff -ur orig/config.h.in librep/config.h.in
--- orig/config.h.in    2010-01-06 23:22:28.000000000 +0200
+++ librep/config.h.in  2010-01-06 23:27:53.000000000 +0200
@@ -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
 
diff -ur orig/configure.in librep/configure.in
--- orig/configure.in   2010-01-06 23:22:28.000000000 +0200
+++ librep/configure.in 2010-01-06 23:32:56.000000000 +0200
@@ -287,9 +287,7 @@
 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 -ur orig/Makedefs.in librep/Makedefs.in
--- orig/Makedefs.in    2010-01-06 23:22:28.000000000 +0200
+++ librep/Makedefs.in  2010-01-06 23:26:13.000000000 +0200
@@ -60,7 +60,6 @@
 gmp_li...@gmp_libs@
 gdbm_li...@gdbm_libs@
 libffi_li...@libffi_libs@
-allo...@alloca@
 
 DESTDIR=
 insta...@install@
diff -ur orig/src/main.c librep/src/main.c
--- orig/src/main.c     2010-01-06 23:22:28.000000000 +0200
+++ librep/src/main.c   2010-01-06 23:33:58.000000000 +0200
@@ -493,12 +493,6 @@
     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 -ur orig/src/Makefile.in librep/src/Makefile.in
--- orig/src/Makefile.in        2010-01-06 23:22:28.000000000 +0200
+++ librep/src/Makefile.in      2010-01-06 23:26:37.000000000 +0200
@@ -56,7 +56,7 @@
 
 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 -ur orig/src/unix_main.c librep/src/unix_main.c
--- orig/src/unix_main.c        2010-01-06 23:22:28.000000000 +0200
+++ librep/src/unix_main.c      2010-01-06 23:34:29.000000000 +0200
@@ -559,12 +559,6 @@
 
        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;

Reply via email to