mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 03:30:27 +02:00
Use memset instead of bzero.
This commit is contained in:
parent
a58c0d5f51
commit
f22ed5a028
5 changed files with 20 additions and 17 deletions
|
@ -1,3 +1,9 @@
|
|||
2001-04-11 Keisuke Nishida <kxn30@po.cwru.edu>
|
||||
|
||||
* configure.in (AC_CHECK_FUNCS): Don't check bzero.
|
||||
(GUILE_FUNC_DECLARED): Removed checking of bzero.
|
||||
Thanks to NIIBE Yutaka.
|
||||
|
||||
2001-04-10 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
|
||||
|
||||
* Undeprecated scm_init_oop_goopscore_module.
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -1,3 +1,13 @@
|
|||
2001-04-11 Keisuke Nishida <kxn30@po.cwru.edu>
|
||||
|
||||
* debug-malloc.c (grow, scm_debug_malloc_prehistory): Use memset
|
||||
instead of bzero.
|
||||
|
||||
* coop.c, iselect.c (FD_ZERO_N): Unconditionally use memset.
|
||||
(MISSING_BZERO_DECL): Remove the declaration.
|
||||
|
||||
Thanks to NIIBE Yutaka.
|
||||
|
||||
2001-04-10 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
|
||||
|
||||
* init.c, goops.c, goops.h: Reverted change of 2001-03-29. (The
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -57,10 +57,6 @@
|
|||
|
||||
#include "libguile/coop-threads.h"
|
||||
|
||||
#ifdef MISSING_BZERO_DECL
|
||||
extern void bzero (void *, size_t);
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/* COOP queue macros */
|
||||
|
@ -92,11 +88,7 @@ extern void bzero (void *, size_t);
|
|||
#error Could not determine suitable definition for SCM_NLONGBITS
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_BZERO
|
||||
#define FD_ZERO_N(pos, n) bzero ((pos), (n))
|
||||
#else
|
||||
#define FD_ZERO_N(pos, n) memset ((void *) (pos), 0, (n))
|
||||
#endif
|
||||
|
||||
typedef unsigned long *ulongptr;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue