aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2011-08-01 11:22:26 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2011-08-01 11:22:26 +0000
commite11023671fa3e05c404d1277a6fe6855c79ce923 (patch)
tree78752f0d3945d7a1edb9947e4cbc61d66d8a2154
parent45cab1574d83af762a61702966fb74705f6961be (diff)
downloadgdbm-e11023671fa3e05c404d1277a6fe6855c79ce923.tar.gz
gdbm-e11023671fa3e05c404d1277a6fe6855c79ce923.tar.bz2
Use GDBM_FILE instead of gdbm_file_info *.
(gdbm_open): Fix signature to match global declaration
-rw-r--r--src/gdbmopen.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/gdbmopen.c b/src/gdbmopen.c
index 9992b6f..03a3473 100644
--- a/src/gdbmopen.c
+++ b/src/gdbmopen.c
@@ -21,7 +21,6 @@
#include "autoconf.h"
#include "gdbmdefs.h"
-#include "gdbmerrno.h"
/* Determine our native magic number and bail if we can't. */
#if SIZEOF_OFF_T == 4
@@ -52,11 +51,11 @@
returned. */
-gdbm_file_info *
-gdbm_open (char *file, int block_size, int flags, int mode,
+GDBM_FILE
+gdbm_open (const char *file, int block_size, int flags, int mode,
void (*fatal_func) (const char *))
{
- gdbm_file_info *dbf; /* The record to return. */
+ GDBM_FILE dbf; /* The record to return. */
struct stat file_stat; /* Space for the stat information. */
int len; /* Length of the file name. */
int num_bytes; /* Used in reading and writing. */
@@ -71,7 +70,7 @@ gdbm_open (char *file, int block_size, int flags, int mode,
gdbm_errno = GDBM_NO_ERROR;
/* Allocate new info structure. */
- dbf = (gdbm_file_info *) malloc (sizeof (gdbm_file_info));
+ dbf = (GDBM_FILE) malloc (sizeof (*dbf));
if (dbf == NULL)
{
gdbm_errno = GDBM_MALLOC_ERROR;
@@ -426,7 +425,7 @@ gdbm_open (char *file, int block_size, int flags, int mode,
/* Initialize the bucket cache. */
int
-_gdbm_init_cache(gdbm_file_info *dbf, int size)
+_gdbm_init_cache(GDBM_FILE dbf, int size)
{
int index;

Return to:

Send suggestions and report system problems to the System administrator.