gdbm/gdbm-1.8.3.dif

118 lines
3.9 KiB
Plaintext

--- gdbmopen.c
+++ gdbmopen.c 2005/08/23 08:25:23
@@ -212,7 +212,7 @@
file_block_size = block_size;
/* Get space for the file header. */
- dbf->header = (gdbm_file_header *) malloc (file_block_size);
+ dbf->header = (gdbm_file_header *) calloc (1, file_block_size);
if (dbf->header == NULL)
{
gdbm_close (dbf);
--- gdbmreorg.c
+++ gdbmreorg.c 2005/08/24 16:07:12
@@ -112,7 +112,7 @@
/* Get the mode for the old file and open the new database. */
fstat (dbf->desc, &fileinfo);
- new_dbf = gdbm_open (new_name, dbf->header->block_size, GDBM_WRCREAT,
+ new_dbf = gdbm_open (new_name, dbf->header->block_size, GDBM_NEWDB,
fileinfo.st_mode, dbf->fatal_err);
if (new_dbf == NULL)
--- Makefile.in
+++ Makefile.in 2005/08/23 08:25:23
@@ -15,8 +15,8 @@
INSTALL_DATA = @INSTALL_DATA@
# File ownership and group
-BINOWN = bin
-BINGRP = bin
+BINOWN = root
+BINGRP = root
MAKEINFO = makeinfo
TEXI2DVI = texi2dvi
@@ -130,22 +130,23 @@
$(srcdir)/mkinstalldirs $(INSTALL_ROOT)$(libdir) \
$(INSTALL_ROOT)$(includedir) $(INSTALL_ROOT)$(man3dir) \
$(INSTALL_ROOT)$(infodir)
- $(LIBTOOL) $(INSTALL) -c libgdbm.la $(INSTALL_ROOT)$(libdir)/libgdbm.la
- $(INSTALL_DATA) -o $(BINOWN) -g $(BINGRP) gdbm.h \
+ $(LIBTOOL) --mode=install $(INSTALL) -c libgdbm.la \
+ $(INSTALL_ROOT)$(libdir)/libgdbm.la
+ $(INSTALL_DATA) gdbm.h \
$(INSTALL_ROOT)$(includedir)/gdbm.h
- $(INSTALL_DATA) -o $(BINOWN) -g $(BINGRP) $(srcdir)/gdbm.3 \
+ $(INSTALL_DATA) $(srcdir)/gdbm.3 \
$(INSTALL_ROOT)$(man3dir)/gdbm.3
- $(INSTALL_DATA) -o $(BINOWN) -g $(BINGRP) $(srcdir)/gdbm.info \
+ $(INSTALL_DATA) $(srcdir)/gdbm.info \
$(INSTALL_ROOT)$(infodir)/gdbm.info
install-compat:
$(srcdir)/mkinstalldirs $(INSTALL_ROOT)$(libdir) \
$(INSTALL_ROOT)$(includedir)
- $(LIBTOOL) $(INSTALL) -c libgdbm_compat.la \
+ $(LIBTOOL) --mode=install $(INSTALL) -c libgdbm_compat.la \
$(INSTALL_ROOT)$(libdir)/libgdbm_compat.la
- $(INSTALL_DATA) -o $(BINOWN) -g $(BINGRP) $(srcdir)/dbm.h \
+ $(INSTALL_DATA) $(srcdir)/dbm.h \
$(INSTALL_ROOT)$(includedir)/dbm.h
- $(INSTALL_DATA) -o $(BINOWN) -g $(BINGRP) $(srcdir)/ndbm.h \
+ $(INSTALL_DATA) $(srcdir)/ndbm.h \
$(INSTALL_ROOT)$(includedir)/ndbm.h
#libgdbm.a: $(OBJS) gdbm.h
@@ -172,10 +173,10 @@
chmod -w gdbm.h
testgdbm: testgdbm.o libgdbm.la @LIBOBJS@
- $(LIBTOOL) $(CC) $(LDFLAGS) -o testgdbm testgdbm.o libgdbm.la @LIBOBJS@
+ $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o testgdbm testgdbm.o libgdbm.la @LIBOBJS@
testdbm: testdbm.o libgdbm.la libgdbm_compat.la
- $(LIBTOOL) $(CC) $(LDFLAGS) -o testdbm testdbm.o libgdbm.la libgdbm_compat.la
+ $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o testdbm testdbm.o libgdbm.la libgdbm_compat.la
tdbm: testdbm.o
$(CC) $(LDFLAGS) -o tdbm testdbm.o $(LIBS)
@@ -184,7 +185,7 @@
$(CC) -c -I. -I$(srcdir) $(CFLAGS) $(DEFS) -DGNU $(srcdir)/testndbm.c
testndbm: testndbm.o libgdbm.la libgdbm_compat.la
- $(LIBTOOL) $(CC) $(LDFLAGS) -o testndbm testndbm.o libgdbm.la libgdbm_compat.la
+ $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o testndbm testndbm.o libgdbm.la libgdbm_compat.la
tndbm.o: testndbm.c
cp $(srcdir)/testndbm.c ./tndbm.c
@@ -195,7 +196,7 @@
$(CC) $(LDFLAGS) -o tndbm tndbm.o $(LIBS)
conv2gdbm: conv2gdbm.o libgdbm.la @LIBOBJS@
- $(LIBTOOL) $(CC) $(LDFLAGS) -o conv2gdbm conv2gdbm.o $(LIBS) libgdbm.la @LIBOBJS@
+ $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o conv2gdbm conv2gdbm.o $(LIBS) libgdbm.la @LIBOBJS@
lintgdbm:
lint $(DEFS) $(LFLAGS) $(DBM_CF) $(NDBM_CF) $(GDBM_CF) testgdbm.c
--- systems.h
+++ systems.h 2005/08/23 08:25:23
@@ -23,7 +23,7 @@
Computer Science Department
Western Washington University
Bellingham, WA 98226
-
+
*************************************************************************/
@@ -61,7 +61,7 @@
/* Do we have flock? (BSD...) */
-#if HAVE_FLOCK
+#if HAVE_FLOCK && !HAVE_FCNTL_H
#ifndef LOCK_SH
#define LOCK_SH 1