Index: gdbm/Makefile.in =================================================================== RCS file: /IX/GDBM/cvs/gdbm/Makefile.in$v retrieving revision 1.1.1.1 retrieving revision 1.1.1.2 diff -u -r1.1.1.1 -r1.1.1.2 --- Makefile.in 1998/12/12 18:59:50 1.1.1.1 +++ Makefile.in 1998/12/12 19:42:34 1.1.1.2 @@ -23,7 +23,7 @@ LDFLAGS = # Common prefix for installation directories -prefix = /usr/local +prefix = @prefix@ exec_prefix = $(prefix) binprefix = $(exec_prefix) manprefix = $(prefix) @@ -100,11 +100,11 @@ install-compat: $(INSTALL_DATA) $(srcdir)/dbm.h $(includedir)/dbm.h - $(INSTALL_DATA) $(srcdir/ndbm.h $(includedir)/ndbm.h + $(INSTALL_DATA) $(srcdir)/ndbm.h $(includedir)/ndbm.h libgdbm.a: $(OBJS) gdbm.h rm -f libgdbm.a - ar q libgdbm.a $(OBJS) + ar rv libgdbm.a $(OBJS) $(RANLIB) libgdbm.a gdbm.h: gdbm.proto gdbmerrno.h gdbm.proto2 @@ -116,23 +116,23 @@ chmod -w gdbm.h testgdbm: testgdbm.o libgdbm.a @LIBOBJS@ - $(CC) $(LDFLAGS) -o testgdbm testgdbm.o libgdbm.a @LIBOBJS@ + $(CC) $(LDFLAGS) -o testgdbm testgdbm.o libgdbm.a @LIBOBJS@ $(LIBS) testdbm: testdbm.o libgdbm.a - $(CC) $(LDFLAGS) -o testdbm testdbm.o libgdbm.a + $(CC) $(LDFLAGS) -o testdbm testdbm.o libgdbm.a $(LIBS) tdbm: testdbm.o libgdbm.a $(CC) $(LDFLAGS) -o tdbm testdbm.o $(LIBS) testndbm.o: testndbm.c - $(CC) -c -I. -I$(srcdir) $(CFLAGS) $(DEFS) -DGNU $(srcdir)/testndbm.c + $(CC) -c $(CPPFLAGS) -I. -I$(srcdir) $(CFLAGS) $(DEFS) -DGNU $(srcdir)/testndbm.c testndbm: testndbm.o libgdbm.a - $(CC) $(LDFLAGS) -o testndbm testndbm.o libgdbm.a + $(CC) $(LDFLAGS) -o testndbm testndbm.o libgdbm.a $(LIBS) tndbm.o: testndbm.c cp $(srcdir)/testndbm.c ./tndbm.c - $(CC) -c -I. -I$(srcdir) $(CFLAGS) $(DEFS) ./tndbm.c + $(CC) -c $(CPPFLAGS) -I. -I$(srcdir) $(CFLAGS) $(DEFS) ./tndbm.c rm -f ./tndbm.c tndbm: tndbm.o libgdbm.a Index: dbminit.c =================================================================== RCS file: /IX/GDBM/cvs/gdbm/dbminit.c$v retrieving revision 1.1.1.1 retrieving revision 1.1.1.2 diff -u -r1.1.1.1 -r1.1.1.2 --- dbminit.c 1998/12/12 18:59:53 1.1.1.1 +++ dbminit.c 1998/12/12 21:34:00 1.1.1.2 @@ -92,7 +92,11 @@ if (stat (dir_file, &dir_stat) == 0) { if (dir_stat.st_size == 0) +#ifdef mpeix + if (unlink (dir_file) != 0 || symlink (pag_file, dir_file) != 0) +#else if (unlink (dir_file) != 0 || link (pag_file, dir_file) != 0) +#endif { gdbm_errno = GDBM_FILE_OPEN_ERROR; gdbm_close (_gdbm_file); Index: dbmopen.c =================================================================== RCS file: /IX/GDBM/cvs/gdbm/dbmopen.c$v retrieving revision 1.1.1.1 retrieving revision 1.1.1.2 diff -u -r1.1.1.1 -r1.1.1.2 --- dbmopen.c 1998/12/12 18:59:53 1.1.1.1 +++ dbmopen.c 1998/12/12 21:34:03 1.1.1.2 @@ -110,7 +110,11 @@ if (stat (dir_file, &dir_stat) == 0) { if (dir_stat.st_size == 0) +#ifdef mpeix + if (unlink (dir_file) != 0 || symlink (pag_file, dir_file) != 0) +#else if (unlink (dir_file) != 0 || link (pag_file, dir_file) != 0) +#endif { gdbm_errno = GDBM_FILE_OPEN_ERROR; gdbm_close (temp_dbf); @@ -121,7 +125,11 @@ { /* Since we can't stat it, we assume it is not there and try to link the dir_file to the pag_file. */ +#ifdef mpeix + if (symlink (pag_file, dir_file) != 0) +#else if (link (pag_file, dir_file) != 0) +#endif { gdbm_errno = GDBM_FILE_OPEN_ERROR; gdbm_close (temp_dbf); Index: systems.h =================================================================== RCS file: /IX/GDBM/cvs/gdbm/systems.h$v retrieving revision 1.1.1.1 retrieving revision 1.1.1.2 diff -u -r1.1.1.1 -r1.1.1.2 --- systems.h 1998/12/12 18:59:59 1.1.1.1 +++ systems.h 1998/12/12 19:42:37 1.1.1.2 @@ -139,7 +139,11 @@ stat record. This code uses the BSD blocksize from stat. */ #if HAVE_ST_BLKSIZE +#ifdef mpeix +#define STATBLKSIZE 4096 +#else #define STATBLKSIZE file_stat.st_blksize +#endif #else #define STATBLKSIZE 1024 #endif Index: gdbmreorg.c =================================================================== RCS file: /IX/GDBM/cvs/gdbm/gdbmreorg.c$v retrieving revision 1.1.1.1 retrieving revision 1.1.1.2 diff -u -r1.1.1.1 -r1.1.1.2 --- gdbmreorg.c 1998/12/12 18:59:57 1.1.1.1 +++ gdbmreorg.c 1998/12/12 21:53:48 1.1.1.2 @@ -105,13 +105,21 @@ } strcpy (&new_name[0], dbf->name); new_name[len+2] = 0; +#ifdef mpeix + new_name[len+1] = '_'; +#else new_name[len+1] = '#'; +#endif while ( (len > 0) && new_name[len-1] != '/') { new_name[len] = new_name[len-1]; len -= 1; } +#ifdef mpeix + new_name[len] = '_'; +#else new_name[len] = '#'; +#endif /* Get the mode for the old file and open the new database. The "fast" mode is used because the reorganization will fail