summaryrefslogtreecommitdiff
path: root/packaging/gdbm-1.8.3.dif
blob: b0df5374ec24c66f619e5860b591f50741b1115b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
--- 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