diff options
Diffstat (limited to 'bdb/os/os_dir.c')
-rw-r--r-- | bdb/os/os_dir.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/bdb/os/os_dir.c b/bdb/os/os_dir.c index 50d00a5562f..3f59a23d963 100644 --- a/bdb/os/os_dir.c +++ b/bdb/os/os_dir.c @@ -1,14 +1,14 @@ /*- * See the file LICENSE for redistribution information. * - * Copyright (c) 1997, 1998, 1999, 2000 + * Copyright (c) 1997-2002 * Sleepycat Software. All rights reserved. */ #include "db_config.h" #ifndef lint -static const char revid[] = "$Id: os_dir.c,v 11.8 2000/06/27 17:29:52 sue Exp $"; +static const char revid[] = "$Id: os_dir.c,v 11.14 2002/07/12 18:56:50 bostic Exp $"; #endif /* not lint */ #ifndef NO_SYSTEM_INCLUDES @@ -34,7 +34,6 @@ static const char revid[] = "$Id: os_dir.c,v 11.8 2000/06/27 17:29:52 sue Exp $" #endif #include "db_int.h" -#include "os_jump.h" /* * __os_dirlist -- @@ -54,8 +53,8 @@ __os_dirlist(dbenv, dir, namesp, cntp) int arraysz, cnt, ret; char **names; - if (__db_jump.j_dirlist != NULL) - return (__db_jump.j_dirlist(dir, namesp, cntp)); + if (DB_GLOBAL(j_dirlist) != NULL) + return (DB_GLOBAL(j_dirlist)(dir, namesp, cntp)); #ifdef HAVE_VXWORKS if ((dirp = opendir((char *)dir)) == NULL) @@ -68,7 +67,7 @@ __os_dirlist(dbenv, dir, namesp, cntp) if (cnt >= arraysz) { arraysz += 100; if ((ret = __os_realloc(dbenv, - arraysz * sizeof(names[0]), NULL, &names)) != 0) + arraysz * sizeof(names[0]), &names)) != 0) goto nomem; } if ((ret = __os_strdup(dbenv, dp->d_name, &names[cnt])) != 0) @@ -81,7 +80,7 @@ __os_dirlist(dbenv, dir, namesp, cntp) return (0); nomem: if (names != NULL) - __os_dirfree(names, cnt); + __os_dirfree(dbenv, names, cnt); if (dirp != NULL) (void)closedir(dirp); return (ret); @@ -91,18 +90,19 @@ nomem: if (names != NULL) * __os_dirfree -- * Free the list of files. * - * PUBLIC: void __os_dirfree __P((char **, int)); + * PUBLIC: void __os_dirfree __P((DB_ENV *, char **, int)); */ void -__os_dirfree(names, cnt) +__os_dirfree(dbenv, names, cnt) + DB_ENV *dbenv; char **names; int cnt; { - if (__db_jump.j_dirfree != NULL) - __db_jump.j_dirfree(names, cnt); + if (DB_GLOBAL(j_dirfree) != NULL) + DB_GLOBAL(j_dirfree)(names, cnt); else { while (cnt > 0) - __os_free(names[--cnt], 0); - __os_free(names, 0); + __os_free(dbenv, names[--cnt]); + __os_free(dbenv, names); } } |