append ".db" to the file name
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Fri, 15 Feb 1991 04:07:23 +0000 (20:07 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Fri, 15 Feb 1991 04:07:23 +0000 (20:07 -0800)
SCCS-vsn: lib/libc/db/hash/ndbm.c 5.2

usr/src/lib/libc/db/hash/ndbm.c

index 9700d4e..8c2939e 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)ndbm.c     5.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)ndbm.c     5.2 (Berkeley) %G%";
 #endif /* LIBC_SCCS and not lint */
 
 /*
 #endif /* LIBC_SCCS and not lint */
 
 /*
@@ -33,6 +33,7 @@ int   flags;
 int    mode;
 {
     HASHINFO   info;
 int    mode;
 {
     HASHINFO   info;
+    char path[MAXPATHLEN];
 
     info.bsize = 1024;
     info.ffactor = 5;
 
     info.bsize = 1024;
     info.ffactor = 5;
@@ -40,7 +41,8 @@ int   mode;
     info.ncached = NULL;
     info.hash = NULL;
     info.lorder = 0;
     info.ncached = NULL;
     info.hash = NULL;
     info.lorder = 0;
-    return( hash_open ( file, flags, mode, &info ) );
+    (void)sprintf(path, "%s%s", file, DBM_SUFFIX);
+    return( hash_open ( path, flags, mode, &info ) );
 }
 
 extern void 
 }
 
 extern void