📄 gdbm-1.8.3-src.diff
字号:
diff -ipuwrN -x '*.bak' -x '*.orig' -x '*.rej' -x '*.new' -x '*~' gdbm-1.8.3-orig/Makefile.in gdbm-1.8.3-src/Makefile.in
--- gdbm-1.8.3-orig/Makefile.in 2002-10-08 18:09:12.000000000 +0200
+++ gdbm-1.8.3-src/Makefile.in 2004-12-18 22:00:15.828125000 +0100
@@ -2,13 +2,18 @@
srcdir = @srcdir@
top_builddir = .
-VPATH = @srcdir@
+resdir = $(top_builddir)/res
+VPATH = @srcdir@ $(resdir)
CC = @CC@
LIBTOOL = @LIBTOOL@
# GDBM 1.8.3 builds shared libraries version 3.0
-SHLIB_VER = 3 0 0
+SHLIB_VER = 3:0:0
+VERSION = 1.8.3
+MAJOR=1
+MINOR=8
+VERSADD = -Wl,--major-image-version=$(MAJOR) -Wl,--minor-image-version=$(MINOR)
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -21,13 +26,14 @@ BINGRP = bin
MAKEINFO = makeinfo
TEXI2DVI = texi2dvi
-DEFS =
+DEFS = -D__GW32__ -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64 \
+ -idirafter h:/glibc/include -idirafter e:/progra~1/gnuwin32/include
# Where the system [n]dbm routines are...
-LIBS = @LIBS@ -lc
+LIBS = @LIBS@ -lgw32c -liberty -lole32 -luuid
CFLAGS = @CFLAGS@
-LDFLAGS = @LDFLAGS@
+LDFLAGS = @LDFLAGS@ $(VERSADD)
# Common prefix for installation directories
prefix = @prefix@
@@ -47,7 +53,11 @@ manext = 3
#### End of system configuration section. ####
.SUFFIXES:
-.SUFFIXES: .c .lo .o
+.SUFFIXES: .c .lo .o .rc
+
+# Rule to make compiled resource (Windows)
+.rc.o:
+ windres --include-dir $(resdir) -i $< -o $@
.c.o:
$(CC) -c $(CPPFLAGS) $(DEFS) -I. -I$(srcdir) $(CFLAGS) $<
@@ -72,7 +82,7 @@ GDBM_CF = gdbmopen.c gdbmdelete.c gdbmfe
TEST_CF = testdbm.c testndbm.c testgdbm.c
-DBM_OF = dbminit.o delete.o fetch.o store.o seq.o close.o
+DBM_OF = dbminit.o delete.o fetch.o store.o seq.o close.o dbm-dllversion.o
NDBM_OF = dbmopen.o dbmdelete.o dbmfetch.o dbmstore.o dbmseq.o \
dbmclose.o dbmdirfno.o dbmpagfno.o dbmrdonly.o
@@ -80,9 +90,9 @@ NDBM_OF = dbmopen.o dbmdelete.o dbmfetch
GDBM_OF = gdbmopen.o gdbmdelete.o gdbmfetch.o gdbmstore.o gdbmclose.o \
gdbmreorg.o gdbmseq.o gdbmsync.o gdbmerrno.o gdbmexists.o gdbmfdesc.o \
gdbmsetopt.o bucket.o falloc.o findkey.o global.o hash.o update.o \
- version.o
+ version.o gdbm-dllversion.o
-DBM_LOF = dbminit.lo delete.lo fetch.lo store.lo seq.lo close.lo
+DBM_LOF = dbminit.lo delete.lo fetch.lo store.lo seq.lo close.lo dbm-dllversion.lo
NDBM_LOF = dbmopen.lo dbmdelete.lo dbmfetch.lo dbmstore.lo dbmseq.lo \
dbmclose.lo dbmdirfno.lo dbmpagfno.lo dbmrdonly.lo
@@ -90,7 +100,7 @@ NDBM_LOF = dbmopen.lo dbmdelete.lo dbmfe
GDBM_LOF = gdbmopen.lo gdbmdelete.lo gdbmfetch.lo gdbmstore.lo gdbmclose.lo \
gdbmreorg.lo gdbmseq.lo gdbmsync.lo gdbmerrno.lo gdbmexists.lo \
gdbmfdesc.lo gdbmsetopt.lo bucket.lo falloc.lo findkey.lo global.lo \
- hash.lo update.lo version.lo
+ hash.lo update.lo version.lo gdbm-dllversion.lo
TEX_F = gdbm.aux gdbm.cp gdbm.dvi gdbm.fn gdbm.ky gdbm.log gdbm.pg \
gdbm.toc gdbm.tp gdbm.vr
@@ -122,7 +132,7 @@ MSCFILES = COPYING ChangeLog Makefile.in
DISTFILES = $(SRCS) $(HDRS) $(MSCFILES)
-all: libgdbm.la libgdbm_compat.la
+all: libgdbm.la libgdbm_compat.la progs
progs: $(PROGS)
@@ -131,11 +141,11 @@ install: libgdbm.la gdbm.h gdbm.info
$(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 \
+ $(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:
@@ -143,9 +153,9 @@ install-compat:
$(INSTALL_ROOT)$(includedir)
$(LIBTOOL) $(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
@@ -156,12 +166,17 @@ install-compat:
libgdbm.la: $(LOBJS) gdbm.h
rm -f libgdbm.la
$(LIBTOOL) --mode=link $(CC) -o libgdbm.la -rpath $(libdir) \
- -version-info $(SHLIB_VER) $(LOBJS)
+ -version-info 3:0:0 $(LOBJS) $(LIBS)
+ cd .libs && o2dll -o gdbm.dll -l libgdbm $(OBJS)
libgdbm_compat.la: $(C_LOBJS) gdbm.h
rm -f libgdbm_compat.la
- $(LIBTOOL) --mode=link $(CC) -o libgdbm_compat.la -rpath $(libdir) \
- -version-info $(SHLIB_VER) $(C_LOBJS)
+ -$(LIBTOOL) --mode=link $(CC) -o libgdbm_compat.la -rpath $(libdir) \
+ -version-info 3:0:0 $(C_LOBJS) $(LIBS) libgdbm.la
+ cd .libs && o2dll -o dbm.dll -l libgdbm_compat $(C_OBJS) -L. -lgdbm \
+ && cp -fp libgdbm_compat.dll.a libdbm.dll.a \
+ && cp -fp libgdbm_compat.lib libdbm.lib \
+ && cp -fp libgdbm_compat-bcc.lib libdbm-bcc.lib
gdbm.h: gdbm.proto gdbmerrno.h gdbm.proto2
rm -f gdbm.h
@@ -171,31 +186,31 @@ gdbm.h: gdbm.proto gdbmerrno.h gdbm.prot
cat $(srcdir)/gdbm.proto2 >> gdbm.h
chmod -w gdbm.h
-testgdbm: testgdbm.o libgdbm.la @LIBOBJS@
- $(LIBTOOL) $(CC) $(LDFLAGS) -o testgdbm testgdbm.o libgdbm.la @LIBOBJS@
+testgdbm: testgdbm.o testgdbm-res.o libgdbm.la @LIBOBJS@
+ $(CC) $(LDFLAGS) -o testgdbm testgdbm.o testgdbm-res.o -L.libs -lgdbm @LIBOBJS@
-testdbm: testdbm.o libgdbm.la libgdbm_compat.la
- $(LIBTOOL) $(CC) $(LDFLAGS) -o testdbm testdbm.o libgdbm.la libgdbm_compat.la
+testdbm: testdbm.o testdbm-res.o libgdbm.la libgdbm_compat.la
+ $(CC) $(LDFLAGS) -o testdbm testdbm.o testdbm-res.o -L.libs -lgdbm -lgdbm_compat
-tdbm: testdbm.o
- $(CC) $(LDFLAGS) -o tdbm testdbm.o $(LIBS)
+tdbm: testdbm.o tdbm-res.o
+ $(CC) $(LDFLAGS) -o tdbm testdbm.o tdbm-res.o -L.libs -lgdbm -lgdbm_compat $(LIBS)
testndbm.o: testndbm.c
$(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
+testndbm: testndbm.o testndbm-res.o libgdbm.la libgdbm_compat.la
+ $(CC) $(LDFLAGS) -o testndbm testndbm.o testndbm-res.o -L.libs -lgdbm -lgdbm_compat
tndbm.o: testndbm.c
cp $(srcdir)/testndbm.c ./tndbm.c
$(CC) -c -I. -I$(srcdir) $(CFLAGS) $(DEFS) ./tndbm.c
rm -f ./tndbm.c
-tndbm: tndbm.o
- $(CC) $(LDFLAGS) -o tndbm tndbm.o $(LIBS)
+tndbm: tndbm.o tndbm-res.o
+ $(CC) $(LDFLAGS) -o tndbm tndbm.o tndbm-res.o -L.libs -lgdbm -lgdbm_compat $(LIBS)
-conv2gdbm: conv2gdbm.o libgdbm.la @LIBOBJS@
- $(LIBTOOL) $(CC) $(LDFLAGS) -o conv2gdbm conv2gdbm.o $(LIBS) libgdbm.la @LIBOBJS@
+conv2gdbm: conv2gdbm.o conv2gdbm-res.o libgdbm.la @LIBOBJS@
+ $(CC) $(LDFLAGS) -o conv2gdbm conv2gdbm.o conv2gdbm-res.o $(LIBS) -L.libs -lgdbm @LIBOBJS@
lintgdbm:
lint $(DEFS) $(LFLAGS) $(DBM_CF) $(NDBM_CF) $(GDBM_CF) testgdbm.c
diff -ipuwrN -x '*.bak' -x '*.orig' -x '*.rej' -x '*.new' -x '*~' gdbm-1.8.3-orig/dbm.h gdbm-1.8.3-src/dbm.h
--- gdbm-1.8.3-orig/dbm.h 1999-05-19 02:16:05.000000000 +0200
+++ gdbm-1.8.3-src/dbm.h 2004-12-10 20:23:46.796875000 +0100
@@ -26,6 +26,8 @@
*************************************************************************/
+#include <gdbm-dll.h>
+
/* The data and key structure. This structure is defined for compatibility. */
typedef struct {
char *dptr;
@@ -35,18 +37,18 @@ typedef struct {
/* These are the routines in dbm. */
-extern int dbminit ();
+GDBM_DLL_IMPEXP int dbminit ();
-extern datum fetch ();
+GDBM_DLL_IMPEXP datum fetch ();
-extern int store ();
+GDBM_DLL_IMPEXP int store ();
-extern int delete ();
+GDBM_DLL_IMPEXP int delete ();
-extern int delete ();
+GDBM_DLL_IMPEXP int delete ();
-extern datum firstkey ();
+GDBM_DLL_IMPEXP datum firstkey ();
-extern datum nextkey ();
+GDBM_DLL_IMPEXP datum nextkey ();
-extern int dbmclose ();
+GDBM_DLL_IMPEXP int dbmclose ();
diff -ipuwrN -x '*.bak' -x '*.orig' -x '*.rej' -x '*.new' -x '*~' gdbm-1.8.3-orig/extern.h gdbm-1.8.3-src/extern.h
--- gdbm-1.8.3-orig/extern.h 1999-05-19 02:16:06.000000000 +0200
+++ gdbm-1.8.3-src/extern.h 2004-12-10 20:52:40.671875000 +0100
@@ -25,11 +25,11 @@
Bellingham, WA 98226
*************************************************************************/
-
+#include <gdbm-dll.h>
/* The global variables used for the "original" interface. */
-extern gdbm_file_info *_gdbm_file;
+GDBM_DLL_IMPEXP gdbm_file_info *_gdbm_file;
/* Memory for return data for the "original" interface. */
-extern datum _gdbm_memory;
-extern char *_gdbm_fetch_val;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -