guile-devel
[Top][All Lists]
Advanced

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

[PATCH] Thread Plug-in Support #5


From: NIIBE Yutaka
Subject: [PATCH] Thread Plug-in Support #5
Date: Thu, 12 Apr 2001 10:16:10 +0900 (JST)

Patch piece #5.

Nuke bzero, use memset instead.

Applying patch pieses #1-#5, no regression with "make check".  
(Note that patch pieses #1-#5 can be applied independently.)

ChangeLog

        * configure.in (AC_CHECK_FUNCS): Don't check bzero.
        (GUILE_FUNC_DECLARED): Removed checking of bzero.

Index: configure.in
===================================================================
RCS file: /cvs/guile/guile-core/configure.in,v
retrieving revision 1.129
diff -u -p -r1.129 configure.in
--- configure.in        2001/03/18 23:17:32     1.129
+++ configure.in        2001/04/12 01:04:44
@@ -195,7 +195,7 @@ AC_SUBST(INCLTDL)
 AC_SUBST(LIBLTDL)
 AC_SUBST(DLPREOPEN)
 
-AC_CHECK_FUNCS(ctermid ftime fchown getcwd geteuid gettimeofday lstat mkdir 
mknod nice readlink rename rmdir select setegid seteuid setlocale setpgid 
setsid sigaction siginterrupt strftime strptime symlink sync tcgetpgrp 
tcsetpgrp times uname waitpid bzero strdup system usleep atexit on_exit)
+AC_CHECK_FUNCS(ctermid ftime fchown getcwd geteuid gettimeofday lstat mkdir 
mknod nice readlink rename rmdir select setegid seteuid setlocale setpgid 
setsid sigaction siginterrupt strftime strptime symlink sync tcgetpgrp 
tcsetpgrp times uname waitpid strdup system usleep atexit on_exit)
 
 AC_CHECK_HEADERS(crypt.h sys/resource.h sys/file.h)
 AC_CHECK_FUNCS(chroot flock getlogin cuserid getpriority setpriority getpass 
sethostname gethostname)
@@ -219,7 +219,6 @@ AC_DEFUN(GUILE_FUNC_DECLARED, [
 ])
 
 GUILE_FUNC_DECLARED(strptime, time.h)
-GUILE_FUNC_DECLARED(bzero, string.h)
 GUILE_FUNC_DECLARED(sleep, unistd.h)
 GUILE_FUNC_DECLARED(usleep, unistd.h)
 
libguile/ChangeLog

        * debug-malloc.c (grow, scm_debug_malloc_prehistory): Use memset
        instead of bzero.
        
        * coop.c (FD_ZERO_N): Unconditionally use memset.
        (MISSING_BZERO_DECL): Remove the declaration. 

Index: libguile/debug-malloc.c
===================================================================
RCS file: /cvs/guile/guile-core/libguile/debug-malloc.c,v
retrieving revision 1.8
diff -u -p -r1.8 debug-malloc.c
--- libguile/debug-malloc.c     2001/03/12 07:08:46     1.8
+++ libguile/debug-malloc.c     2001/04/12 01:04:45
@@ -116,10 +116,6 @@ static hash_entry_t *malloc_object = 0;
     }                                                          \
   while (0)
 
-#ifdef MISSING_BZERO_DECL
-extern void bzero (void *, size_t);
-#endif
-
 static void
 grow (hash_entry_t **table, int *size)
 {
@@ -132,7 +128,7 @@ grow (hash_entry_t **table, int *size)
  again:
   TABLE (new) = realloc (TABLE (new),
                         sizeof (hash_entry_t) * (SIZE (new) + N_SEEK));
-  bzero (TABLE (new), sizeof (hash_entry_t) * (SIZE (new) + N_SEEK));
+  memset (TABLE (new), 0, sizeof (hash_entry_t) * (SIZE (new) + N_SEEK));
   for (i = 0; i < oldsize; ++i)
     if (oldtable[i].key)
       {
@@ -249,10 +245,10 @@ scm_debug_malloc_prehistory ()
 {
   malloc_type = malloc (sizeof (hash_entry_t)
                        * (malloc_type_size + N_SEEK));
-  bzero (malloc_type, sizeof (hash_entry_t) * (malloc_type_size + N_SEEK));
+  memset (malloc_type, 0, sizeof (hash_entry_t) * (malloc_type_size + N_SEEK));
   malloc_object = malloc (sizeof (hash_entry_t)
                          * (malloc_object_size + N_SEEK));
-  bzero (malloc_object, sizeof (hash_entry_t) * (malloc_object_size + N_SEEK));
+  memset (malloc_object, 0, sizeof (hash_entry_t) * (malloc_object_size + 
N_SEEK));
 }
 
 void

-- 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]