🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.utils.bug
Article #1000

gdbm 1.5 changes for Solaris 2.0/SVR4

#1000
From: Rainer Orth
Date: Fri, 02 Oct 1992 03:04
75 lines
2571 bytes
Below I've included the few changes I had to make to gdbm 1.5 to have it
compile and pass the tests in the native SVR4 environment of Solaris 2.0,
using gcc 2.2.2 ss-920925.

===================================================================
RCS file: RCS/Makefile,v
retrieving revision 1.1
diff -u -r1.1 Makefile
--- Makefile	1991/01/24 17:22:59	1.1
+++ Makefile	1992/09/30 20:38:41
@@ -7,11 +7,11 @@
 #
 # for gcc, uncomment the CC = gcc line.
 
-#CC = gcc
-CFLAGS = -g # -O -DSYSV
+CC = gcc
+CFLAGS = -g -O -DSYSV -DSVR4
 LDFLAGS =
 LIBS = # -lPW
-DBM = -ldbm
+DBM = -L/usr/ucblib -ldbm -lucb
 NDBM = -lc
 LIBC = -lc
 LINTFLAGS =
===================================================================
RCS file: RCS/systems.h,v
retrieving revision 1.1
diff -u -r1.1 systems.h
--- systems.h	1991/03/01 00:58:34	1.1
+++ systems.h	1992/09/30 20:28:21
@@ -36,6 +36,7 @@
 
 /* File seeking needs L_SET defined .*/
 #include <unistd.h>
+#undef L_SET
 #define L_SET SEEK_SET
 
 /* Some files need fcntl.h for locking. */
@@ -70,7 +71,13 @@
 #define bcmp(d1, d2, n)	memcmp(d1, d2, n)
 #define bcopy(d1, d2, n) memcpy(d2, d1, n)
 
-/* Sys V does not have fsync. */
+/* Get string definitions. */
+#include <string.h>
+#define _HAVE_STRING
+#endif
+
+#ifndef SVR4
+/* Sys V before R4 does not have fsync. */
 #define fsync(f) sync(); sync()
 
 /* Stat does not have a st_blksize field. */
@@ -79,13 +86,9 @@
 /* Does not have rename(). */
 #define NEED_RENAME
 
-/* Get string definitions. */
-#include <string.h>
-#define _HAVE_STRING
-#endif
-
-/* Sys V does not have a truncate call, how primitive. */
+/* Sys V before R4 does not have a truncate call, how primitive. */
 #define TRUNCATE(dbf) close( open (dbf->name, O_RDWR|O_TRUNC, mode));
+#endif
 
 
 /*      End of System V changes and defines.      */

-----------------------------------------------------------------------------
Rainer Orth, Technical Computer Science, University of Bielefeld

Internet: ro@TechFak.Uni-Bielefeld.DE
Technical Details
Message-ID: <9210020104.AA01624@anemone.techfak.uni-bielefeld.de>
Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!ames!sun-barr!cs.utexas.edu!sdd.hp.com!wupost!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!techfak.uni-bielefeld.DE!ro

Show Full Headers
Complete Article Headers
Newsgroups: gnu.utils.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!ames!sun-barr!cs.utexas.edu!sdd.hp.com!wupost!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!techfak.uni-bielefeld.DE!ro
From: ro@techfak.uni-bielefeld.DE (Rainer Orth)
Subject: gdbm 1.5 changes for Solaris 2.0/SVR4
Message-ID: <9210020104.AA01624@anemone.techfak.uni-bielefeld.de>
Sender: gnulists@ai.mit.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Fri, 2 Oct 1992 03:04:16 GMT
Approved: bug-gnu-utils@prep.ai.mit.edu
Lines: 78